Translator Service for Language Detection in Azure | Exam AI-102 | Microsoft

Translator Service for Language Detection in Azure

Question

Review the statement given below and state if it is true or false.

“You provision a Translator service in Azure in order to translate the text.

As you review the input documents, you realize that the source language is not given in certain text.

You use the language detection feature in the Translator service to identify the source text language.

To detect the language, you include the from parameter in the translation request and get the detected language.

However the confidence score will not be provided.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

Correct Answer: B.

Option A is incorrect because if you do not include the from parameter, the Translator service will attempt to detect the input language.

Option B is correct because the statement is not true.

Here is a code snippet for reference in that from parameter is not included.

Additionally confidence score for the detected language would be provided.

Input:

<pre class="brush:java;">string endpointsuffix = "/translate?api-version=3.0&to=de";

string textinput = "Hello, world!";

</pre>

Output:

<pre class="brush:java;">[

{

"detectedLanguage": {

"language": "en",

"score": 1.0

},

"translations": [

{

"text": "Hallo Welt!",

"to": "de"

},

]}]

</pre>

Reference:

To learn more about language detection in a Translator service, use the link given below:

The statement given is false.

When using the Azure Translator service, you can use the language detection feature to identify the source language of the text if it is not provided. To do this, you can simply omit the "from" parameter in the translation request and the service will automatically detect the source language.

However, if you choose to include the "from" parameter and specify the source language, the service will still attempt to detect the language and provide a confidence score for the detection. This can be useful for verifying the accuracy of the detected language.

Therefore, if you include the "from" parameter in the translation request to specify the source language, the confidence score for the detected language will still be provided. The statement given in the question is incorrect in suggesting that it will not be provided.

In summary, the correct answer is B. False.