public class POSTaggerFineGrainedReportListener extends Object implements POSTaggerEvaluationMonitor
It is possible to use it from an API and access the statistics using the provided getters
Constructor and Description |
---|
POSTaggerFineGrainedReportListener()
Creates a listener that will print to
System.err |
POSTaggerFineGrainedReportListener(OutputStream outputStream)
Creates a listener that prints to a given
OutputStream |
public POSTaggerFineGrainedReportListener()
System.err
public POSTaggerFineGrainedReportListener(OutputStream outputStream)
OutputStream
public void missclassified(POSSample reference, POSSample prediction)
missclassified
in interface EvaluationMonitor<POSSample>
public void correctlyClassified(POSSample reference, POSSample prediction)
correctlyClassified
in interface EvaluationMonitor<POSSample>
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.