public class LemmatizerFineGrainedReportListener extends Object implements LemmatizerEvaluationMonitor
It is possible to use it from an API and access the statistics using the provided getters.
Constructor and Description |
---|
LemmatizerFineGrainedReportListener()
Creates a listener that will print to
System.err |
LemmatizerFineGrainedReportListener(OutputStream outputStream)
Creates a listener that prints to a given
OutputStream |
public LemmatizerFineGrainedReportListener()
System.err
public LemmatizerFineGrainedReportListener(OutputStream outputStream)
OutputStream
public void missclassified(LemmaSample reference, LemmaSample prediction)
missclassified
in interface EvaluationMonitor<LemmaSample>
public void correctlyClassified(LemmaSample reference, LemmaSample prediction)
correctlyClassified
in interface EvaluationMonitor<LemmaSample>
public void writeReport()
OutputStream
. Should be called only after
the evaluation processpublic long getNumberOfSentences()
public double getAverageSentenceSize()
public int getMinSentenceSize()
public int getMaxSentenceSize()
public int getNumberOfTags()
public double getAccuracy()
public double getTokenAccuracy(String token)
public int getTokenFrequency(String token)
public int getTokenErrors(String token)
public int getTagFrequency(String tag)
public int getTagErrors(String tag)
public double getTagPrecision(String tag)
public double getTagRecall(String tag)
public double getTagFMeasure(String tag)
public double[][] getConfusionMatrix()
public double[][] getConfusionMatrix(String token)
Copyright © 2017 The Apache Software Foundation. All rights reserved.