Package opennlp.tools.tokenize
Class TokenizerModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.tokenize.TokenizerModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
The
TokenizerModel
is the model used
by a learnable Tokenizer
.- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorsConstructorDescriptionTokenizerModel
(File modelFile) Initializes the current instance.Initializes the current instance.TokenizerModel
(URL modelURL) Initializes the current instance.TokenizerModel
(Path modelPath) TokenizerModel
(MaxentModel tokenizerModel, Map<String, String> manifestInfoEntries, TokenizerFactory tokenizerFactory) Initializes the current instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Methods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Constructor Details
-
TokenizerModel
public TokenizerModel(MaxentModel tokenizerModel, Map<String, String> manifestInfoEntries, TokenizerFactory tokenizerFactory) Initializes the current instance.- Parameters:
tokenizerModel
- the modelmanifestInfoEntries
- the manifesttokenizerFactory
- the factory
-
TokenizerModel
Initializes the current instance.- Parameters:
in
- the Input Stream to load the model from- Throws:
IOException
- if reading from the stream fails in anywayInvalidFormatException
- if the stream doesn't have the expected format
-
TokenizerModel
Initializes the current instance.- Parameters:
modelFile
- the file containing the tokenizer model- Throws:
IOException
- if reading from the stream fails in anyway
-
TokenizerModel
- Throws:
IOException
-
TokenizerModel
Initializes the current instance.- Parameters:
modelURL
- the URL pointing to the tokenizer model- Throws:
IOException
- if reading from the stream fails in anyway
-
-
Method Details
-
getFactory
-
getMaxentModel
-
getAbbreviations
-
useAlphaNumericOptimization
public boolean useAlphaNumericOptimization()
-