public static class TokenDictRule.Builder extends Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(String text,
List<String> tokens,
String partOfSpeech)
Instantiates a new builder with required properties.
|
Modifier and Type | Method and Description |
---|---|
TokenDictRule.Builder |
addReadings(String readings)
Adds a new element to readings.
|
TokenDictRule.Builder |
addTokens(String tokens)
Adds a new element 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.
|
public TokenDictRule build()
public TokenDictRule.Builder addTokens(String tokens)
tokens
- the new element to be addedpublic TokenDictRule.Builder addReadings(String readings)
readings
- the new element to be addedpublic TokenDictRule.Builder text(String text)
text
- the textpublic TokenDictRule.Builder tokens(List<String> tokens)
tokens
- the tokenspublic TokenDictRule.Builder readings(List<String> readings)
readings
- the readingspublic TokenDictRule.Builder partOfSpeech(String partOfSpeech)
partOfSpeech
- the partOfSpeechCopyright © 2024 IBM Cloud. All rights reserved.