Class DefaultPOSSequenceValidator

Namespace
NOpenNLP.Tools.Postag
Assembly
NOpenNLP.Tools.dll
public class DefaultPOSSequenceValidator : ISequenceValidator<string>
Inheritance
DefaultPOSSequenceValidator
Implements
Inherited Members

Constructors

DefaultPOSSequenceValidator(ITagDictionary?)

public DefaultPOSSequenceValidator(ITagDictionary? tagDictionary)

Parameters

tagDictionary ITagDictionary

Methods

ValidSequence(int, string[], string[], string)

Determines whether a particular continuation of a sequence is valid. This is used to restrict invalid sequences such as those used in start/continue tag-based chunking or could be used to implement tag dictionary restrictions.

public virtual bool ValidSequence(int i, string[] inputSequence, string[] outcomesSequence, string outcome)

Parameters

i int

The index in the input sequence for which the new outcome is being proposed.

inputSequence string[]

The input sequence.

outcomesSequence string[]

The outcomes so far in this sequence.

outcome string

The next proposed outcome for the outcomes sequence.

Returns

bool

true is the sequence would still be valid with the new outcome, false otherwise.