Package opennlp.tools.chunker
Schnittstelle Chunker
- Alle bekannten Implementierungsklassen:
ChunkerME
public interface Chunker
The interface for chunkers which provide chunk tags for a sequence of tokens.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungString[]Generates chunk tags for the given sequence returning the result in an array.Span[]chunkAsSpans(String[] toks, String[] tags) Sequence[]topKSequences(String[] sentence, String[] tags) Computes the top k chunksequencesfor the specified sentence with the specified pos-tags.Sequence[]topKSequences(String[] sentence, String[] tags, double minSequenceScore) Computes the top k chunksequencesfor the specified sentence with the specified pos-tags.
-
Methodendetails
-
chunk
Generates chunk tags for the given sequence returning the result in an array.- Parameter:
toks- an array of the tokens or words of the sequence.tags- an array of the pos tags of the sequence.- Gibt zurück:
- an array of chunk tags for each token in the sequence.
-
chunkAsSpans
- Parameter:
toks- an array of the tokens or words of the sequence.tags- an array of the pos tags of the sequence.- Gibt zurück:
- an array of
spanswith chunk tags for each chunk in the sequence.
-
topKSequences
Computes the top k chunksequencesfor the specified sentence with the specified pos-tags.- Parameter:
sentence- The tokens of the sentence.tags- The pos-tags for the specified sentence.- Gibt zurück:
- the top k chunk
sequencesfor the specified sentence.
-
topKSequences
Computes the top k chunksequencesfor the specified sentence with the specified pos-tags.- Parameter:
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.- Gibt zurück:
- the top k chunk
sequencesfor the specified sentence.
-