public interface Chunker
Modifier and Type | Method and Description |
---|---|
String[] |
chunk(String[] toks,
String[] tags)
Generates chunk tags for the given sequence returning the result in an array.
|
Span[] |
chunkAsSpans(String[] toks,
String[] tags)
Generates tagged chunk spans for the given sequence returning the result in a span array.
|
Sequence[] |
topKSequences(String[] sentence,
String[] tags)
Returns the top k chunk sequences for the specified sentence with the specified pos-tags
|
Sequence[] |
topKSequences(String[] sentence,
String[] tags,
double minSequenceScore)
Returns the top k chunk sequences for the specified sentence with the specified pos-tags
|
String[] chunk(String[] toks, String[] tags)
toks
- an array of the tokens or words of the sequence.tags
- an array of the pos tags of the sequence.Span[] chunkAsSpans(String[] toks, String[] tags)
toks
- an array of the tokens or words of the sequence.tags
- an array of the pos tags of the sequence.Sequence[] topKSequences(String[] sentence, String[] tags)
sentence
- The tokens of the sentence.tags
- The pos-tags for the specified sentence.Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore)
sentence
- The tokens of the sentence.tags
- The pos-tags for the specified sentence.minSequenceScore
- A lower bound on the score of a returned sequence.Copyright © 2021 The Apache Software Foundation. All rights reserved.