Class DefaultLemmatizerContextGenerator

Namespace
NOpenNLP.Tools.Lemmatizer
Assembly
NOpenNLP.Tools.dll

Simple feature generator for learning statistical lemmatizers. Features based on Grzegorz Chrupała. 2008. Towards a Machine-Learning Architecture for Lexical Functional Grammar Parsing. PhD dissertation, Dublin City University

public class DefaultLemmatizerContextGenerator : ILemmatizerContextGenerator, IBeamSearchContextGenerator<string>
Inheritance
DefaultLemmatizerContextGenerator
Implements
Inherited Members

Remarks

Version 2016-02-15.

Methods

GetContext(int, string[], string[], object[])

Returns the context for the specified position in the specified sequence (list).

public virtual string[] GetContext(int index, string[] sequence, string[] priorDecisions, object[] additionalContext)

Parameters

index int

The index of the sequence.

sequence string[]

The sequence of items over which the beam search is performed.

priorDecisions string[]

The sequence of decisions made prior to the context for which this decision is being made.

additionalContext object[]

Any addition context specific to a class implementing this interface.

Returns

string[]

the context for the specified position in the specified sequence.

GetContext(int, string[], string[], string[])

Returns the contexts for lemmatizing of the specified index.

public virtual string[] GetContext(int index, string[] toks, string[] tags, string[] preds)

Parameters

index int
toks string[]

The tokens of the sentence. The ToString() methods of these objects should return the token text.

tags string[]

The POS tags for the specified tokens.

preds string[]

Returns

string[]

An array of predictive contexts on which a model basis its decisions.

GetPrefixes(string)

protected static string[] GetPrefixes(string lex)

Parameters

lex string

Returns

string[]

GetSuffixes(string)

protected static string[] GetSuffixes(string lex)

Parameters

lex string

Returns

string[]