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

opennlp.tools.cmdline.doccat

## Class DoccatFineGrainedReportListener

- java.lang.Object
- - opennlp.tools.cmdline.FineGrainedReportListener
  - - opennlp.tools.cmdline.doccat.DoccatFineGrainedReportListener

- All Implemented Interfaces:
    DoccatEvaluationMonitor, EvaluationMonitor<DocumentSample>

      public class DoccatFineGrainedReportListener
      extends opennlp.tools.cmdline.FineGrainedReportListener
      implements DoccatEvaluationMonitor

  Generates a detailed report for the POS Tagger.

  It is possible to use it from an API and access the statistics using the provided getters

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class opennlp.tools.cmdline.FineGrainedReportListener

      `opennlp.tools.cmdline.FineGrainedReportListener.ConfusionMatrixLine, opennlp.tools.cmdline.FineGrainedReportListener.Counter, opennlp.tools.cmdline.FineGrainedReportListener.GroupedLabelComparator, opennlp.tools.cmdline.FineGrainedReportListener.GroupedMatrixLabelComparator, opennlp.tools.cmdline.FineGrainedReportListener.MatrixLabelComparator, opennlp.tools.cmdline.FineGrainedReportListener.SimpleLabelComparator, opennlp.tools.cmdline.FineGrainedReportListener.Stats`

  - ### Constructor Summary

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

  - ### Method Summary

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

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

      `getLabelComparator, getMatrixLabelComparator`

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

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

- - ### Constructor Detail

    - #### DoccatFineGrainedReportListener

          public DoccatFineGrainedReportListener()

      Creates a listener that will print to `System.err`

    - #### DoccatFineGrainedReportListener

          public DoccatFineGrainedReportListener(OutputStream outputStream)

      Creates a listener that prints to a given `OutputStream`

  - ### Method Detail

    - #### missclassified

          public void missclassified(DocumentSample reference,
                                     DocumentSample prediction)

      Specified by:
        `missclassified` in interface `EvaluationMonitor<DocumentSample>`

    - #### correctlyClassified

          public void correctlyClassified(DocumentSample reference,
                                          DocumentSample prediction)

      Specified by:
        `correctlyClassified` in interface `EvaluationMonitor<DocumentSample>`

    - #### writeReport

          public void writeReport()

      Specified by:
        `writeReport` in class `opennlp.tools.cmdline.FineGrainedReportListener`

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