Package opennlp.tools.chunker
Class ChunkerModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.chunker.ChunkerModel
- All Implemented Interfaces:
Serializable
,ArtifactProvider
The
ChunkerModel
is the model used by a learnable Chunker
.- See Also:
-
Field Summary
Fields inherited from class opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Constructor Summary
ConstructorDescriptionChunkerModel
(File modelFile) Initializes aChunkerModel
instance via a validFile
.Initializes aChunkerModel
instance via a validInputStream
.ChunkerModel
(String languageCode, MaxentModel chunkerModel, int beamSize, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.ChunkerModel
(String languageCode, MaxentModel chunkerModel, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.ChunkerModel
(String languageCode, MaxentModel chunkerModel, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.ChunkerModel
(String languageCode, SequenceClassificationModel chunkerModel, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.ChunkerModel
(URL modelURL) Initializes aChunkerModel
instance via a validURL
.ChunkerModel
(Path modelPath) Initializes aChunkerModel
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
-
ChunkerModel
public ChunkerModel(String languageCode, SequenceClassificationModel chunkerModel, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.chunkerModel
- A validSequenceClassificationModel
.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheChunkerFactory
for creating related objects.
-
ChunkerModel
public ChunkerModel(String languageCode, MaxentModel chunkerModel, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.chunkerModel
- A validMaxentModel
.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheChunkerFactory
for creating related objects.
-
ChunkerModel
public ChunkerModel(String languageCode, MaxentModel chunkerModel, int beamSize, Map<String, String> manifestInfoEntries, ChunkerFactory factory) Initializes aChunkerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.chunkerModel
- A validMaxentModel
.beamSize
- The size of the beam that should be used when decoding sequences.manifestInfoEntries
- Additional information kept in the manifest.factory
- TheChunkerFactory
for creating related objects.
-
ChunkerModel
Initializes aChunkerModel
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.chunkerModel
- A validMaxentModel
.factory
- TheChunkerFactory
for creating related objects.
-
ChunkerModel
Initializes aChunkerModel
instance via a validInputStream
.- Parameters:
in
- TheInputStream
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
ChunkerModel
Initializes aChunkerModel
instance via a validFile
.- Parameters:
modelFile
- TheFile
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
ChunkerModel
Initializes aChunkerModel
instance via a validPath
.- Parameters:
modelPath
- ThePath
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
ChunkerModel
Initializes aChunkerModel
instance via a validURL
.- Parameters:
modelURL
- TheURL
used for loading the model.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
-
Method Details
-
getChunkerSequenceModel
- Returns:
- Retrieves a
SequenceClassificationModel
.
-
getFactory
- Returns:
- Retrieves the active
ChunkerFactory
.
-