public final class TokenizerModel extends BaseModel
TokenizerModel is the model used
by a learnable Tokenizer.TokenizerME,
Serialized FormTRAINING_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.nio.file.Path modelPath) |
TokenizerModel(java.net.URL modelURL)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
Dictionary |
getAbbreviations() |
TokenizerFactory |
getFactory() |
MaxentModel |
getMaxentModel() |
boolean |
useAlphaNumericOptimization() |
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, 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.io.InputStream in)
throws java.io.IOException
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
modelFile - the file containing the tokenizer modeljava.io.IOException - if reading from the stream fails in anywaypublic TokenizerModel(java.nio.file.Path modelPath)
throws java.io.IOException
java.io.IOExceptionpublic TokenizerModel(java.net.URL modelURL)
throws java.io.IOException
modelURL - the URL pointing to the tokenizer modeljava.io.IOException - if reading from the stream fails in anywaypublic TokenizerFactory getFactory()
public MaxentModel getMaxentModel()
public Dictionary getAbbreviations()
public boolean useAlphaNumericOptimization()
Copyright © 2010 - 2023 Adobe. All Rights Reserved