public class SentenceModel extends BaseModel
SentenceModel is the model used
by a learnable SentenceDetector.SentenceDetectorMEartifactMap, FACTORY_NAME, MANIFEST_ENTRY, toolFactory, TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY| Constructor and Description |
|---|
SentenceModel(File modelFile) |
SentenceModel(InputStream in) |
SentenceModel(String languageCode,
AbstractModel sentModel,
boolean useTokenEnd,
Dictionary abbreviations) |
SentenceModel(String languageCode,
AbstractModel sentModel,
boolean useTokenEnd,
Dictionary abbreviations,
char[] eosCharacters)
Deprecated.
Use
SentenceModel(String, AbstractModel, Map, SentenceDetectorFactory)
instead and pass in a SentenceDetectorFactory |
SentenceModel(String languageCode,
AbstractModel sentModel,
boolean useTokenEnd,
Dictionary abbreviations,
char[] eosCharacters,
Map<String,String> manifestInfoEntries)
Deprecated.
Use
SentenceModel(String, AbstractModel, Map, SentenceDetectorFactory)
instead and pass in a SentenceDetectorFactory |
SentenceModel(String languageCode,
AbstractModel sentModel,
boolean useTokenEnd,
Dictionary abbreviations,
Map<String,String> manifestInfoEntries) |
SentenceModel(String languageCode,
AbstractModel sentModel,
Map<String,String> manifestInfoEntries,
SentenceDetectorFactory sdFactory) |
SentenceModel(URL modelURL) |
| Modifier and Type | Method and Description |
|---|---|
Dictionary |
getAbbreviations() |
protected Class<? extends BaseToolFactory> |
getDefaultFactory()
Sub-classes should override this method if their module has a default
BaseToolFactory sub-class.
|
char[] |
getEosCharacters() |
SentenceDetectorFactory |
getFactory() |
AbstractModel |
getMaxentModel() |
static void |
main(String[] args) |
boolean |
useTokenEnd() |
protected void |
validateArtifactMap()
Validates the parsed artifacts.
|
checkArtifactMap, createArtifactSerializers, createArtifactSerializers, getArtifact, getArtifactSerializer, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, setManifestPropertypublic SentenceModel(String languageCode, AbstractModel sentModel, Map<String,String> manifestInfoEntries, SentenceDetectorFactory sdFactory)
public SentenceModel(String languageCode, AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters, Map<String,String> manifestInfoEntries)
SentenceModel(String, AbstractModel, Map, SentenceDetectorFactory)
instead and pass in a SentenceDetectorFactorypublic SentenceModel(String languageCode, AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters)
SentenceModel(String, AbstractModel, Map, SentenceDetectorFactory)
instead and pass in a SentenceDetectorFactorypublic SentenceModel(String languageCode, AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations, Map<String,String> manifestInfoEntries)
public SentenceModel(String languageCode, AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations)
public SentenceModel(InputStream in) throws IOException, InvalidFormatException
IOExceptionInvalidFormatExceptionpublic SentenceModel(File modelFile) throws IOException, InvalidFormatException
IOExceptionInvalidFormatExceptionpublic SentenceModel(URL modelURL) throws IOException, InvalidFormatException
IOExceptionInvalidFormatExceptionprotected void validateArtifactMap()
throws InvalidFormatException
BaseModelInvalidFormatException.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.validateArtifactMap in class BaseModelInvalidFormatExceptionpublic SentenceDetectorFactory getFactory()
protected Class<? extends BaseToolFactory> getDefaultFactory()
BaseModelgetDefaultFactory in class BaseModelBaseToolFactory for the module, or null if none.public AbstractModel getMaxentModel()
public Dictionary getAbbreviations()
public boolean useTokenEnd()
public char[] getEosCharacters()
public static void main(String[] args) throws FileNotFoundException, IOException, InvalidFormatException
Copyright © 2019 The Apache Software Foundation. All rights reserved.