Construct a LanguageTranslatorV3 object.
Name | Type | Attribute | Description |
---|---|---|---|
options |
UserOptions |
Options for the service. |
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 contains the language code..tsv
or .tab
) - Tab-separated values (TSV) file with two columns for aligned sentences and phrases.
The first row contains the 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
|
|||||||||||||||||||||||||
callback |
Callback<TranslationModel> | Optional |
Delete document.
Deletes a document.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
DeleteDocumentParams |
The parameters to send to the service. Properties
|
|||||||||||||
callback |
Callback<Empty> | Optional |
Delete model.
Deletes a custom translation model.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
DeleteModelParams |
The parameters to send to the service. Properties
|
|||||||||||||
callback |
Callback<DeleteModelResult> | Optional |
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
|
|||||||||||||
callback |
Callback<DocumentStatus> | Optional |
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
|
|||||||||||||
callback |
Callback<TranslationModel> | Optional |
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
|
|||||||||||||||||
callback |
Callback<ReadableStream | Buffer> | Optional |
Identify language.
Identifies the language of the input text.
Name | Type | Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
IdentifyParams |
The parameters to send to the service. Properties
|
|||||||||||||
callback |
Callback<IdentifiedLanguages> | Optional |
List documents.
Lists documents that have been submitted for translation.
Name | Type | Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListDocumentsParams | Optional |
Properties
|
||||||||
callback |
Callback<DocumentList> | Optional |
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
|
||||||||
callback |
Callback<IdentifiableLanguages> | Optional |
List supported languages.
Lists all supported languages. 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
).
Name | Type | Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListLanguagesParams | Optional |
Properties
|
||||||||
callback |
Callback<Languages> | Optional |
List models.
Lists available translation models.
Name | Type | Attribute | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
ListModelsParams | Optional |
Properties
|
||||||||||||||||||||
callback |
Callback<TranslationModels> | Optional |
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.
Name | Type | Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
TranslateParams |
The parameters to send to the service. Properties
|
|||||||||||||||||||||||||
callback |
Callback<TranslationResult> | Optional |
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.
Name | Type | Attribute | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
TranslateDocumentParams |
The parameters to send to the service. Properties
|
|||||||||||||||||||||||||||||||||||||
callback |
Callback<DocumentStatus> | Optional |
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