public class SentenceModel extends BaseModel
SentenceModel
is the model used
by a learnable SentenceDetector
.SentenceDetectorME
artifactMap, 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, setManifestProperty
public 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 SentenceDetectorFactory
public SentenceModel(String languageCode, AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations, char[] eosCharacters)
SentenceModel(String, AbstractModel, Map, SentenceDetectorFactory)
instead and pass in a SentenceDetectorFactory
public 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
IOException
InvalidFormatException
public SentenceModel(File modelFile) throws IOException, InvalidFormatException
IOException
InvalidFormatException
public SentenceModel(URL modelURL) throws IOException, InvalidFormatException
IOException
InvalidFormatException
protected void validateArtifactMap() throws InvalidFormatException
BaseModel
InvalidFormatException
.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.validateArtifactMap
in class BaseModel
InvalidFormatException
public SentenceDetectorFactory getFactory()
protected Class<? extends BaseToolFactory> getDefaultFactory()
BaseModel
getDefaultFactory
in class BaseModel
BaseToolFactory
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 © 2018 The Apache Software Foundation. All rights reserved.