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.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TokenDictRule.Builder
Builder. -
Method Summary
Modifier and Type Method Description TokenDictRule.Builder
newBuilder()
New builder.String
partOfSpeech()
Gets the partOfSpeech.List<String>
readings()
Gets the readings.String
text()
Gets the text.List<String>
tokens()
Gets the tokens.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a TokenDictRule builder
-
text
Gets the text.The string to tokenize.
- Returns:
- the text
-
tokens
Gets the tokens.Array of tokens that the `text` field is split into when found.
- Returns:
- the tokens
-
readings
Gets the readings.Array of tokens that represent the content of the `text` field in an alternate character set.
- Returns:
- the readings
-
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
-