Package opennlp.tools.sentdetect
Class SentenceModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.sentdetect.SentenceModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
The
SentenceModel
is the model used
by a learnable SentenceDetector
.- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorDescriptionSentenceModel
(File modelFile) SentenceModel
(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations) SentenceModel
(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters) Deprecated.SentenceModel
(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters, Map<String, String> manifestInfoEntries) Deprecated.UseSentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)
instead and pass in aSentenceDetectorFactory
SentenceModel
(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, Map<String, String> manifestInfoEntries) SentenceModel
(String languageCode, MaxentModel sentModel, Map<String, String> manifestInfoEntries, SentenceDetectorFactory sdFactory) SentenceModel
(URL modelURL) SentenceModel
(Path modelPath) -
Method Summary
Modifier and TypeMethodDescriptionchar[]
boolean
Methods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Constructor Details
-
SentenceModel
public SentenceModel(String languageCode, MaxentModel sentModel, Map<String, String> manifestInfoEntries, SentenceDetectorFactory sdFactory) -
SentenceModel
public SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters, Map<String, String> manifestInfoEntries) Deprecated.UseSentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)
instead and pass in aSentenceDetectorFactory
TODO: was added in 1.5.3 -> remove -
SentenceModel
public SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters) Deprecated.UseSentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)
instead and pass in aSentenceDetectorFactory
TODO: was added in 1.5.3 -> remove -
SentenceModel
public SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, Map<String, String> manifestInfoEntries) -
SentenceModel
public SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations) -
SentenceModel
- Throws:
IOException
-
SentenceModel
- Throws:
IOException
-
SentenceModel
- Throws:
IOException
-
SentenceModel
- Throws:
IOException
-
-
Method Details
-
getFactory
-
getMaxentModel
-
getAbbreviations
-
useTokenEnd
public boolean useTokenEnd() -
getEosCharacters
public char[] getEosCharacters()
-
SentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)
instead and pass in aSentenceDetectorFactory