Class SentimentContextGenerator
java.lang.Object
opennlp.tools.sentiment.SentimentContextGenerator
- All Implemented Interfaces:
opennlp.tools.util.BeamSearchContextGenerator<String>
-
Constructor Summary
ConstructorsConstructorDescriptionSentimentContextGenerator(opennlp.tools.util.featuregen.AdaptiveFeatureGenerator[] featureGenerators) -
Method Summary
Modifier and TypeMethodDescriptionString[]getContext(int index, String[] sequence, String[] priorDecisions, Object[] additionalContext) Returns the context.String[]getContext(String[] text) Returns the contextvoidupdateAdaptiveData(String[] tokens, String[] outcomes)
-
Constructor Details
-
SentimentContextGenerator
public SentimentContextGenerator() -
SentimentContextGenerator
public SentimentContextGenerator(opennlp.tools.util.featuregen.AdaptiveFeatureGenerator[] featureGenerators)
-
-
Method Details
-
getContext
-
getContext
public String[] getContext(int index, String[] sequence, String[] priorDecisions, Object[] additionalContext) Returns the context.- Specified by:
getContextin interfaceopennlp.tools.util.BeamSearchContextGenerator<String>- Parameters:
index- the index of the contextsequence- String sequence givenpriorDecisions- decisions given earlieradditionalContext- any additional context- Returns:
- the context
-
updateAdaptiveData
-