org.cogroo.tools.featurizer
Class DefaultFeaturizerContextGenerator
java.lang.Object
org.cogroo.tools.featurizer.DefaultFeaturizerContextGenerator
- All Implemented Interfaces:
- opennlp.tools.util.BeamSearchContextGenerator<WordTag>, FeaturizerContextGenerator
public class DefaultFeaturizerContextGenerator
- extends Object
- implements FeaturizerContextGenerator
A context generator for the Featurizer.
DefaultFeaturizerContextGenerator
public DefaultFeaturizerContextGenerator(String flags)
- Default is shnc
- Parameters:
flags
-
getContext
public String[] getContext(int index,
WordTag[] sequence,
String[] priorDecisions,
Object[] additionalContext)
- Specified by:
getContext
in interface opennlp.tools.util.BeamSearchContextGenerator<WordTag>
getContext
public String[] getContext(int i,
String[] toks,
String[] tags,
String[] preds)
- Returns the context for making a pos tag decision at the specified token
index given the specified tokens and previous tags.
- Specified by:
getContext
in interface FeaturizerContextGenerator
- Parameters:
i
- The index of the token for which the context is provided.toks
- The tokens in the sentence.tags
- pos-tagspreds
- The tags assigned to the previous words in the sentence.
- Returns:
- The context for making a pos tag decision at the specified token
index given the specified tokens and previous tags.
Copyright © 2012-2013 CoGrOO. All Rights Reserved.