Create Language Translator Service Instance¶
Objective¶
IBM Watson™ Language Translator allows you to translate text programmatically from one language into another language.
You create an instance of IBM Watson™ Language Translator service in IBM Cloud.
Tools Used¶
- Watson Language Translator
Requirements¶
Steps¶
To create an instance of IBM Watson™ Language Translator service in IBM Cloud,
-
login to IBM Cloud.
-
Select Catalog from the top navigation bar.
-
Search for
language translator. -
Select the
Language Translatortile. -
Select a region, for example
Dallas. -
Select an
AdvancedorPremiumpricing plan.Note: Because, you are going to build a custom model with your dictionary, you must select an
AdvancedorPremiumpricing plan. -
Give it a unique name, for example
my-Language-Translator. -
Select
Both public & prvate networkfor theService Endpoints. -
Accept the default for the rest of settings.
-
Click
Createbutton. This create yourTranslatorinsstance.
Setup a terminal environment connecting to Translator instance¶
The rest of the workshop will use your Translator instance created in this section. For simplicity, you are going to connect to your Translator instance via Curl command in a terminal wiindow. To connect to your Translator instance, API key and Endpoint URL must be set correctly.
-
Go back to the browser where you have created your
Translatorinstance. -
Select
Managein the left navigation pane. -
Both
API keyandURLare available on the right.
-
Copy the
API key. -
Open a terminal window.
-
Execute command
export apikey=<your API key> -
Copy the
URL. -
Execute command below in the terminal window.
export url=<your url> -
To verify you are connected to an instance
Translatorservice, execute the commandcurl --user "apikey:$apikey" "$url/v3/models?source=en&target=es&version=2018-05-01" -
It should return
{ "models" : [ { "model_id" : "en-es", "source" : "en", "target" : "es", "base_model_id" : "", "domain" : "general", "customizable" : true, "default_model" : true, "owner" : "", "status" : "available", "name" : "en-es", "training_log" : null } ] } -
If the expected result were not returned, reset both
apikeyandurlenvironment variable.
Related Links¶
There is lots of great information, tutorials, articles, etc on the IBM Developer site as well as broader web. Here are a subset of good examples related to data understanding, visualization and processing: