Package opennlp.tools.parser
Klasse ParserModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.parser.ParserModel
- Alle implementierten Schnittstellen:
Serializable
,ArtifactProvider
This is the default
ParserModel
implementation.- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder opennlp.tools.util.model.BaseModel
TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungParserModel
(File modelFile) Initializes aParserModel
instance via a validFile
.Initializes aParserModel
instance via a validInputStream
.ParserModel
(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType) Initializes aParserModel
instance via given parameters.ParserModel
(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType, Map<String, String> manifestInfoEntries) Initializes aParserModel
instance via given parameters.ParserModel
(String languageCode, MaxentModel buildModel, MaxentModel checkModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType type, Map<String, String> manifestInfoEntries) Initializes aParserModel
instance via given parameters.ParserModel
(URL modelURL) Initializes aParserModel
instance via a validURL
.ParserModel
(Path modelPath) Initializes aParserModel
instance via a validPath
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
int
hashCode()
updateBuildModel
(MaxentModel buildModel) Instantiates a newParserModel
instance from the existing configuration with the specifiedbuildModel
for exchange.updateCheckModel
(MaxentModel checkModel) Instantiates a newParserModel
instance from the existing configuration with the specifiedcheckModel
for exchange.updateChunkerModel
(ChunkerModel chunkModel) Instantiates a newParserModel
instance from the existing configuration with the specifiedchunkModel
for exchange.updateTaggerModel
(POSModel taggerModel) Instantiates a newParserModel
instance from the existing configuration with the specifiedtaggerModel
for exchange.Von Klasse geerbte Methoden opennlp.tools.util.model.BaseModel
getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
-
Konstruktordetails
-
ParserModel
public ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType, Map<String, String> manifestInfoEntries) Initializes aParserModel
instance via given parameters.- Parameter:
languageCode
- An ISO conform language code.buildModel
- A validMaxentModel
used to build.checkModel
- A validMaxentModel
used to check.attachModel
- A validMaxentModel
used to attach.parserTagger
- A validPOSModel
to parse.chunkerTagger
- A validChunkerModel
to chunk.headRules
- TheHeadRules
to to use for parsing.modelType
- TheParserType
to use.manifestInfoEntries
- Additional information kept in the manifest.
-
ParserModel
public ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType) Initializes aParserModel
instance via given parameters.- Parameter:
languageCode
- An ISO conform language code.buildModel
- A validMaxentModel
used to build.checkModel
- A validMaxentModel
used to check.parserTagger
- A validPOSModel
to parse.chunkerTagger
- A validChunkerModel
to chunk.headRules
- TheHeadRules
to to use for parsing.modelType
- TheParserType
to use.
-
ParserModel
public ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType type, Map<String, String> manifestInfoEntries) Initializes aParserModel
instance via given parameters.- Parameter:
languageCode
- An ISO conform language code.buildModel
- A validMaxentModel
used to build.checkModel
- A validMaxentModel
used to check.parserTagger
- A validPOSModel
to parse.chunkerTagger
- A validChunkerModel
to chunk.headRules
- TheHeadRules
to to use for parsing.type
- TheParserType
to use.manifestInfoEntries
- Additional information kept in the manifest.
-
ParserModel
Initializes aParserModel
instance via a validInputStream
.- Parameter:
in
- TheInputStream
used for loading the model.- Löst aus:
IOException
- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModel
instance via a validFile
.- Parameter:
modelFile
- TheFile
used for loading the model.- Löst aus:
IOException
- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModel
instance via a validPath
.- Parameter:
modelPath
- ThePath
used for loading the model.- Löst aus:
IOException
- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModel
instance via a validURL
.- Parameter:
modelURL
- TheURL
used for loading the model.- Löst aus:
IOException
- Thrown if IO errors occurred during initialization.
-
-
Methodendetails
-
getParserType
- Gibt zurück:
- Retrieves the
ParserType
as configured in the manifest.
-
getBuildModel
- Gibt zurück:
- Retrieves the
build model
as configured in the manifest.
-
getCheckModel
- Gibt zurück:
- Retrieves the
check model
as configured in the manifest.
-
getAttachModel
- Gibt zurück:
- Retrieves the
attach model
as configured in the manifest.
-
getParserTaggerModel
- Gibt zurück:
- Retrieves the
POSModel
as configured in the manifest.
-
getParserChunkerModel
- Gibt zurück:
- Retrieves the
ChunkerModel
as configured in the manifest.
-
getHeadRules
- Gibt zurück:
- Retrieves the
HeadRules
as configured in the manifest.
-
updateBuildModel
Instantiates a newParserModel
instance from the existing configuration with the specifiedbuildModel
for exchange.- Parameter:
buildModel
- A validMaxentModel
used to build.- Gibt zurück:
- A valid
ParserModel
.
-
updateCheckModel
Instantiates a newParserModel
instance from the existing configuration with the specifiedcheckModel
for exchange.- Parameter:
checkModel
- A validMaxentModel
used to check.- Gibt zurück:
- A valid
ParserModel
.
-
updateTaggerModel
Instantiates a newParserModel
instance from the existing configuration with the specifiedtaggerModel
for exchange.- Parameter:
taggerModel
- A validPOSModel
used to tag.- Gibt zurück:
- A valid
ParserModel
.
-
updateChunkerModel
Instantiates a newParserModel
instance from the existing configuration with the specifiedchunkModel
for exchange.- Parameter:
chunkModel
- A validChunkerModel
used to tag.- Gibt zurück:
- A valid
ParserModel
.
-
hashCode
public int hashCode() -
equals
-