Class ConfigurablePOSContextGenerator
A context generator for the POS Tagger.
public class ConfigurablePOSContextGenerator : IPOSContextGenerator, IBeamSearchContextGenerator<string>
- Inheritance
-
ConfigurablePOSContextGenerator
- Implements
- Inherited Members
Constructors
ConfigurablePOSContextGenerator(IAdaptiveFeatureGenerator)
Initializes the current instance.
public ConfigurablePOSContextGenerator(IAdaptiveFeatureGenerator featureGenerator)
Parameters
featureGeneratorIAdaptiveFeatureGenerator
ConfigurablePOSContextGenerator(int, IAdaptiveFeatureGenerator)
Initializes the current instance.
public ConfigurablePOSContextGenerator(int cacheSize, IAdaptiveFeatureGenerator featureGenerator)
Parameters
cacheSizeintfeatureGeneratorIAdaptiveFeatureGenerator
Methods
GetContext(int, string[], string[], object[]?)
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, string[] tokens, string[] tags, object[]? additionalContext)
Parameters
indexintThe index of the token for which the context is provided.
tokensstring[]The tokens in the sentence.
tagsstring[]The tags assigned to the previous words in the sentence.
additionalContextobject[]
Returns
- string[]
The context for making a pos tag decision at the specified token index given the specified tokens and previous tags.