Interface IChunker

Namespace
NOpenNLP.Tools.Chunker
Assembly
NOpenNLP.Tools.dll

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

toks string[]

an array of the tokens or words of the sequence.

tags string[]

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

toks string[]

an array of the tokens or words of the sequence.

tags string[]

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

sentence string[]

The tokens of the sentence.

tags string[]

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

sentence string[]

The tokens of the sentence.

tags string[]

The pos-tags for the specified sentence.

minSequenceScore double

A lower bound on the score of a returned sequence.

Returns

Sequence[]

the top k chunk sequences for the specified sentence.