LemmatizerEvaluator (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.lemmatizer, class: LemmatizerEvaluator

# Class LemmatizerEvaluator

java.lang.Object
opennlp.tools.util.eval.Evaluator<LemmaSample>
opennlp.tools.lemmatizer.LemmatizerEvaluator

public class LemmatizerEvaluator extends Evaluator<LemmaSample>
The `LemmatizerEvaluator` measures the performance of the given `Lemmatizer` with the provided reference `samples`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LemmatizerEvaluator(Lemmatizer aLemmatizer, LemmatizerEvaluationMonitor... listeners)`
  Initializes a `LemmatizerEvaluator` instance with the given `Lemmatizer`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `getWordAccuracy()`
  Accuracy is defined as: `word accuracy = correctly detected tags / total words`
  `long`
  `getWordCount()`
  `String`
  `toString()`
  Returns this object's human-readable `String` representation.

  ### Methods inherited from class Evaluator

  `evaluate, evaluateSample`

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### LemmatizerEvaluator

    public LemmatizerEvaluator(Lemmatizer aLemmatizer, LemmatizerEvaluationMonitor... listeners)
    Initializes a `LemmatizerEvaluator` instance with the given `Lemmatizer`.
    Parameters:
      `aLemmatizer` - The `Lemmatizer` to evaluate.
      `listeners` - The `evaluation listeners`.

- ## Method Details

  - ### getWordAccuracy

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

  - ### getWordCount

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

  - ### toString

    public String toString()
    Returns this object's human-readable `String` representation.
    Overrides:
      `toString` in class `Object`