Class DefaultTokenContextGenerator
Generate events for maxent decisions for tokenization.
public class DefaultTokenContextGenerator : ITokenContextGenerator
- Inheritance
-
DefaultTokenContextGenerator
- Implements
- Inherited Members
Constructors
DefaultTokenContextGenerator()
Creates a default context generator for tokenizer.
public DefaultTokenContextGenerator()
DefaultTokenContextGenerator(ISet<string>)
Creates a default context generator for tokenizer.
public DefaultTokenContextGenerator(ISet<string> inducedAbbreviations)
Parameters
Fields
inducedAbbreviations
protected readonly ISet<string> inducedAbbreviations
Field Value
Methods
AddCharPreds(string, char, IList<string>)
Helper function for getContext.
protected virtual void AddCharPreds(string key, char c, IList<string> preds)
Parameters
CreateContext(string, int)
Returns a list of features for the specified sentence string at the specified index. Extensions of this class can override this method to create a customized ITokenContextGenerator
protected virtual IList<string> CreateContext(string sentence, int index)
Parameters
Returns
GetContext(string, int)
Returns an array of features for the specified sentence string at the specified index.
public virtual string[] GetContext(string sentence, int index)
Parameters
Returns
- string[]
an array of features for the specified sentence string at the specified index.