Package opennlp.tools.parser.chunking
Class BuildContextGenerator
java.lang.Object
opennlp.tools.parser.AbstractContextGenerator
opennlp.tools.parser.chunking.BuildContextGenerator
Generates predictive contexts for deciding how constituents should be combined.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionInstantiates aBuildContextGeneratorfor making decisions about combining constituents.Instantiates aBuildContextGeneratorfor making decisions about combining constituents using aDictionary.
- 
Method SummaryModifier and TypeMethodDescriptionString[]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 Details- 
BuildContextGeneratorpublic BuildContextGenerator()Instantiates aBuildContextGeneratorfor making decisions about combining constituents.
- 
BuildContextGeneratorInstantiates aBuildContextGeneratorfor making decisions about combining constituents using aDictionary.- Parameters:
- dict- A- Dictionaryto be used during context generation.
 
 
- 
- 
Method Details- 
getContext
- 
getContextFinds the predictive context used to determine how constituent at the specifiedindexshould be combined with other constituents.- Parameters:
- constituents- The- constituentswhich 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.
 
 
-