opennlp.tools.chunker
Class ChunkerEvaluator

java.lang.Object
  extended by opennlp.tools.util.eval.Evaluator<ChunkSample>
      extended by opennlp.tools.chunker.ChunkerEvaluator

public class ChunkerEvaluator
extends Evaluator<ChunkSample>

The ChunkerEvaluator measures the performance of the given Chunker with the provided reference ChunkSamples.

See Also:
Evaluator, Chunker, ChunkSample

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

Constructor Detail

ChunkerEvaluator

public ChunkerEvaluator(Chunker chunker)
Initializes the current instance with the given Chunker.

Parameters:
chunker - the Chunker to evaluate.
Method Detail

evaluateSample

public void evaluateSample(ChunkSample reference)
Evaluates the given reference ChunkSample object. This is done by finding the phrases with the Chunker in the sentence from the reference ChunkSample. The found phrases are then used to calculate and update the scores.

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

getFMeasure

public FMeasure getFMeasure()


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.