Package opennlp.tools.doccat
Class DoccatModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.doccat.DoccatModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
A model for document categorization
- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorDescriptionDoccatModel
(File modelFile) Initializes aDoccatModel
instance via a validFile
.Initializes aDoccatModel
instance via a validInputStream
.DoccatModel
(String languageCode, MaxentModel doccatModel, Map<String, String> manifestInfoEntries, DoccatFactory factory) Initializes aDoccatModel
instance via given parameters.DoccatModel
(URL modelURL) Initializes aDoccatModel
instance via a validURL
.DoccatModel
(Path modelPath) Initializes aDoccatModel
instance via a validPath
. -
Method Summary
Methods inherited from class opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Constructor Details
-
DoccatModel
public DoccatModel(String languageCode, MaxentModel doccatModel, Map<String, String> manifestInfoEntries, DoccatFactory factory) Initializes aDoccatModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.doccatModel
- A validMaxentModel
to be used.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheDoccatFactory
to be used.
-
DoccatModel
Initializes aDoccatModel
instance via a validInputStream
.- Parameters:
in
- TheInputStream
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
DoccatModel
Initializes aDoccatModel
instance via a validFile
.- Parameters:
modelFile
- TheFile
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
DoccatModel
Initializes aDoccatModel
instance via a validPath
.- Parameters:
modelPath
- ThePath
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
DoccatModel
Initializes aDoccatModel
instance via a validURL
.- Parameters:
modelURL
- TheURL
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
-
Method Details
-
getFactory
- Returns:
- Retrieves the active
DoccatFactory
.
-
getMaxentModel
- Returns:
- Retrieves the active
MaxentModel
.
-