Class TokenResult
java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.natural_language_understanding.v1.model.TokenResult
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class TokenResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
TokenResult.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TokenResult.PartOfSpeech
The part of speech of the token. -
Constructor Summary
Constructors Constructor Description TokenResult()
-
Method Summary
Modifier and Type Method Description String
getLemma()
Gets the lemma.List<Long>
getLocation()
Gets the location.String
getPartOfSpeech()
Gets the partOfSpeech.String
getText()
Gets the text.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Constructor Details
-
TokenResult
public TokenResult()
-
-
Method Details
-
getText
Gets the text.The token as it appears in the analyzed text.
- Returns:
- the text
-
getPartOfSpeech
Gets the partOfSpeech.The part of speech of the token. For more information about the values, see [Universal Dependencies POS tags](https://universaldependencies.org/u/pos/).
- Returns:
- the partOfSpeech
-
getLocation
Gets the location.Character offsets indicating the beginning and end of the token in the analyzed text.
- Returns:
- the location
-
getLemma
Gets the lemma.The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
- Returns:
- the lemma
-