public final class TokenizerModel extends BaseModel
TokenizerModel is the model used
by a learnable Tokenizer.TokenizerMETRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY| Constructor and Description |
|---|
TokenizerModel(java.io.File modelFile)
Initializes the current instance.
|
TokenizerModel(java.io.InputStream in)
Initializes the current instance.
|
TokenizerModel(MaxentModel tokenizerModel,
java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries,
TokenizerFactory tokenizerFactory)
Initializes the current instance.
|
TokenizerModel(java.lang.String language,
AbstractModel tokenizerMaxentModel,
boolean useAlphaNumericOptimization)
Deprecated.
Use
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory. |
TokenizerModel(java.lang.String language,
AbstractModel tokenizerMaxentModel,
boolean useAlphaNumericOptimization,
java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries)
Deprecated.
Use
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory. |
TokenizerModel(java.lang.String language,
MaxentModel tokenizerMaxentModel,
Dictionary abbreviations,
boolean useAlphaNumericOptimization,
java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries)
Deprecated.
Use
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory. |
TokenizerModel(java.net.URL modelURL)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
Dictionary |
getAbbreviations() |
TokenizerFactory |
getFactory() |
MaxentModel |
getMaxentModel() |
static void |
main(java.lang.String[] args) |
boolean |
useAlphaNumericOptimization() |
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serializepublic TokenizerModel(MaxentModel tokenizerModel, java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries, TokenizerFactory tokenizerFactory)
tokenizerModel - the modelmanifestInfoEntries - the manifesttokenizerFactory - the factorypublic TokenizerModel(java.lang.String language,
MaxentModel tokenizerMaxentModel,
Dictionary abbreviations,
boolean useAlphaNumericOptimization,
java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries)
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory.language - the language the tokenizer should usetokenizerMaxentModel - the statistical model of the tokenizerabbreviations - the dictionary containing the abbreviationsuseAlphaNumericOptimization - if true alpha numeric optimization is enabled, otherwise notmanifestInfoEntries - the additional meta data which should be written into manifestpublic TokenizerModel(java.lang.String language,
AbstractModel tokenizerMaxentModel,
boolean useAlphaNumericOptimization,
java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries)
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory.language - the language the tokenizer should usetokenizerMaxentModel - the statistical model of the tokenizeruseAlphaNumericOptimization - if true alpha numeric optimization is enabled, otherwise notmanifestInfoEntries - the additional meta data which should be written into manifestpublic TokenizerModel(java.lang.String language,
AbstractModel tokenizerMaxentModel,
boolean useAlphaNumericOptimization)
TokenizerModel(MaxentModel, Map, TokenizerFactory)
instead and pass in a TokenizerFactory.language - the language the tokenizer should usetokenizerMaxentModel - the statistical model of the tokenizeruseAlphaNumericOptimization - if true alpha numeric optimization is enabled, otherwise notpublic TokenizerModel(java.io.InputStream in)
throws java.io.IOException,
InvalidFormatException
in - the Input Stream to load the model fromjava.io.IOException - if reading from the stream fails in anywayInvalidFormatException - if the stream doesn't have the expected formatpublic TokenizerModel(java.io.File modelFile)
throws java.io.IOException,
InvalidFormatException
modelFile - the file containing the tokenizer modeljava.io.IOException - if reading from the stream fails in anywayInvalidFormatException - if the stream doesn't have the expected formatpublic TokenizerModel(java.net.URL modelURL)
throws java.io.IOException,
InvalidFormatException
modelURL - the URL pointing to the tokenizer modeljava.io.IOException - if reading from the stream fails in anywayInvalidFormatException - if the stream doesn't have the expected formatpublic TokenizerFactory getFactory()
public MaxentModel getMaxentModel()
public Dictionary getAbbreviations()
public boolean useAlphaNumericOptimization()
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved