Class TokenDictRule.Builder
java.lang.Object
com.ibm.watson.discovery.v1.model.TokenDictRule.Builder
- Enclosing class:
- TokenDictRule
public static class TokenDictRule.Builder extends Object
Builder.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description TokenDictRule.Builder
addReadings(String readings)
Adds an readings to readings.TokenDictRule.Builder
addTokens(String tokens)
Adds an tokens to tokens.TokenDictRule
build()
Builds a TokenDictRule.TokenDictRule.Builder
partOfSpeech(String partOfSpeech)
Set the partOfSpeech.TokenDictRule.Builder
readings(List<String> readings)
Set the readings.TokenDictRule.Builder
text(String text)
Set the text.TokenDictRule.Builder
tokens(List<String> tokens)
Set the tokens.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
text
- the texttokens
- the tokenspartOfSpeech
- the partOfSpeech
-
-
Method Details
-
build
Builds a TokenDictRule.- Returns:
- the new TokenDictRule instance
-
addTokens
Adds an tokens to tokens.- Parameters:
tokens
- the new tokens- Returns:
- the TokenDictRule builder
-
addReadings
Adds an readings to readings.- Parameters:
readings
- the new readings- Returns:
- the TokenDictRule builder
-
text
Set the text.- Parameters:
text
- the text- Returns:
- the TokenDictRule builder
-
tokens
Set the tokens. Existing tokens will be replaced.- Parameters:
tokens
- the tokens- Returns:
- the TokenDictRule builder
-
readings
Set the readings. Existing readings will be replaced.- Parameters:
readings
- the readings- Returns:
- the TokenDictRule builder
-
partOfSpeech
Set the partOfSpeech.- Parameters:
partOfSpeech
- the partOfSpeech- Returns:
- the TokenDictRule builder
-