Package opennlp.tools.doccat
Klasse DocumentCategorizerEvaluator
The
DocumentCategorizerEvaluator
measures the performance of
the given DocumentCategorizer
with the provided reference
samples
.- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDocumentCategorizerEvaluator
(DocumentCategorizer categorizer, DoccatEvaluationMonitor... listeners) Initializes aDocumentCategorizerEvaluator
instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdouble
accuracy = correctly categorized documents / total documents
long
processSample
(DocumentSample sample) Evaluates the given referencesample
.toString()
Represents this object as human-readableString
.Von Klasse geerbte Methoden opennlp.tools.util.eval.Evaluator
evaluate, evaluateSample
-
Konstruktordetails
-
DocumentCategorizerEvaluator
public DocumentCategorizerEvaluator(DocumentCategorizer categorizer, DoccatEvaluationMonitor... listeners) Initializes aDocumentCategorizerEvaluator
instance.- Parameter:
categorizer
- theDocumentCategorizer
instance.listeners
- theevaluation listeners
.
-
-
Methodendetails
-
processSample
Evaluates the given referencesample
.This is done by categorizing the document from the provided
DocumentSample
. The detected category is then used to calculate and update the score.- Parameter:
sample
- The referenceTokenSample
.- Gibt zurück:
- The processed
TokenSample
.
-
getAccuracy
public double getAccuracy()accuracy = correctly categorized documents / total documents
- Gibt zurück:
- Retrieves the accuracy of provided
DocumentCategorizer
.
-
getDocumentCount
public long getDocumentCount() -
toString
Represents this object as human-readableString
.
-