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.
  • Constructor Details

    • TokenResult

      public TokenResult()
  • Method Details

    • getText

      public String getText()
      Gets the text.

      The token as it appears in the analyzed text.

      Returns:
      the text
    • getPartOfSpeech

      public String 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

      public List<Long> getLocation()
      Gets the location.

      Character offsets indicating the beginning and end of the token in the analyzed text.

      Returns:
      the location
    • getLemma

      public String getLemma()
      Gets the lemma.

      The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token.

      Returns:
      the lemma