Class BuildContextGenerator
java.lang.Object
opennlp.tools.parser.AbstractContextGenerator
opennlp.tools.parser.treeinsert.BuildContextGenerator
Creates the features or contexts for the building phase of parsing.
This phase builds constituents from the left-most node of these
constituents.
- See Also:
-
Field Summary
FieldsFields inherited from class AbstractContextGenerator
EOS, punctSet, useLabel, zeroBackOff -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getContext(Object o) String[]getContext(Parse[] constituents, int index) Finds the contexts/features for the decision to build a new constituent for the specified parse at the specifiedindex.Methods inherited from class AbstractContextGenerator
checkcons, checkcons, cons, cons2, cons3, consbo, getFrontierNodes, production, punct, punctbo, surround
-
Field Details
-
leftNodes
-
-
Constructor Details
-
BuildContextGenerator
public BuildContextGenerator()Instantiates aBuildContextGeneratorfor making decisions.
-
-
Method Details
-
getContext
-
getContext
Finds the contexts/features for the decision to build a new constituent for the specified parse at the specifiedindex.- Parameters:
constituents- Theconstituentsof the parse so far.index- The index of the constituent where a build decision is being made.- Returns:
- The contexts/features for the decision to build a new constituent.
-