public class TokenSample
extends java.lang.Object
TokenSample
is text with token spans.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SEPARATOR_CHARS |
Constructor and Description |
---|
TokenSample(Detokenizer detokenizer,
java.lang.String[] tokens) |
TokenSample(java.lang.String text,
Span[] tokenSpans)
Initializes the current instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getText()
Retrieves the text.
|
Span[] |
getTokenSpans()
Retrieves the token spans.
|
static TokenSample |
parse(java.lang.String sampleString,
java.lang.String separatorChars) |
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_SEPARATOR_CHARS
public TokenSample(java.lang.String text, Span[] tokenSpans)
text
- the text which contains the tokens.tokenSpans
- the spans which mark the begin and end of the tokens.public TokenSample(Detokenizer detokenizer, java.lang.String[] tokens)
public java.lang.String getText()
public Span[] getTokenSpans()
public java.lang.String toString()
toString
in class java.lang.Object
public static TokenSample parse(java.lang.String sampleString, java.lang.String separatorChars)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved