Class TokenDictRule

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.discovery.v1.model.TokenDictRule
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class TokenDictRule
extends com.ibm.cloud.sdk.core.service.model.GenericModel
An object defining a single tokenizaion rule.
  • Method Details

    • newBuilder

      public TokenDictRule.Builder newBuilder()
      New builder.
      Returns:
      a TokenDictRule builder
    • text

      public String text()
      Gets the text.

      The string to tokenize.

      Returns:
      the text
    • tokens

      public List<String> tokens()
      Gets the tokens.

      Array of tokens that the `text` field is split into when found.

      Returns:
      the tokens
    • readings

      public List<String> readings()
      Gets the readings.

      Array of tokens that represent the content of the `text` field in an alternate character set.

      Returns:
      the readings
    • partOfSpeech

      public String partOfSpeech()
      Gets the partOfSpeech.

      The part of speech that the `text` string belongs to. For example `noun`. Custom parts of speech can be specified.

      Returns:
      the partOfSpeech