Class DependencyEvaluationErrorListener

java.lang.Object
opennlp.tools.cmdline.EvaluationErrorPrinter<opennlp.tools.depparse.DependencySample>
opennlp.tools.cmdline.depparse.DependencyEvaluationErrorListener
All Implemented Interfaces:
opennlp.tools.depparse.DependencyEvaluationMonitor, opennlp.tools.util.eval.EvaluationMonitor<opennlp.tools.depparse.DependencySample>

public class DependencyEvaluationErrorListener extends opennlp.tools.cmdline.EvaluationErrorPrinter<opennlp.tools.depparse.DependencySample> implements opennlp.tools.depparse.DependencyEvaluationMonitor
A DependencyEvaluationMonitor that prints each misparsed sentence next to its gold tree, in the five-column form of DependencySample.toString().
  • Constructor Details

    • DependencyEvaluationErrorListener

      public DependencyEvaluationErrorListener()
      Creates a listener that prints to the logger of this class.
    • DependencyEvaluationErrorListener

      public DependencyEvaluationErrorListener(OutputStream outputStream)
      Creates a listener that prints to the given OutputStream.
      Parameters:
      outputStream - The stream to print to. Must not be null.
  • Method Details

    • misclassified

      public void misclassified(opennlp.tools.depparse.DependencySample reference, opennlp.tools.depparse.DependencySample prediction)

      Prints the reference sample and the prediction.

      Specified by:
      misclassified in interface opennlp.tools.util.eval.EvaluationMonitor<opennlp.tools.depparse.DependencySample>
      Specified by:
      misclassified in class opennlp.tools.cmdline.EvaluationErrorPrinter<opennlp.tools.depparse.DependencySample>