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 aParserModelinstance via a validFile.Initializes aParserModelinstance via a validInputStream.ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType) Initializes aParserModelinstance 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 aParserModelinstance via given parameters.ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType type, Map<String, String> manifestInfoEntries) Initializes aParserModelinstance via given parameters.ParserModel(URL modelURL) Initializes aParserModelinstance via a validURL.ParserModel(Path modelPath) Initializes aParserModelinstance via a validPath. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleaninthashCode()updateBuildModel(MaxentModel buildModel) Instantiates a newParserModelinstance from the existing configuration with the specifiedbuildModelfor exchange.updateCheckModel(MaxentModel checkModel) Instantiates a newParserModelinstance from the existing configuration with the specifiedcheckModelfor exchange.updateChunkerModel(ChunkerModel chunkModel) Instantiates a newParserModelinstance from the existing configuration with the specifiedchunkModelfor exchange.updateTaggerModel(POSModel taggerModel) Instantiates a newParserModelinstance from the existing configuration with the specifiedtaggerModelfor 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 aParserModelinstance via given parameters.- Parameter:
languageCode- An ISO conform language code.buildModel- A validMaxentModelused to build.checkModel- A validMaxentModelused to check.attachModel- A validMaxentModelused to attach.parserTagger- A validPOSModelto parse.chunkerTagger- A validChunkerModelto chunk.headRules- TheHeadRulesto to use for parsing.modelType- TheParserTypeto 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 aParserModelinstance via given parameters.- Parameter:
languageCode- An ISO conform language code.buildModel- A validMaxentModelused to build.checkModel- A validMaxentModelused to check.parserTagger- A validPOSModelto parse.chunkerTagger- A validChunkerModelto chunk.headRules- TheHeadRulesto to use for parsing.modelType- TheParserTypeto use.
-
ParserModel
public ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType type, Map<String, String> manifestInfoEntries) Initializes aParserModelinstance via given parameters.- Parameter:
languageCode- An ISO conform language code.buildModel- A validMaxentModelused to build.checkModel- A validMaxentModelused to check.parserTagger- A validPOSModelto parse.chunkerTagger- A validChunkerModelto chunk.headRules- TheHeadRulesto to use for parsing.type- TheParserTypeto use.manifestInfoEntries- Additional information kept in the manifest.
-
ParserModel
Initializes aParserModelinstance via a validInputStream.- Parameter:
in- TheInputStreamused for loading the model.- Löst aus:
IOException- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModelinstance via a validFile.- Parameter:
modelFile- TheFileused for loading the model.- Löst aus:
IOException- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModelinstance via a validPath.- Parameter:
modelPath- ThePathused for loading the model.- Löst aus:
IOException- Thrown if IO errors occurred during initialization.
-
ParserModel
Initializes aParserModelinstance via a validURL.- Parameter:
modelURL- TheURLused for loading the model.- Löst aus:
IOException- Thrown if IO errors occurred during initialization.
-
-
Methodendetails
-
getParserType
- Gibt zurück:
- Retrieves the
ParserTypeas configured in the manifest.
-
getBuildModel
- Gibt zurück:
- Retrieves the
build modelas configured in the manifest.
-
getCheckModel
- Gibt zurück:
- Retrieves the
check modelas configured in the manifest.
-
getAttachModel
- Gibt zurück:
- Retrieves the
attach modelas configured in the manifest.
-
getParserTaggerModel
- Gibt zurück:
- Retrieves the
POSModelas configured in the manifest.
-
getParserChunkerModel
- Gibt zurück:
- Retrieves the
ChunkerModelas configured in the manifest.
-
getHeadRules
- Gibt zurück:
- Retrieves the
HeadRulesas configured in the manifest.
-
updateBuildModel
Instantiates a newParserModelinstance from the existing configuration with the specifiedbuildModelfor exchange.- Parameter:
buildModel- A validMaxentModelused to build.- Gibt zurück:
- A valid
ParserModel.
-
updateCheckModel
Instantiates a newParserModelinstance from the existing configuration with the specifiedcheckModelfor exchange.- Parameter:
checkModel- A validMaxentModelused to check.- Gibt zurück:
- A valid
ParserModel.
-
updateTaggerModel
Instantiates a newParserModelinstance from the existing configuration with the specifiedtaggerModelfor exchange.- Parameter:
taggerModel- A validPOSModelused to tag.- Gibt zurück:
- A valid
ParserModel.
-
updateChunkerModel
Instantiates a newParserModelinstance from the existing configuration with the specifiedchunkModelfor exchange.- Parameter:
chunkModel- A validChunkerModelused to tag.- Gibt zurück:
- A valid
ParserModel.
-
hashCode
public int hashCode() -
equals
-