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

aLemmatizer ILemmatizer

a lemmatizer

listeners ILemmatizerEvaluationMonitor[]

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

double

WordCount

Retrieves the total number of words considered in the evaluation.

public virtual long WordCount { get; }

Property Value

long

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

reference LemmaSample

the reference LemmaSample.

Returns

LemmaSample

the predicted LemmaSample.

ToString()

Represents this objects as human readable string.

public override string ToString()

Returns

string