public class DocumentClassifierEvaluator extends opennlp.tools.util.eval.Evaluator<DocSample>
DocumentClassifierEvaluator measures the performance of
the given DocumentClassifier with the provided reference
DocSamples.DocumentClassifier,
DocSample| Constructor and Description |
|---|
DocumentClassifierEvaluator(DocumentClassifier classifier,
DocumentClassifierEvaluationMonitor... listeners)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAccuracy()
Retrieves the accuracy of provided
DocumentClassifier. |
long |
getDocumentCount() |
DocSample |
processSample(DocSample sample)
Evaluates the given reference
DocSample object. |
String |
toString()
Represents this objects as human readable
String. |
public DocumentClassifierEvaluator(DocumentClassifier classifier, DocumentClassifierEvaluationMonitor... listeners)
classifier - the document classifier instancelisteners - the listenerspublic double getAccuracy()
DocumentClassifier.
accuracy = correctly categorized documents / total documentspublic long getDocumentCount()
Copyright © 2017 IXA pipes. All rights reserved.