org.cogroo.tools.featurizer
Class FeaturizerEvaluator

java.lang.Object
  extended by opennlp.tools.util.eval.Evaluator<FeatureSample>
      extended by org.cogroo.tools.featurizer.FeaturizerEvaluator

public class FeaturizerEvaluator
extends opennlp.tools.util.eval.Evaluator<FeatureSample>

The FeaturizerEvaluator measures the performance of the given Featurizer with the provided reference FeatureSamples.

See Also:
Evaluator, Featurizer, FeatureSample

Constructor Summary
FeaturizerEvaluator(Featurizer featurizer, FeaturizerEvaluationMonitor... listeners)
          Initializes the current instance with the given Featurizer.
 
Method Summary
 double getWordAccuracy()
          Retrieves the word accuracy.
 long getWordCount()
          Retrieves the total number of words considered in the evaluation.
 
Methods inherited from class opennlp.tools.util.eval.Evaluator
evaluate, evaluateSample
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeaturizerEvaluator

public FeaturizerEvaluator(Featurizer featurizer,
                           FeaturizerEvaluationMonitor... listeners)
Initializes the current instance with the given Featurizer.

Parameters:
featurizer - the Featurizer to evaluate.
listeners - evaluation listeners
Method Detail

getWordAccuracy

public double getWordAccuracy()
Retrieves the word accuracy. This is defined as: word accuracy = correctly detected tags / total words

Returns:
the word accuracy

getWordCount

public long getWordCount()
Retrieves the total number of words considered in the evaluation.

Returns:
the word count


Copyright © 2012-2013 CoGrOO. All Rights Reserved.