TokenNameFinderFineGrainedReportListener (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.cmdline.namefind, class: TokenNameFinderFineGrainedReportListener

# Class TokenNameFinderFineGrainedReportListener

java.lang.Object
opennlp.tools.cmdline.FineGrainedReportListener
opennlp.tools.cmdline.namefind.TokenNameFinderFineGrainedReportListener

All Implemented Interfaces:
  `TokenNameFinderEvaluationMonitor, EvaluationMonitor<NameSample>`

public class TokenNameFinderFineGrainedReportListener extends opennlp.tools.cmdline.FineGrainedReportListener implements TokenNameFinderEvaluationMonitor
Generates a detailed report for the NameFinder.

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
  Description
  `TokenNameFinderFineGrainedReportListener(SequenceCodec<String> seqCodec)`
  Creates a listener that will print to the configured `logger`.
  `TokenNameFinderFineGrainedReportListener(SequenceCodec<String> seqCodec, OutputStream outputStream)`
  Creates a listener that prints to a given `OutputStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `correctlyClassified(NameSample reference, NameSample prediction)`
  `Comparator<String>`
  `getLabelComparator(Map<String, opennlp.tools.cmdline.FineGrainedReportListener.Counter> map)`
  `Comparator<String>`
  `getMatrixLabelComparator(Map<String, opennlp.tools.cmdline.FineGrainedReportListener.ConfusionMatrixLine> confusionMatrix)`
  `void`
  `misclassified(NameSample reference, NameSample prediction)`
  `void`
  `writeReport()`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### TokenNameFinderFineGrainedReportListener

    public TokenNameFinderFineGrainedReportListener(SequenceCodec<String> seqCodec)
    Creates a listener that will print to the configured `logger`.

  - ### TokenNameFinderFineGrainedReportListener

    public TokenNameFinderFineGrainedReportListener(SequenceCodec<String> seqCodec, OutputStream outputStream)
    Creates a listener that prints to a given `OutputStream`.

- ## Method Details

  - ### misclassified

    public void misclassified(NameSample reference, NameSample prediction)
    Specified by:
      `misclassified` in interface `EvaluationMonitor<NameSample>`

  - ### correctlyClassified

    public void correctlyClassified(NameSample reference, NameSample prediction)
    Specified by:
      `correctlyClassified` in interface `EvaluationMonitor<NameSample>`

  - ### getMatrixLabelComparator

    public Comparator<String> getMatrixLabelComparator(Map<String, opennlp.tools.cmdline.FineGrainedReportListener.ConfusionMatrixLine> confusionMatrix)
    Overrides:
      `getMatrixLabelComparator` in class `opennlp.tools.cmdline.FineGrainedReportListener`

  - ### getLabelComparator

    public Comparator<String> getLabelComparator(Map<String, opennlp.tools.cmdline.FineGrainedReportListener.Counter> map)
    Overrides:
      `getLabelComparator` in class `opennlp.tools.cmdline.FineGrainedReportListener`

  - ### writeReport

    public void writeReport()
    Specified by:
      `writeReport` in class `opennlp.tools.cmdline.FineGrainedReportListener`