Construct a LanguageTranslatorV3 object.
Name | Type | Attribute | Description |
---|---|---|---|
options |
UserOptions |
Options for the service. |
Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current
version is 2018-05-01
.
Create model.
Uploads training files to customize a translation model. You can customize a model with a forced glossary or with a parallel corpus:
Depending on the type of customization and the size of the uploaded files, training time can range from minutes for a glossary to several hours for a large parallel corpus. To create a model that is customized with a parallel corpus and a forced glossary, customize the model with a parallel corpus first and then customize the resulting model with a forced glossary.
You can create a maximum of 10 custom models per language pair. For more information about customizing a translation model, including the formatting and character restrictions for data files, see Customizing your model.
You can provide your training data for customization in the following document formats:
.tmx
) - Translation Memory eXchange (TMX) is an XML specification for the exchange of translation
memories..xliff
) - XML Localization Interchange File Format (XLIFF) is an XML specification for the exchange
of translation memories..csv
) - Comma-separated values (CSV) file with two columns for aligned sentences and phrases. The
first row must have two language codes. The first column is for the source language code, and the second column is
for the target language code..tsv
or .tab
) - Tab-separated values (TSV) file with two columns for aligned sentences and phrases.
The first row must have two language codes. The first column is for the source language code, and the second column
is for the target language code..json
) - Custom JSON format for specifying aligned sentences and phrases..xls
or .xlsx
) - Excel file with the first two columns for aligned sentences and
phrases. The first row contains the language code.You must encode all text data in UTF-8 format. For more information, see Supported document formats for training data.
You can indicate the format of a file by including the file extension with the file name. Use the file extensions shown in Supported file formats.
Alternatively, you can omit the file extension and specify one of the following content-type
specifications for
the file:
application/x-tmx+xml
application/xliff+xml
text/csv
text/tab-separated-values
application/json
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
For example, with curl
, use the following content-type
specification to indicate the format of a CSV file named
glossary:
--form "forced_glossary=@glossary;type=text/csv"
.
Name | Type | Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
CreateModelParams |
The parameters to send to the service. Properties
|
Delete document.
Deletes a document.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
DeleteDocumentParams |
The parameters to send to the service. Properties
|
Delete model.
Deletes a custom translation model.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
DeleteModelParams |
The parameters to send to the service. Properties
|
Disables retries.
Enable retries for unfulfilled requests.
Name | Type | Attribute | Description |
---|---|---|---|
retryOptions |
RetryOptions | Optional |
configuration for retries |
Get the instance of the authenticator set on the service.
Get document status.
Gets the translation status of a document.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
GetDocumentStatusParams |
The parameters to send to the service. Properties
|
Get the Axios instance set on the service. All requests will be made using this instance.
Get model details.
Gets information about a translation model, including training status for custom models. Use this API call to poll
the status of your customization request. A successfully completed training has a status of available
.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
GetModelParams |
The parameters to send to the service. Properties
|
Get translated document.
Gets the translated document associated with the given document ID.
Name | Type | Attribute | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
GetTranslatedDocumentParams |
The parameters to send to the service. Properties
|
Identify language.
Identifies the language of the input text.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
IdentifyParams |
The parameters to send to the service. Properties
|
List documents.
Lists documents that have been submitted for translation.
Name | Type | Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListDocumentsParams | Optional |
Properties
|
List identifiable languages.
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.
Name | Type | Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListIdentifiableLanguagesParams | Optional |
Properties
|
List supported languages.
Lists all supported languages for translation. The method returns an array of supported languages with information
about each language. Languages are listed in alphabetical order by language code (for example, af
, ar
). In
addition to basic information about each language, the response indicates whether the language is
supported_as_source
for translation and supported_as_target
for translation. It also lists whether the language
is identifiable
.
Name | Type | Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListLanguagesParams | Optional |
Properties
|
List models.
Lists available translation models.
Name | Type | Attribute | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListModelsParams | Optional |
Properties
|
Turn request body compression on or off.
Name | Type | Attribute | Description |
---|---|---|---|
setting |
boolean |
Will turn it on if 'true', off if 'false'. |
Set the service URL to send requests to.
Name | Type | Attribute | Description |
---|---|---|---|
url |
string |
The base URL for the service. |
Translate.
Translates the input text from the source language to the target language. Specify a model ID that indicates the source and target languages, or specify the source and target languages individually. You can omit the source language to have the service attempt to detect the language from the input text. If you omit the source language, the request must contain sufficient input text for the service to identify the source language.
You can translate a maximum of 50 KB (51,200 bytes) of text with a single request. All input text must be encoded in UTF-8 format.
Name | Type | Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
TranslateParams |
The parameters to send to the service. Properties
|
Translate document.
Submit a document for translation. You can submit the document contents in the file
parameter, or you can
reference a previously submitted document by document ID. The maximum file size for document translation is
Name | Type | Attribute | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
TranslateDocumentParams |
The parameters to send to the service. Properties
|
Generated using TypeDoc
IBM Watson™ Language Translator translates text from one language to another. The service offers multiple IBM-provided translation 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. interfaces
API Version: 3.0.0 See: https://cloud.ibm.com/docs/language-translator