opennlp.tools.tokenize
Class TokenizerEvaluator

java.lang.Object
  extended by opennlp.tools.util.eval.Evaluator<TokenSample>
      extended by opennlp.tools.tokenize.TokenizerEvaluator

public class TokenizerEvaluator
extends Evaluator<TokenSample>

The TokenizerEvaluator measures the performance of the given Tokenizer with the provided reference TokenSamples.

See Also:
Evaluator, Tokenizer, TokenSample

Constructor Summary
TokenizerEvaluator(Tokenizer tokenizer)
          Initializes the current instance with the given Tokenizer.
 
Method Summary
 void evaluateSample(TokenSample reference)
          Evaluates the given reference TokenSample object.
 FMeasure getFMeasure()
           
 
Methods inherited from class opennlp.tools.util.eval.Evaluator
evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenizerEvaluator

public TokenizerEvaluator(Tokenizer tokenizer)
Initializes the current instance with the given Tokenizer.

Parameters:
tokenizer - the Tokenizer to evaluate.
Method Detail

evaluateSample

public void evaluateSample(TokenSample reference)
Evaluates the given reference TokenSample object. This is done by detecting the token spans with the Tokenizer. The detected token spans are then used to calculate calculate and update the scores.

Specified by:
evaluateSample in class Evaluator<TokenSample>
Parameters:
reference - the reference TokenSample.

getFMeasure

public FMeasure getFMeasure()


Copyright © 2010. All Rights Reserved.