Class DefaultChunkerSequenceValidator

Namespace
NOpenNLP.Tools.Chunker
Assembly
NOpenNLP.Tools.dll
public class DefaultChunkerSequenceValidator : ISequenceValidator<TokenTag>
Inheritance
DefaultChunkerSequenceValidator
Implements
Inherited Members

Methods

ValidOutcome(string, string[])

protected virtual bool ValidOutcome(string outcome, string[] sequence)

Parameters

outcome string
sequence string[]

Returns

bool

ValidSequence(int, TokenTag[], 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, TokenTag[] sequence, string[] s, string outcome)

Parameters

i int

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

sequence TokenTag[]
s string[]
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.