import json
from ibm_watson import LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticatorT = IAMAuthenticator('0Iobj63HD2qz6ChKXOCkc1kARMJ8E9-Gkq1045FQIGf7')
language_translator = LanguageTranslatorV3(
    version='2018-05-01',
    authenticator=authenticatorT)
language_translator.set_service_url('https://gateway.watsonplatform.net/language-translator/api')


def traducir(text,language_translator):
    translation = language_translator.translate(
        text=text, model_id='en-es').get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))

traducir("How much",language_translator)
b22bb67ed69e489abea02f1c2d4a0867f07d8099
<mask token>


def traducir(text, language_translator):
    translation = language_translator.translate(text=text, model_id='en-es'
        ).get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))


<mask token>

<mask token>
language_translator.set_service_url(
    'https://gateway.watsonplatform.net/language-translator/api')


def traducir(text, language_translator):
    translation = language_translator.translate(text=text, model_id='en-es'
        ).get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))


traducir('How much', language_translator)

<mask token>
authenticatorT = IAMAuthenticator(
    '0Iobj63HD2qz6ChKXOCkc1kARMJ8E9-Gkq1045FQIGf7')
language_translator = LanguageTranslatorV3(version='2018-05-01',
    authenticator=authenticatorT)
language_translator.set_service_url(
    'https://gateway.watsonplatform.net/language-translator/api')


def traducir(text, language_translator):
    translation = language_translator.translate(text=text, model_id='en-es'
        ).get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))


traducir('How much', language_translator)

import json
from ibm_watson import LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
authenticatorT = IAMAuthenticator(
    '0Iobj63HD2qz6ChKXOCkc1kARMJ8E9-Gkq1045FQIGf7')
language_translator = LanguageTranslatorV3(version='2018-05-01',
    authenticator=authenticatorT)
language_translator.set_service_url(
    'https://gateway.watsonplatform.net/language-translator/api')


def traducir(text, language_translator):
    translation = language_translator.translate(text=text, model_id='en-es'
        ).get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))


traducir('How much', language_translator)

import json
from ibm_watson import LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticatorT = IAMAuthenticator('0Iobj63HD2qz6ChKXOCkc1kARMJ8E9-Gkq1045FQIGf7')
language_translator = LanguageTranslatorV3(
    version='2018-05-01',
    authenticator=authenticatorT)
language_translator.set_service_url('https://gateway.watsonplatform.net/language-translator/api')


def traducir(text,language_translator):
    translation = language_translator.translate(
        text=text, model_id='en-es').get_result()
    print(translation['translations'][0]['translation'])
    print(json.dumps(translation, indent=2, ensure_ascii=False))

traducir("How much",language_translator)