Class OnePassRealValueDataIndexer

Namespace
NOpenNLP.Tools.Ml.Model
Assembly
NOpenNLP.Tools.dll

An indexer for maxent model data which handles cutoffs for uncommon contextual predicates and provides a unique integer index for each of the predicates and maintains event values.

public class OnePassRealValueDataIndexer : OnePassDataIndexer, IDataIndexer
Inheritance
OnePassRealValueDataIndexer
Implements
Inherited Members

Properties

Values

Gets the values associated with each event context, or null if integer values are to be used.

public override float[][]? Values { get; }

Property Value

float[][]

Methods

SortAndMerge(IList<ComparableEvent?>, bool)

Sorts and uniques the array of comparable events and return the number of unique events. This method will alter the eventsToCompare array -- it does an in place sort, followed by an in place edit to remove duplicates.

protected override int SortAndMerge(IList<ComparableEvent?> eventsToCompare, bool sort)

Parameters

eventsToCompare IList<ComparableEvent>

a ComparableEvent list

sort bool

whether to sort and merge duplicates

Returns

int

The number of unique events in the specified list.

Exceptions

InsufficientTrainingDataException

if not enough events are provided