TokenEvaluationErrorListener (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.cmdline.tokenizer

## Class TokenEvaluationErrorListener

- java.lang.Object
- - opennlp.tools.cmdline.EvaluationErrorPrinter<TokenSample>
  - - opennlp.tools.cmdline.tokenizer.TokenEvaluationErrorListener

- All Implemented Interfaces:
    TokenizerEvaluationMonitor, EvaluationMonitor<TokenSample>

      public class TokenEvaluationErrorListener
      extends opennlp.tools.cmdline.EvaluationErrorPrinter<TokenSample>
      implements TokenizerEvaluationMonitor

  A default implementation of `EvaluationMonitor` that prints to an output stream.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenEvaluationErrorListener()` Creates a listener that will print to System.err
    `TokenEvaluationErrorListener(OutputStream outputStream)` Creates a listener that will print to a given `OutputStream`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `missclassified(TokenSample reference, TokenSample prediction)`

    - ### Methods inherited from class opennlp.tools.cmdline.EvaluationErrorPrinter

      `correctlyClassified`

    - ### Methods inherited from class java.lang.Object

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

    - ### Methods inherited from interface opennlp.tools.util.eval.EvaluationMonitor

      `correctlyClassified`

- - ### Constructor Detail

    - #### TokenEvaluationErrorListener

          public TokenEvaluationErrorListener()

      Creates a listener that will print to System.err

    - #### TokenEvaluationErrorListener

          public TokenEvaluationErrorListener(OutputStream outputStream)

      Creates a listener that will print to a given `OutputStream`

  - ### Method Detail

    - #### missclassified

          public void missclassified(TokenSample reference,
                                     TokenSample prediction)

      Specified by:
        `missclassified` in interface `EvaluationMonitor<TokenSample>`
      Specified by:
        `missclassified` in class `opennlp.tools.cmdline.EvaluationErrorPrinter<TokenSample>`

Copyright © 2026 The Apache Software Foundation. All rights reserved.