Package opennlp.tools.postag
Class POSModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.postag.POSModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
,SerializableArtifact
- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorsConstructorDescriptionPOSModel
(InputStream in) POSModel
(String languageCode, MaxentModel posModel, int beamSize, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) POSModel
(String languageCode, MaxentModel posModel, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) POSModel
(String languageCode, SequenceClassificationModel<String> posModel, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the class which can serialize and recreate this artifact.Retrieves the ngram dictionary.Deprecated.use getPosSequenceModel instead.Methods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Constructor Details
-
POSModel
public POSModel(String languageCode, SequenceClassificationModel<String> posModel, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) -
POSModel
public POSModel(String languageCode, MaxentModel posModel, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) -
POSModel
public POSModel(String languageCode, MaxentModel posModel, int beamSize, Map<String, String> manifestInfoEntries, POSTaggerFactory posFactory) -
POSModel
- Throws:
IOException
-
POSModel
- Throws:
IOException
-
POSModel
- Throws:
IOException
-
POSModel
- Throws:
IOException
-
-
Method Details
-
getPosModel
Deprecated.use getPosSequenceModel instead. This method will be removed soon. Only required for Parser 1.5.x backward compatibility. Newer models don't need this anymore. -
getPosSequenceModel
-
getFactory
-
getNgramDictionary
Retrieves the ngram dictionary.- Returns:
- ngram dictionary or null if not used
-
getArtifactSerializerClass
Description copied from interface:SerializableArtifact
Retrieves the class which can serialize and recreate this artifact.
Note: The serializer class must have a public zero argument constructor or an exception is thrown during model serialization/loading.- Specified by:
getArtifactSerializerClass
in interfaceSerializableArtifact
- Returns:
- the corresponding ArtifactSerializer class.
-