You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(language translator v3): Newest generated code using generator commit 1b434 and api definitions
* feat(language translator v3): adds language translator v3 file
* chore(tsc compilation): fixes compilation issues by fixing generated files with handwritten changes
* refactor(language translator): renames v3-generated to v3
* test(ltv3 tests): updates tests for language translator v3
* reencrypt creds
* test(stt tests): skips test
* 3.5.0
* docs(docs): iam url fix
* docs(README): readme update for language translator v3
* docs(README): version to readme
* ci(travis): makes it so only unit tests run for prs
* ci(travis): added missing closing quote to travis.yml
* ci(travis): add conditional to travis.yml
Copy file name to clipboardExpand all lines: language-translator/v2-generated.ts
+33-34Lines changed: 33 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ import { getMissingParams } from '../lib/helper';
21
21
import{FileObject}from'../lib/helper';
22
22
23
23
/**
24
-
* IBM Watson Language Translator translates text from one language to another. The service offers multiple domain-specific models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.
24
+
* IBM Watson™ Language Translator translates text from one language to another. The service offers multiple domain-specific models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.
25
25
*/
26
26
27
27
classLanguageTranslatorV2extendsBaseService{
@@ -60,10 +60,16 @@ class LanguageTranslatorV2 extends BaseService {
60
60
* Translates the input text from the source language to the target language.
61
61
*
62
62
* @param {Object} params - The parameters to send to the service.
63
-
* @param {string[]} params.text - Input text in UTF-8 encoding. Multiple entries will result in multiple translations in the response.
64
-
* @param {string} [params.model_id] - Model ID of the translation model to use. If this is specified, the **source** and **target** parameters will be ignored. The method requires either a model ID or both the **source** and **target** parameters.
65
-
* @param {string} [params.source] - Language code of the source text language. Use with `target` as an alternative way to select a translation model. When `source` and `target` are set, and a model ID is not set, the system chooses a default model for the language pair (usually the model based on the news domain).
66
-
* @param {string} [params.target] - Language code of the translation target language. Use with source as an alternative way to select a translation model.
63
+
* @param {string[]} params.text - Input text in UTF-8 encoding. Multiple entries will result in multiple translations
64
+
* in the response.
65
+
* @param {string} [params.model_id] - Model ID of the translation model to use. If this is specified, the **source**
66
+
* and **target** parameters will be ignored. The method requires either a model ID or both the **source** and
67
+
* **target** parameters.
68
+
* @param {string} [params.source] - Language code of the source text language. Use with `target` as an alternative
69
+
* way to select a translation model. When `source` and `target` are set, and a model ID is not set, the system
70
+
* chooses a default model for the language pair (usually the model based on the news domain).
71
+
* @param {string} [params.target] - Language code of the translation target language. Use with source as an
* @param {Function} [callback] - The callback that handles the response.
69
75
* @returns {NodeJS.ReadableStream|void}
@@ -143,7 +149,8 @@ class LanguageTranslatorV2 extends BaseService {
143
149
/**
144
150
* List identifiable languages.
145
151
*
146
-
* Lists the languages that the service can identify. Returns the language code (for example, `en` for English or `es` for Spanish) and name of each language.
152
+
* Lists the languages that the service can identify. Returns the language code (for example, `en` for English or `es`
153
+
* for Spanish) and name of each language.
147
154
*
148
155
* @param {Object} [params] - The parameters to send to the service.
@@ -174,14 +181,24 @@ class LanguageTranslatorV2 extends BaseService {
174
181
/**
175
182
* Create model.
176
183
*
177
-
* Uploads a TMX glossary file on top of a domain to customize a translation model. Depending on the size of the file, training can range from minutes for a glossary to several hours for a large parallel corpus. Glossary files must be less than 10 MB. The cumulative file size of all uploaded glossary and corpus files is limited to 250 MB.
184
+
* Uploads a TMX glossary file on top of a domain to customize a translation model.
185
+
*
186
+
* Depending on the size of the file, training can range from minutes for a glossary to several hours for a large
187
+
* parallel corpus. Glossary files must be less than 10 MB. The cumulative file size of all uploaded glossary and
188
+
* corpus files is limited to 250 MB.
178
189
*
179
190
* @param {Object} params - The parameters to send to the service.
180
-
* @param {string} params.base_model_id - The model ID of the model to use as the base for customization. To see available models, use the `List models` method.
181
-
* @param {string} [params.name] - An optional model name that you can use to identify the model. Valid characters are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum length is 32 characters.
182
-
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.forced_glossary] - A TMX file with your customizations. The customizations in the file completely overwrite the domain translaton data, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call.
183
-
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.parallel_corpus] - A TMX file that contains entries that are treated as a parallel corpus instead of a glossary.
184
-
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.monolingual_corpus] - A UTF-8 encoded plain text file that is used to customize the target language model.
191
+
* @param {string} params.base_model_id - The model ID of the model to use as the base for customization. To see
192
+
* available models, use the `List models` method.
193
+
* @param {string} [params.name] - An optional model name that you can use to identify the model. Valid characters are
194
+
* letters, numbers, dashes, underscores, spaces and apostrophes. The maximum length is 32 characters.
195
+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.forced_glossary] - A TMX file with your customizations.
196
+
* The customizations in the file completely overwrite the domain translaton data, including high frequency or high
197
+
* confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call.
198
+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.parallel_corpus] - A TMX file that contains entries that
199
+
* are treated as a parallel corpus instead of a glossary.
200
+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.monolingual_corpus] - A UTF-8 encoded plain text file that
* @param {Function} [callback] - The callback that handles the response.
187
204
* @returns {NodeJS.ReadableStream|void}
@@ -311,7 +328,9 @@ class LanguageTranslatorV2 extends BaseService {
311
328
* @param {Object} [params] - The parameters to send to the service.
312
329
* @param {string} [params.source] - Specify a language code to filter results by source language.
313
330
* @param {string} [params.target] - Specify a language code to filter results by target language.
314
-
* @param {boolean} [params.default_models] - If the default parameter isn't specified, the service will return all models (default and non-default) for each language pair. To return only default models, set this to `true`. To return only non-default models, set this to `false`.
331
+
* @param {boolean} [params.default_models] - If the default parameter isn't specified, the service will return all
332
+
* models (default and non-default) for each language pair. To return only default models, set this to `true`. To
333
+
* return only non-default models, set this to `false`.
/** Input text in UTF-8 encoding. Multiple entries will result in multiple translations in the response. */
489
-
text: string[];
490
-
/** Model ID of the translation model to use. If this is specified, the **source** and **target** parameters will be ignored. The method requires either a model ID or both the **source** and **target** parameters. */
491
-
model_id?: string;
492
-
/** Language code of the source text language. Use with `target` as an alternative way to select a translation model. When `source` and `target` are set, and a model ID is not set, the system chooses a default model for the language pair (usually the model based on the news domain). */
493
-
source?: string;
494
-
/** Language code of the translation target language. Use with source as an alternative way to select a translation model. */
0 commit comments