Class ConfigurablePOSContextGenerator

Namespace
NOpenNLP.Tools.Postag
Assembly
NOpenNLP.Tools.dll

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

featureGenerator IAdaptiveFeatureGenerator

ConfigurablePOSContextGenerator(int, IAdaptiveFeatureGenerator)

Initializes the current instance.

public ConfigurablePOSContextGenerator(int cacheSize, IAdaptiveFeatureGenerator featureGenerator)

Parameters

cacheSize int
featureGenerator IAdaptiveFeatureGenerator

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

index int

The index of the token for which the context is provided.

tokens string[]

The tokens in the sentence.

tags string[]

The tags assigned to the previous words in the sentence.

additionalContext object[]

Returns

string[]

The context for making a pos tag decision at the specified token index given the specified tokens and previous tags.