Class POSTaggerCrossValidator

Namespace
NOpenNLP.Tools.Postag
Assembly
NOpenNLP.Tools.dll
public class POSTaggerCrossValidator
Inheritance
POSTaggerCrossValidator
Inherited Members

Constructors

POSTaggerCrossValidator(string, TrainingParameters, POSTaggerFactory, params IPOSTaggerEvaluationMonitor?[]?)

Creates a POSTaggerCrossValidator using the given POSTaggerFactory.

public POSTaggerCrossValidator(string languageCode, TrainingParameters trainParam, POSTaggerFactory factory, params IPOSTaggerEvaluationMonitor?[]? listeners)

Parameters

languageCode string
trainParam TrainingParameters
factory POSTaggerFactory
listeners IPOSTaggerEvaluationMonitor[]

POSTaggerCrossValidator(string, TrainingParameters, FileInfo?, byte[]?, Dictionary<string, object>?, int?, string?, params IPOSTaggerEvaluationMonitor?[]?)

Creates a POSTaggerCrossValidator that builds a ngram dictionary dynamically. It instantiates a sub-class of POSTaggerFactory using the tag and the ngram dictionaries.

public POSTaggerCrossValidator(string languageCode, TrainingParameters trainParam, FileInfo? tagDictionary, byte[]? featureGeneratorBytes, Dictionary<string, object>? resources, int? tagdicCutoff, string? factoryClass, params IPOSTaggerEvaluationMonitor?[]? listeners)

Parameters

languageCode string
trainParam TrainingParameters
tagDictionary FileInfo
featureGeneratorBytes byte[]
resources Dictionary<string, object>
tagdicCutoff int?
factoryClass string
listeners IPOSTaggerEvaluationMonitor[]

Properties

WordAccuracy

Retrieves the accuracy for all iterations.

public virtual double WordAccuracy { get; }

Property Value

double

WordCount

Retrieves the number of words which where validated over all iterations. The result is the amount of folds multiplied by the total number of words.

public virtual long WordCount { get; }

Property Value

long

Methods

Evaluate(IObjectStream<POSSample?>, int)

Starts the evaluation.

public virtual void Evaluate(IObjectStream<POSSample?> samples, int nFolds)

Parameters

samples IObjectStream<POSSample>

the data to train and test

nFolds int

number of folds

Exceptions

IOException

IOException