Package opennlp.tools.parser.chunking
Class BuildContextGenerator
- java.lang.Object
-
- opennlp.tools.parser.AbstractContextGenerator
-
- opennlp.tools.parser.chunking.BuildContextGenerator
-
public class BuildContextGenerator extends AbstractContextGenerator
Generates predictive contexts for deciding how constituents should be combined.- See Also:
AbstractContextGenerator
-
-
Constructor Summary
Constructors Constructor Description BuildContextGenerator()Instantiates aBuildContextGeneratorfor making decisions about combining constituents.BuildContextGenerator(Dictionary dict)Instantiates aBuildContextGeneratorfor making decisions about combining constituents using aDictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getContext(Object o)String[]getContext(Parse[] constituents, int index)Finds the predictive context used to determine how constituent at the specifiedindexshould be combined with other constituents.
-
-
-
Constructor Detail
-
BuildContextGenerator
public BuildContextGenerator()
Instantiates aBuildContextGeneratorfor making decisions about combining constituents.
-
BuildContextGenerator
public BuildContextGenerator(Dictionary dict)
Instantiates aBuildContextGeneratorfor making decisions about combining constituents using aDictionary.- Parameters:
dict- ADictionaryto be used during context generation.
-
-
Method Detail
-
getContext
public String[] getContext(Parse[] constituents, int index)
Finds the predictive context used to determine how constituent at the specifiedindexshould be combined with other constituents.- Parameters:
constituents- Theconstituentswhich have yet to be combined into new constituents.index- The index of the constituent which is being considered.- Returns:
- The context for building constituents at the specified
index.
-
-