org.cogroo.tools.featurizer
Class DefaultFeaturizerContextGenerator

java.lang.Object
  extended by 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.


Constructor Summary
DefaultFeaturizerContextGenerator(String flags)
          Default is shnc
 
Method Summary
 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.
 String[] getContext(int index, WordTag[] sequence, String[] priorDecisions, Object[] additionalContext)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFeaturizerContextGenerator

public DefaultFeaturizerContextGenerator(String flags)
Default is shnc

Parameters:
flags -
Method Detail

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-tags
preds - 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.