Correction: Lesson 5 Lab 2: Translation and Sentiment Analysis
Text translation
Question: Several tweets are not in English. How can you easily detect the language?
Answer: look at the user_lang field
Question: What is the URL you should build to query the server?
Answer: http://api.mymemory.translated.net/get?q=<text>&langpair=en|it
Question: How do you convert this query in GREL?
Answer: based on the text column
"http://api.mymemory.translated.net/get?q="+escape(value, 'url')+"&langpair="+cells['user_lang'].value+"|en"
Select 15 tweets in non-English and process them through the service.
Question: Extract the translation and quality score:
Anwer:
-
score: value.parseJson().responseData.match
- translation: value.parseJson().responseData.translatedText
Last modified: Saturday, 6 April 2019, 12:44 PM