Package opennlp.tools.sentdetect
Class SentenceModel
- java.lang.Object
-
- opennlp.tools.util.model.BaseModel
-
- opennlp.tools.sentdetect.SentenceModel
-
- All Implemented Interfaces:
Serializable,ArtifactProvider
public class SentenceModel extends BaseModel
TheSentenceModelis the model used by a learnableSentenceDetector.- See Also:
SentenceDetectorME, Serialized Form
-
-
Field Summary
-
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description SentenceModel(File modelFile)SentenceModel(InputStream in)SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations)SentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters)Deprecated.UseSentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)instead and pass in aSentenceDetectorFactorySentenceModel(String languageCode, MaxentModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters, Map<String,String> manifestInfoEntries)Deprecated.UseSentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)instead and pass in aSentenceDetectorFactorySentenceModel(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DictionarygetAbbreviations()char[]getEosCharacters()SentenceDetectorFactorygetFactory()MaxentModelgetMaxentModel()booleanuseTokenEnd()-
Methods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
-
-
-
Constructor Detail
-
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 aSentenceDetectorFactoryTODO: 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 aSentenceDetectorFactoryTODO: 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
public SentenceModel(InputStream in) throws IOException
- Throws:
IOException
-
SentenceModel
public SentenceModel(File modelFile) throws IOException
- Throws:
IOException
-
SentenceModel
public SentenceModel(Path modelPath) throws IOException
- Throws:
IOException
-
SentenceModel
public SentenceModel(URL modelURL) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getFactory
public SentenceDetectorFactory getFactory()
-
getMaxentModel
public MaxentModel getMaxentModel()
-
getAbbreviations
public Dictionary getAbbreviations()
-
useTokenEnd
public boolean useTokenEnd()
-
getEosCharacters
public char[] getEosCharacters()
-
-