public class TokenResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static interface |
TokenResult.PartOfSpeech
The part of speech of the token.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
lemma |
protected java.util.List<java.lang.Long> |
location |
protected java.lang.String |
partOfSpeech |
protected java.lang.String |
text |
Constructor and Description |
---|
TokenResult() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLemma()
Gets the lemma.
|
java.util.List<java.lang.Long> |
getLocation()
Gets the location.
|
java.lang.String |
getPartOfSpeech()
Gets the partOfSpeech.
|
java.lang.String |
getText()
Gets the text.
|
protected java.lang.String text
@SerializedName(value="part_of_speech") protected java.lang.String partOfSpeech
protected java.util.List<java.lang.Long> location
protected java.lang.String lemma
public java.lang.String getText()
The token as it appears in the analyzed text.
public java.lang.String getPartOfSpeech()
The part of speech of the token. For more information about the values, see [Universal Dependencies POS tags](https://universaldependencies.org/u/pos/).
public java.util.List<java.lang.Long> getLocation()
Character offsets indicating the beginning and end of the token in the analyzed text.
public java.lang.String getLemma()
The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token.