Class POSEvaluator

Namespace
NOpenNLP.Tools.Postag
Assembly
NOpenNLP.Tools.dll

The POSEvaluator measures the performance of the given IPOSTagger with the provided reference POSSamples.

public class POSEvaluator : Evaluator<POSSample>
Inheritance
POSEvaluator
Inherited Members

Constructors

POSEvaluator(IPOSTagger, params IPOSTaggerEvaluationMonitor?[]?)

Initializes the current instance.

public POSEvaluator(IPOSTagger tagger, params IPOSTaggerEvaluationMonitor?[]? listeners)

Parameters

tagger IPOSTagger

the IPOSTagger to evaluate.

listeners IPOSTaggerEvaluationMonitor[]

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(POSSample)

Evaluates the given reference POSSample object.

This is done by tagging the sentence from the reference POSSample with the IPOSTagger. The tags are then used to update the word accuracy score.

protected override POSSample ProcessSample(POSSample reference)

Parameters

reference POSSample

the reference POSSample.

Returns

POSSample

the predicted POSSample.

ToString()

Represents this objects as human readable string.

public override string ToString()

Returns

string