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 SummaryFields inherited from class opennlp.tools.util.model.BaseModelTRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
- 
Constructor SummaryConstructorsConstructorDescriptionSentenceModel(File modelFile) Initializes aSentenceModelinstance via a validFile.Initializes aSentenceModelinstance via a validInputStream.SentenceModel(String languageCode, MaxentModel sentModel, Map<String, String> manifestInfoEntries, SentenceDetectorFactory sdFactory) Initializes aSentenceModelinstance via given parameters.SentenceModel(URL modelURL) Initializes aSentenceModelinstance via a validURL.SentenceModel(Path modelPath) Initializes aSentenceModelinstance via a validPath.
- 
Method SummaryModifier and TypeMethodDescriptionchar[]booleanMethods inherited from class opennlp.tools.util.model.BaseModelgetArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
- 
Constructor Details- 
SentenceModelpublic SentenceModel(String languageCode, MaxentModel sentModel, Map<String, String> manifestInfoEntries, SentenceDetectorFactory sdFactory) Initializes aSentenceModelinstance via given parameters.- Parameters:
- languageCode- The ISO language code for this model. Must not be- null.
- sentModel- A valid- MaxentModel.
- manifestInfoEntries- Additional information kept in the manifest.
- sdFactory- The- SentenceDetectorFactoryfor creating related objects.
 
- 
SentenceModelInitializes aSentenceModelinstance via a validInputStream.- Parameters:
- in- The- InputStreamused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
- 
SentenceModelInitializes aSentenceModelinstance via a validFile.- Parameters:
- modelFile- The- Fileused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
- 
SentenceModelInitializes aSentenceModelinstance via a validPath.- Parameters:
- modelPath- The- Pathused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
- 
SentenceModelInitializes aSentenceModelinstance via a validURL.- Parameters:
- modelURL- The- URLused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
 
- 
- 
Method Details- 
getFactory
- 
getMaxentModel
- 
getAbbreviations
- 
useTokenEndpublic boolean useTokenEnd()
- 
getEosCharacterspublic char[] getEosCharacters()
 
-