Class DefaultPOSContextGenerator
A context generator for the POS Tagger.
public class DefaultPOSContextGenerator : IPOSContextGenerator, IBeamSearchContextGenerator<string>
- Inheritance
-
DefaultPOSContextGenerator
- Implements
- Inherited Members
Constructors
DefaultPOSContextGenerator(Dictionary?)
Initializes the current instance.
public DefaultPOSContextGenerator(Dictionary? dict)
Parameters
dictDictionary
DefaultPOSContextGenerator(int, Dictionary?)
Initializes the current instance.
public DefaultPOSContextGenerator(int cacheSize, Dictionary? dict)
Parameters
cacheSizeintdictDictionary
Fields
SB
protected const string SB = "*SB*"
Field Value
SE
protected const string SE = "*SE*"
Field Value
Methods
GetContext(int, object[], string[])
Returns the context for making a pos tag decision at the specified token index given the specified tokens and previous tags.
public virtual string[] GetContext(int index, object[] tokens, string[] tags)
Parameters
indexintThe index of the token for which the context is provided.
tokensobject[]The tokens in the sentence.
tagsstring[]The tags assigned to the previous words in the sentence.
Returns
- string[]
The context for making a pos tag decision at the specified token index given the specified tokens and previous tags.
GetContext(int, string[], string[], object[]?)
public virtual string[] GetContext(int index, string[] sequence, string[] priorDecisions, object[]? additionalContext)
Parameters
Returns
- string[]
GetPrefixes(string)
protected static string[] GetPrefixes(string lex)
Parameters
lexstring
Returns
- string[]
GetSuffixes(string)
protected static string[] GetSuffixes(string lex)
Parameters
lexstring
Returns
- string[]