Package opennlp.tools.parser.chunking
Class Parser
java.lang.Object
opennlp.tools.parser.AbstractBottomUpParser
opennlp.tools.parser.chunking.Parser
- All Implemented Interfaces:
- Parser
A shift reduce style 
Parser implementation
 based on Adwait Ratnaparkhi's 1998 thesis.- See Also:
- 
Field SummaryFields inherited from class opennlp.tools.parser.AbstractBottomUpParserCOMPLETE, CONT, defaultAdvancePercentage, defaultBeamSize, INC_NODE, INCOMPLETE, OTHER, START, TOK_NODE, TOP_NODE
- 
Constructor SummaryConstructorsConstructorDescriptionParser(ParserModel model) Instantiates aParservia a givenmodel.Parser(ParserModel model, int beamSize, double advancePercentage) Instantiates aParservia a givenmodeland other configuration parameters.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic ParserModeltrain(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) Starts a training of aParserModel.Methods inherited from class opennlp.tools.parser.AbstractBottomUpParserbuildDictionary, buildDictionary, collapsePunctuation, parse, parse, setErrorReporting, setParents
- 
Constructor Details- 
ParserInstantiates aParservia a givenmodeland other configuration parameters. Uses the default implementations ofPOSTaggerMEandChunkerME.- Parameters:
- model- The- ParserModelto use.
- beamSize- The number of different parses kept during parsing.
- advancePercentage- The minimal amount of probability mass which advanced outcomes must represent. Only outcomes which contribute to the top- advancePercentagewill be explored.
- Throws:
- IllegalStateException- Thrown if the- ParserTypeis not supported.
- See Also:
 
- 
ParserInstantiates aParservia a givenmodel. Uses the default implementations ofPOSTaggerMEandChunkerMEand default values forbeamSizeandadvancePercentage.- Parameters:
- model- The- ParserModelto use.
- Throws:
- IllegalStateException- Thrown if the- ParserTypeis not supported.
- See Also:
 
 
- 
- 
Method Details- 
mergeReportIntoManifest
- 
trainpublic static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) throws IOException Starts a training of aParserModel.- Parameters:
- languageCode- An ISO conform language code.
- parseSamples- The- samplesas input.
- rules- The- HeadRulesto use.
- mlParams- The- parametersfor training.
- Returns:
- A valid ParserModel.
- Throws:
- IOException- Thrown if IO errors occurred during training.
 
 
-