watson.language_translation({version: 'v2', ...});
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Methods
createModel(string, string, stream)
Creates a translation model
Parameters:
| Name | Type | Description |
|---|---|---|
string |
base_model_id The base model identifier | |
string |
name The model name | |
stream |
forced_glossary The tmx stream |
deleteModel(string)
Deletes a translation model
Parameters:
| Name | Type | Description |
|---|---|---|
string |
model_id The model identifier |
getIdentifiableLanguages()
Returns the identifiable languages
getModel(string)
Return the translation model
Parameters:
| Name | Type | Description |
|---|---|---|
string |
model_id The model identifier |
getModels(string, string, string)
Return the translation models
Parameters:
| Name | Type | Description |
|---|---|---|
string |
default Query filters to check if the model is the default one used when only source and target languages are specified. | |
string |
source Filter by source language | |
string |
target Filter by target language |
identify(string)
Identify the text based on the identifiable languages
Parameters:
| Name | Type | Description |
|---|---|---|
string |
text text to identify |
translate()
Translate pharagraphs from @param source to @param target.