public class StringTokenization extends TokenSequence implements Tokenization
| Constructor and Description |
|---|
StringTokenization(CharSequence seq)
Create an empty StringTokenization
|
StringTokenization(CharSequence string,
CharSequenceLexer lexer)
Creates a tokenization of the given string.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getDocument()
Returns the document of which this is a tokenization.
|
Span |
getSpan(int i) |
Span |
subspan(int firstToken,
int lastToken)
Returns a span formed by concatenating the spans from start to end.
|
add, add, addAll, addAll, addAll, clonePipeOutputAccumulator, get, getNumericProperty, getProperty, getToken, hasProperty, iterator, pipeOutputAccumulate, remove, removeLastToken, setNumericProperty, setProperty, size, toFeatureSequence, toFeatureVector, toStringpublic StringTokenization(CharSequence seq)
public StringTokenization(CharSequence string, CharSequenceLexer lexer)
public Span subspan(int firstToken, int lastToken)
Tokenizationsubspan in interface TokenizationfirstToken - The index of the first token in the new span (inclusive).
This is an index of a token, *not* an index into the document.lastToken - The index of the first token in the new span (exclusive).
This is an index of a token, *not* an index into the document.public Span getSpan(int i)
getSpan in interface Tokenizationpublic Object getDocument()
TokenizationgetDocument in interface TokenizationCopyright © 2019 JULIE Lab, Germany. All rights reserved.