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 aDocumentCategorizerEvaluatorinstance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdoubleaccuracy = correctly categorized documents / total documentslongprocessSample(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 aDocumentCategorizerEvaluatorinstance.- Parameter:
categorizer- theDocumentCategorizerinstance.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.
-