Interface IChunker
The interface for chunkers which provide chunk tags for a sequence of tokens.
public interface IChunker
Methods
Chunk(string[], string[])
Generates chunk tags for the given sequence returning the result in an array.
string[] Chunk(string[] toks, string[] tags)
Parameters
toksstring[]an array of the tokens or words of the sequence.
tagsstring[]an array of the pos tags of the sequence.
Returns
- string[]
an array of chunk tags for each token in the sequence.
ChunkAsSpans(string[], string[])
Generates tagged chunk spans for the given sequence returning the result in a span array.
Span[] ChunkAsSpans(string[] toks, string[] tags)
Parameters
toksstring[]an array of the tokens or words of the sequence.
tagsstring[]an array of the pos tags of the sequence.
Returns
- Span[]
an array of spans with chunk tags for each chunk in the sequence.
TopKSequences(string[], string[])
Returns the top k chunk sequences for the specified sentence with the specified pos-tags
Sequence[] TopKSequences(string[] sentence, string[] tags)
Parameters
sentencestring[]The tokens of the sentence.
tagsstring[]The pos-tags for the specified sentence.
Returns
- Sequence[]
the top k chunk sequences for the specified sentence.
TopKSequences(string[], string[], double)
Returns the top k chunk sequences for the specified sentence with the specified pos-tags
Sequence[] TopKSequences(string[] sentence, string[] tags, double minSequenceScore)
Parameters
sentencestring[]The tokens of the sentence.
tagsstring[]The pos-tags for the specified sentence.
minSequenceScoredoubleA lower bound on the score of a returned sequence.
Returns
- Sequence[]
the top k chunk sequences for the specified sentence.