Tokenizer.Tokenization
Constructor and Description |
---|
EnglishTokenizer() |
Modifier and Type | Method and Description |
---|---|
TextAnnotation |
getTextAnnotation(String text) |
Pair<String[],IntPair[]> |
tokenizeSentence(String sentence)
given a sentence, return a set of tokens and their character offsets
|
Tokenizer.Tokenization |
tokenizeTextSpan(String textSpan)
given a span of text, return a list of Pair< String[], IntPair[] > corresponding
to tokenized sentences, where the String[] is the ordered list of sentence tokens and the
IntPair[] is the corresponding list of character offsets with respect to the original
text.
|
public TextAnnotation getTextAnnotation(String text)
public Pair<String[],IntPair[]> tokenizeSentence(String sentence)
tokenizeSentence
in interface Tokenizer
sentence
- The sentence stringPair
containing the array of tokens and their character offsetspublic Tokenizer.Tokenization tokenizeTextSpan(String textSpan)
tokenizeTextSpan
in interface Tokenizer
textSpan
- Copyright © 2017. All rights reserved.