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
indexintThe index of the sequence.
sequencestring[]The sequence of items over which the beam search is performed.
priorDecisionsstring[]The sequence of decisions made prior to the context for which this decision is being made.
additionalContextobject[]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
indexinttoksstring[]The tokens of the sentence. The ToString() methods of these objects should return the token text.
tagsstring[]The POS tags for the specified tokens.
predsstring[]
Returns
- string[]
An array of predictive contexts on which a model basis its decisions.
GetPrefixes(string)
protected static string[] GetPrefixes(string lex)
Parameters
lexstring
Returns
- string[]
GetSuffixes(string)
protected static string[] GetSuffixes(string lex)
Parameters
lexstring
Returns
- string[]