@@ -20,8 +20,8 @@ import { Authenticator, BaseService, getAuthenticatorFromEnvironment, getMissing
2020import { getSdkHeaders } from '../lib/common' ;
2121
2222/**
23- * IBM Watson™ Language Translator translates text from one language to another. The service offers multiple IBM
24- * provided translation models that you can customize based on your unique terminology and language. Use Language
23+ * IBM Watson™ Language Translator translates text from one language to another. The service offers multiple
24+ * IBM- provided translation models that you can customize based on your unique terminology and language. Use Language
2525 * Translator to take news from across the globe and present it in your language, communicate with your customers in
2626 * their own language, and more.
2727 */
@@ -128,16 +128,20 @@ class LanguageTranslatorV3 extends BaseService {
128128 /**
129129 * Translate.
130130 *
131- * Translates the input text from the source language to the target language. A target language or translation model
132- * ID is required. The service attempts to detect the language of the source text if it is not specified.
131+ * Translates the input text from the source language to the target language. Specify a model ID that indicates the
132+ * source and target languages, or specify the source and target languages individually. You can omit the source
133+ * language to have the service attempt to detect the language from the input text. If you omit the source language,
134+ * the request must contain sufficient input text for the service to identify the source language.
133135 *
134136 * @param {Object } params - The parameters to send to the service.
135- * @param {string[] } params.text - Input text in UTF-8 encoding. Multiple entries will result in multiple translations
136- * in the response.
137- * @param {string } [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM provided
138- * base model for English to German translation. A model ID overrides the source and target parameters and is required
139- * if you use a custom model. If no model ID is specified, you must specify a target language.
140- * @param {string } [params.source] - Language code that specifies the language of the source document.
137+ * @param {string[] } params.text - Input text in UTF-8 encoding. Multiple entries result in multiple translations in
138+ * the response.
139+ * @param {string } [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM-provided
140+ * base model for English-to-German translation. A model ID overrides the `source` and `target` parameters and is
141+ * required if you use a custom model. If no model ID is specified, you must specify at least a target language.
142+ * @param {string } [params.source] - Language code that specifies the language of the input text. If omitted, the
143+ * service derives the source language from the input text. The input must contain sufficient text for the service to
144+ * identify the language reliably.
141145 * @param {string } [params.target] - Language code that specifies the target language for translation. Required if
142146 * model ID is not specified.
143147 * @param {OutgoingHttpHeaders } [params.headers] - Custom request headers
@@ -325,10 +329,10 @@ class LanguageTranslatorV3 extends BaseService {
325329 * @param {Object } [params] - The parameters to send to the service.
326330 * @param {string } [params.source] - Specify a language code to filter results by source language.
327331 * @param {string } [params.target] - Specify a language code to filter results by target language.
328- * @param {boolean } [params._default] - If the default parameter isn't specified, the service will return all models
329- * (default and non-default) for each language pair. To return only default models, set this to `true`. To return only
330- * non-default models, set this to `false`. There is exactly one default model per language pair , the IBM provided
331- * base model.
332+ * @param {boolean } [params._default] - If the ` default` parameter isn't specified, the service returns all models
333+ * (default and non-default) for each language pair. To return only default models, set this parameter to `true`. To
334+ * return only non-default models, set this parameter to `false`. There is exactly one default model, the IBM- provided
335+ * base model, per language pair .
332336 * @param {OutgoingHttpHeaders } [params.headers] - Custom request headers
333337 * @param {Function } [callback] - The callback that handles the response
334338 * @returns {Promise<LanguageTranslatorV3.Response<LanguageTranslatorV3.TranslationModels>> }
@@ -600,7 +604,7 @@ class LanguageTranslatorV3 extends BaseService {
600604 * Get model details.
601605 *
602606 * Gets information about a translation model, including training status for custom models. Use this API call to poll
603- * the status of your customization request. A successfully completed training will have a status of `available`.
607+ * the status of your customization request. A successfully completed training has a status of `available`.
604608 *
605609 * @param {Object } params - The parameters to send to the service.
606610 * @param {string } params.modelId - Model ID of the model to get.
@@ -726,11 +730,12 @@ class LanguageTranslatorV3 extends BaseService {
726730 * Maximum file size: **20 MB**.
727731 * @param {string } params.filename - The filename for file.
728732 * @param {string } [params.fileContentType] - The content type of file.
729- * @param {string } [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM provided
730- * base model for English to German translation. A model ID overrides the source and target parameters and is required
731- * if you use a custom model. If no model ID is specified, you must specify a target language.
733+ * @param {string } [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM- provided
734+ * base model for English-to- German translation. A model ID overrides the ` source` and ` target` parameters and is
735+ * required if you use a custom model. If no model ID is specified, you must specify at least a target language.
732736 * @param {string } [params.source] - Language code that specifies the language of the source document. If omitted, the
733- * service derives the source language from the input text.
737+ * service derives the source language from the input text. The input must contain sufficient text for the service to
738+ * identify the language reliably.
734739 * @param {string } [params.target] - Language code that specifies the target language for translation. Required if
735740 * model ID is not specified.
736741 * @param {string } [params.documentId] - To use a previously submitted document as the source for a new translation,
@@ -1036,14 +1041,17 @@ namespace LanguageTranslatorV3 {
10361041
10371042 /** Parameters for the `translate` operation. */
10381043 export interface TranslateParams {
1039- /** Input text in UTF-8 encoding. Multiple entries will result in multiple translations in the response. */
1044+ /** Input text in UTF-8 encoding. Multiple entries result in multiple translations in the response. */
10401045 text : string [ ] ;
1041- /** The model to use for translation. For example, `en-de` selects the IBM provided base model for English to
1042- * German translation. A model ID overrides the source and target parameters and is required if you use a custom
1043- * model. If no model ID is specified, you must specify a target language.
1046+ /** The model to use for translation. For example, `en-de` selects the IBM- provided base model for
1047+ * English-to- German translation. A model ID overrides the ` source` and ` target` parameters and is required if you
1048+ * use a custom model. If no model ID is specified, you must specify at least a target language.
10441049 */
10451050 modelId ?: string ;
1046- /** Language code that specifies the language of the source document. */
1051+ /** Language code that specifies the language of the input text. If omitted, the service derives the source
1052+ * language from the input text. The input must contain sufficient text for the service to identify the language
1053+ * reliably.
1054+ */
10471055 source ?: string ;
10481056 /** Language code that specifies the target language for translation. Required if model ID is not specified. */
10491057 target ?: string ;
@@ -1068,9 +1076,10 @@ namespace LanguageTranslatorV3 {
10681076 source ?: string ;
10691077 /** Specify a language code to filter results by target language. */
10701078 target ?: string ;
1071- /** If the default parameter isn't specified, the service will return all models (default and non-default) for
1072- * each language pair. To return only default models, set this to `true`. To return only non-default models, set
1073- * this to `false`. There is exactly one default model per language pair, the IBM provided base model.
1079+ /** If the `default` parameter isn't specified, the service returns all models (default and non-default) for
1080+ * each language pair. To return only default models, set this parameter to `true`. To return only non-default
1081+ * models, set this parameter to `false`. There is exactly one default model, the IBM-provided base model, per
1082+ * language pair.
10741083 */
10751084 _default ?: boolean ;
10761085 headers ?: OutgoingHttpHeaders ;
@@ -1146,13 +1155,14 @@ namespace LanguageTranslatorV3 {
11461155 filename : string ;
11471156 /** The content type of file. */
11481157 fileContentType ?: TranslateDocumentConstants . FileContentType | string ;
1149- /** The model to use for translation. For example, `en-de` selects the IBM provided base model for English to
1150- * German translation. A model ID overrides the source and target parameters and is required if you use a custom
1151- * model. If no model ID is specified, you must specify a target language.
1158+ /** The model to use for translation. For example, `en-de` selects the IBM- provided base model for
1159+ * English-to- German translation. A model ID overrides the ` source` and ` target` parameters and is required if you
1160+ * use a custom model. If no model ID is specified, you must specify at least a target language.
11521161 */
11531162 modelId ?: string ;
11541163 /** Language code that specifies the language of the source document. If omitted, the service derives the source
1155- * language from the input text.
1164+ * language from the input text. The input must contain sufficient text for the service to identify the language
1165+ * reliably.
11561166 */
11571167 source ?: string ;
11581168 /** Language code that specifies the target language for translation. Required if model ID is not specified. */
0 commit comments