Class AttachContextGenerator
java.lang.Object
opennlp.tools.parser.AbstractContextGenerator
opennlp.tools.parser.treeinsert.AttachContextGenerator
Generates predictive contexts for deciding how constituents should be attached.
- See Also:
-
Field Summary
Fields inherited from class AbstractContextGenerator
EOS, punctSet, useLabel, zeroBackOff -
Constructor Summary
ConstructorsConstructorDescriptionAttachContextGenerator(Set<String> punctSet) Instantiates anAttachContextGeneratorfor making decisions about attachments. -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancontainsPunct(Collection<Parse> puncts, String punct) String[]getContext(Object o) String[]getContext(Parse[] constituents, int index, List<Parse> rightFrontier, int rfi) Finds the predictive contextual features about an attachment.Methods inherited from class AbstractContextGenerator
checkcons, checkcons, cons, cons2, cons3, consbo, getFrontierNodes, production, punct, punctbo, surround
-
Constructor Details
-
AttachContextGenerator
Instantiates anAttachContextGeneratorfor making decisions about attachments.
-
-
Method Details
-
getContext
-
containsPunct
-
getContext
Finds the predictive contextual features about an attachment.- Parameters:
constituents- Theconstituentsas they have been constructed so far.index- The constituent index of the node being attached.rightFrontier- The nodes which have been not attach to so far.- Returns:
- A set of contextual features about this attachment.
-