public class AddWordOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
AddWordOptions.Builder
Builder.
|
Modifier and Type | Method and Description |
---|---|
String |
customizationId()
Gets the customizationId.
|
String |
displayAs()
Gets the displayAs.
|
List<String> |
mappingOnly()
Gets the mappingOnly.
|
AddWordOptions.Builder |
newBuilder()
New builder.
|
List<String> |
soundsLike()
Gets the soundsLike.
|
String |
word()
Gets the word.
|
String |
wordName()
Gets the wordName.
|
public AddWordOptions.Builder newBuilder()
public String customizationId()
The customization ID (GUID) of the custom language model that is to be used for the request. You must make the request with credentials for the instance of the service that owns the custom model.
public String wordName()
The custom word that is to be added to or updated in the custom language model. Do not use characters that need to be URL-encoded, for example, spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, or question marks. Use a `-` (dash) or `_` (underscore) to connect the tokens of compound words. URL-encode the word if it includes non-ASCII characters. For more information, see [Character encoding](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#charEncoding).
public String word()
For the [Add custom words](#addwords) method, you must specify the custom word that is to be added to or updated in the custom model. Do not use characters that need to be URL-encoded, for example, spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, or question marks. Use a `-` (dash) or `_` (underscore) to connect the tokens of compound words. A Japanese custom word can include at most 25 characters, not including leading or trailing spaces.
Omit this parameter for the [Add a custom word](#addword) method.
public List<String> mappingOnly()
Parameter for custom words. You can use the 'mapping_only' key in custom words as a form of post processing. This key parameter has a boolean value to determine whether 'sounds_like' (for non-Japanese models) or word (for Japanese) is not used for the model fine-tuning, but for the replacement for 'display_as'. This feature helps you when you use custom words exclusively to map 'sounds_like' (or word) to 'display_as' value. When you use custom words solely for post-processing purposes that does not need fine-tuning.
public List<String> soundsLike()
As array of sounds-like pronunciations for the custom word. Specify how words that are difficult to pronounce, foreign words, acronyms, and so on can be pronounced by users. * _For custom models that are based on previous-generation models_, for a word that is not in the service's base vocabulary, omit the parameter to have the service automatically generate a sounds-like pronunciation for the word. * For a word that is in the service's base vocabulary, use the parameter to specify additional pronunciations for the word. You cannot override the default pronunciation of a word; pronunciations you add augment the pronunciation from the base vocabulary.
A word can have at most five sounds-like pronunciations. A pronunciation can include at most 40 characters, not including leading or trailing spaces. A Japanese pronunciation can include at most 25 characters, not including leading or trailing spaces.
public String displayAs()
An alternative spelling for the custom word when it appears in a transcript. Use the parameter when you want the word to have a spelling that is different from its usual representation or from its spelling in corpora training data.
_For custom models that are based on next-generation models_, the service uses the spelling of the word as the display-as value if you omit the field.
Copyright © 2024 IBM Cloud. All rights reserved.