Package opennlp.tools.lemmatizer
Class LemmatizerModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.lemmatizer.LemmatizerModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
The
LemmatizerModel
is the model used by a learnable Lemmatizer
.- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorDescriptionLemmatizerModel
(File modelFile) Initializes aLemmatizerModel
instance via a validFile
.Initializes aLemmatizerModel
instance via a validInputStream
.LemmatizerModel
(String languageCode, MaxentModel lemmatizerModel, int beamSize, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.LemmatizerModel
(String languageCode, MaxentModel lemmatizerModel, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.LemmatizerModel
(String languageCode, MaxentModel lemmatizerModel, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.LemmatizerModel
(String languageCode, SequenceClassificationModel<String> lemmatizerModel, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.LemmatizerModel
(URL modelURL) Initializes aLemmatizerModel
instance via a validURL
.LemmatizerModel
(Path modelPath) Initializes aLemmatizerModel
instance via a validPath
. -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Constructor Details
-
LemmatizerModel
public LemmatizerModel(String languageCode, SequenceClassificationModel<String> lemmatizerModel, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.lemmatizerModel
- A validSequenceClassificationModel
.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheLemmatizerFactory
for creating related objects.
-
LemmatizerModel
public LemmatizerModel(String languageCode, MaxentModel lemmatizerModel, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.lemmatizerModel
- A validMaxentModel
.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheLemmatizerFactory
for creating related objects.
-
LemmatizerModel
public LemmatizerModel(String languageCode, MaxentModel lemmatizerModel, int beamSize, Map<String, String> manifestInfoEntries, LemmatizerFactory factory) Initializes aLemmatizerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.lemmatizerModel
- A validMaxentModel
.beamSize
- The size of the beam that should be used when decoding sequences.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheLemmatizerFactory
for creating related objects.
-
LemmatizerModel
Initializes aLemmatizerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.lemmatizerModel
- A validMaxentModel
.factory
- TheLemmatizerFactory
for creating related objects.
-
LemmatizerModel
Initializes aLemmatizerModel
instance via a validInputStream
.- Parameters:
in
- TheInputStream
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
LemmatizerModel
Initializes aLemmatizerModel
instance via a validFile
.- Parameters:
modelFile
- TheFile
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
LemmatizerModel
Initializes aLemmatizerModel
instance via a validPath
.- Parameters:
modelPath
- ThePath
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
LemmatizerModel
Initializes aLemmatizerModel
instance via a validURL
.- Parameters:
modelURL
- TheURL
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
-
Method Details
-
getLemmatizerSequenceModel
- Returns:
- Retrieves a
SequenceClassificationModel
instance.
-
getFactory
- Returns:
- Retrieves the active
LemmatizerFactory
.
-