Package opennlp.tools.parser.treeinsert
Klasse Parser
java.lang.Object
opennlp.tools.parser.AbstractBottomUpParser
opennlp.tools.parser.treeinsert.Parser
- Alle implementierten Schnittstellen:
Parser
A built-attach
Parser implementation.
Nodes are built when their left-most child is encountered. Subsequent children are attached as daughters. Attachment is based on node in the right-frontier of the tree. After each attachment or building, nodes are assessed as either complete or incomplete. Complete nodes are no longer eligible for daughter attachment.
Complex modifiers which produce additional node levels of the same type are attached with sister-adjunction. Attachment can not take place higher in the right-frontier than an incomplete node.
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final StringOutcome used when a node should be attached as a daughter to another node.static final StringOutcome used when a node should be attached as a sister to another node.static final StringLabel used to distinguish build nodes from non-built nodes.static final StringOutcome used when a constituent needs an no additional parent node/building.static final StringOutcome used when a node should not be attached to another node.Von Klasse geerbte Felder opennlp.tools.parser.AbstractBottomUpParser
COMPLETE, CONT, defaultAdvancePercentage, defaultBeamSize, INC_NODE, INCOMPLETE, OTHER, START, TOK_NODE, TOP_NODE -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungParser(ParserModel model) Instantiates aParservia a givenmodel.Parser(ParserModel model, int beamSize, double advancePercentage) Instantiates aParservia a givenmodeland other configuration parameters. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetRightFrontier(Parse root, Set<String> punctSet) Returns the right frontier of the specifiedtreewith nodes ordered from deepest to shallowest.static ParserModeltrain(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cutoff) Starts a training of aParserModel.static ParserModeltrain(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) Starts a training of aParserModel.Von Klasse geerbte Methoden opennlp.tools.parser.AbstractBottomUpParser
buildDictionary, buildDictionary, collapsePunctuation, parse, parse, setErrorReporting, setParents
-
Felddetails
-
DONE
Outcome used when a constituent needs an no additional parent node/building.- Siehe auch:
-
ATTACH_SISTER
Outcome used when a node should be attached as a sister to another node.- Siehe auch:
-
ATTACH_DAUGHTER
Outcome used when a node should be attached as a daughter to another node.- Siehe auch:
-
NON_ATTACH
Outcome used when a node should not be attached to another node.- Siehe auch:
-
BUILT
Label used to distinguish build nodes from non-built nodes.- Siehe auch:
-
-
Konstruktordetails
-
Parser
Instantiates aParservia a givenmodeland other configuration parameters. Uses the default implementations ofPOSTaggerMEandChunkerME.- Parameter:
model- TheParserModelto 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 topadvancePercentagewill be explored.- Löst aus:
IllegalStateException- Thrown if theParserTypeis not supported.- Siehe auch:
-
Parser
Instantiates aParservia a givenmodel. Uses the default implementations ofPOSTaggerMEandChunkerMEand default values forbeamSizeandadvancePercentage.- Parameter:
model- TheParserModelto use.- Löst aus:
IllegalStateException- Thrown if theParserTypeis not supported.- Siehe auch:
-
-
Methodendetails
-
getRightFrontier
Returns the right frontier of the specifiedtreewith nodes ordered from deepest to shallowest.- Parameter:
root- Therootof the parse tree.punctSet- A set of punctuation symbols to be used.- Gibt zurück:
- The right frontier of the specified parse tree.
-
train
public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) throws IOException Starts a training of aParserModel.- Parameter:
languageCode- An ISO conform language code.parseSamples- Thesamplesas input.rules- TheHeadRulesto use.mlParams- Theparametersfor training.- Gibt zurück:
- A valid
ParserModel. - Löst aus:
IOException- Thrown if IO errors occurred during training.
-
train
public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cutoff) throws IOException Starts a training of aParserModel.- Parameter:
languageCode- An ISO conform language code.parseSamples- Thesamplesas input.rules- TheHeadRulesto use.iterations- The number of iterations to be conducted.cutoff- The cut-off parameter to be used.- Gibt zurück:
- A valid
ParserModel. - Löst aus:
IOException- Thrown if IO errors occurred during training.
-