Class LemmatizerEvaluator
- Namespace
- NOpenNLP.Tools.Lemmatizer
- Assembly
- NOpenNLP.Tools.dll
The LemmatizerEvaluator measures the performance of the given ILemmatizer with the provided reference LemmaSamples.
public class LemmatizerEvaluator : Evaluator<LemmaSample>
- Inheritance
-
LemmatizerEvaluator
- Inherited Members
Constructors
LemmatizerEvaluator(ILemmatizer, params ILemmatizerEvaluationMonitor?[]?)
Initializes the current instance.
public LemmatizerEvaluator(ILemmatizer aLemmatizer, params ILemmatizerEvaluationMonitor?[]? listeners)
Parameters
aLemmatizerILemmatizera lemmatizer
listenersILemmatizerEvaluationMonitor[]an array of evaluation listeners
Properties
WordAccuracy
Retrieves the word accuracy.
This is defined as: word accuracy = correctly detected tags / total words
public virtual double WordAccuracy { get; }
Property Value
WordCount
Retrieves the total number of words considered in the evaluation.
public virtual long WordCount { get; }
Property Value
Methods
ProcessSample(LemmaSample)
Evaluates the given reference LemmaSample object.
This is done by tagging the sentence from the reference LemmaSample with the ILemmatizer. The tags are then used to update the word accuracy score.
protected override LemmaSample ProcessSample(LemmaSample reference)
Parameters
referenceLemmaSamplethe reference LemmaSample.
Returns
- LemmaSample
the predicted LemmaSample.
ToString()
Represents this objects as human readable string.
public override string ToString()