Class LemmatizerEvaluator
The
LemmatizerEvaluator measures the performance of
the given Lemmatizer with the provided reference
samples.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLemmatizerEvaluator(Lemmatizer aLemmatizer, LemmatizerEvaluationMonitor... listeners) Initializes aLemmatizerEvaluatorinstance with the givenLemmatizer. -
Method Summary
Modifier and TypeMethodDescriptiondoubleAccuracy is defined as:word accuracy = correctly detected tags / total wordslongprotected LemmaSampleprocessSample(LemmaSample reference) Evaluates the given referenceLemmaSampleobject.toString()Returns this object's human-readableStringrepresentation.Methods inherited from class Evaluator
evaluate, evaluateSample
-
Field Details
-
lemmatizer
-
wordAccuracy
-
-
Constructor Details
-
LemmatizerEvaluator
Initializes aLemmatizerEvaluatorinstance with the givenLemmatizer.- Parameters:
aLemmatizer- TheLemmatizerto evaluate.listeners- Theevaluation listeners.
-
-
Method Details
-
processSample
Evaluates the given referenceLemmaSampleobject.This is done by tagging the sentence from the reference
LemmaSamplewith theLemmatizer. The tags are then used to update the word accuracy score.- Specified by:
processSamplein classEvaluator<LemmaSample>- Parameters:
reference- the referenceLemmaSample.- Returns:
- The predicted
LemmaSample.
-
getWordAccuracy
public double getWordAccuracy()Accuracy is defined as:word accuracy = correctly detected tags / total words- Returns:
- Retrieves the word accuracy.
-
getWordCount
public long getWordCount()- Returns:
- Retrieves the total number of words considered in the evaluation.
-
toString
-