Package opennlp.tools.doccat
Class DocumentCategorizerEvaluator
The 
DocumentCategorizerEvaluator measures the performance of
 the given DocumentCategorizer with the provided reference
 samples.- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDocumentCategorizerEvaluator(DocumentCategorizer categorizer, DoccatEvaluationMonitor... listeners) Initializes aDocumentCategorizerEvaluatorinstance.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleaccuracy = correctly categorized documents / total documentslongprocessSample(DocumentSample sample) Evaluates the given referencesample.toString()Represents this object as human-readableString.Methods inherited from class opennlp.tools.util.eval.Evaluatorevaluate, evaluateSample
- 
Constructor Details- 
DocumentCategorizerEvaluatorpublic DocumentCategorizerEvaluator(DocumentCategorizer categorizer, DoccatEvaluationMonitor... listeners) Initializes aDocumentCategorizerEvaluatorinstance.- Parameters:
- categorizer- the- DocumentCategorizerinstance.
- listeners- the- evaluation listeners.
 
 
- 
- 
Method Details- 
processSampleEvaluates 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.- Parameters:
- sample- The reference- TokenSample.
- Returns:
- The processed TokenSample.
 
- 
getAccuracypublic double getAccuracy()accuracy = correctly categorized documents / total documents- Returns:
- Retrieves the accuracy of provided DocumentCategorizer.
 
- 
getDocumentCountpublic long getDocumentCount()
- 
toStringRepresents this object as human-readableString.
 
-