Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using IBM Watson 3. Write the Python code that does the following: a. Prompts the user to enter the 'text that must be translated -

Using IBM Watson

image text in transcribedimage text in transcribed

3. Write the Python code that does the following: a. Prompts the user to enter the 'text that must be translated - see below (5 points) Welcome to the IBM Watson Translator Have fun! Enter some text to be translated: b. It should identify the language of the text that you entered & return the language and the confidence scores. Try extracting just the language with confidence >0.95 from the result below as this is the default result retuned by the function that returns several languages with their confidence scores. (10 points - points - 5 each for the overall result & just extracting the language having confidence score >0.95 from the overall result) c. Next it should prompt the user and ask for the language to which the text is to be translated. You can provide option for any five languages of your interest. These do not have to be necessarily as shown below. (5 points) Welcome to the IBM Watson Translator Have fun! Enter sone text to be translated: Hello how are you? What language should I translate it to? 1) Spanish 2) Hindi 3) French 4) Chinese (Simplified) Select a language from the list above: d. Should return the translation of the text once one of the above languages is selected. Try extracting just the language translation from the default result returned. (10 points - 5 each for the overall result & just extracting the translation from the overall result) Welcome to the IBM Watson Translator Have fun! Enter some text to be translated: Hello how are you? What language should I translate it to? 1) Spanish 2) Hindi 3) French 4) Chinese (simplified) Select a language from the list above: 2 Here is the text translated for you: {"translations': [{"translation': , TH], 'word_count": 5, "character_count": 18} 3. Write the Python code that does the following: a. Prompts the user to enter the 'text that must be translated - see below (5 points) Welcome to the IBM Watson Translator Have fun! Enter some text to be translated: b. It should identify the language of the text that you entered & return the language and the confidence scores. Try extracting just the language with confidence >0.95 from the result below as this is the default result retuned by the function that returns several languages with their confidence scores. (10 points - points - 5 each for the overall result & just extracting the language having confidence score >0.95 from the overall result) c. Next it should prompt the user and ask for the language to which the text is to be translated. You can provide option for any five languages of your interest. These do not have to be necessarily as shown below. (5 points) Welcome to the IBM Watson Translator Have fun! Enter sone text to be translated: Hello how are you? What language should I translate it to? 1) Spanish 2) Hindi 3) French 4) Chinese (Simplified) Select a language from the list above: d. Should return the translation of the text once one of the above languages is selected. Try extracting just the language translation from the default result returned. (10 points - 5 each for the overall result & just extracting the translation from the overall result) Welcome to the IBM Watson Translator Have fun! Enter some text to be translated: Hello how are you? What language should I translate it to? 1) Spanish 2) Hindi 3) French 4) Chinese (simplified) Select a language from the list above: 2 Here is the text translated for you: {"translations': [{"translation': , TH], 'word_count": 5, "character_count": 18}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

Students also viewed these Databases questions