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?



Question: How do you convert this query in GREL?

Answer: based on the text column
""+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:


  • score: value.parseJson().responseData.match

  • translation: value.parseJson().responseData.translatedText
Last modified: Saturday, 6 April 2019, 12:44 PM