You are developing a method for an application that uses the Translator API.
The method will receive the content of a webpage, and then translate the content into Greek (el). The result will also contain a transliteration that uses the Roman alphabet.
You need to create the URI for the call to the Translator API. You have the following URI.
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0 Which three additional query parameters should you include in the URI? Each correct answer presents part of the solution. (Choose three.) NOTE: Each correct selection is worth one point.
Correct Answer: C,D,F
Comprehensive Detailed Explanation
You are asked to construct a URI for the Microsoft Translator API call that:
Translates webpage content into Greek (el).
Returns a transliteration in the Roman alphabet (Latin script).
The base URI given is:
https: //api.cognitive.microsofttranslator.com/translate?api-version=3.0 Now, let's evaluate the required query parameters.
1. to=el
This specifies the target language for translation.
Since the requirement is to translate into Greek, we must include:
to =el
Correct
2. textType=html
The source content is from a webpage.
Translator API requires textType=html for web page or HTML-formatted content.
If omitted, the default is plain text.
Correct
3. toScript=Latn
By default, Greek text is written in its native Greek script.
To provide a transliteration in the Roman alphabet, we must set toScript=Latn .
Latn = Latin script.
Correct
Incorrect Options
A). toScript=Cyrl
Cyrl = Cyrillic script. Not required here.
B). from=el
This would mean the source language is Greek.
In the requirement, the target is Greek, so this is incorrect.
E). textType=plain
Incorrect, since we are translating HTML webpage content, not plain text.
The answer: C. textType=html, D. to=el, F. toScript=Latn
Microsoft References
Translator Text API v3.0 Reference - Translate
Language and Script Parameters (to, from, toScript)