Exam AI-102 All QuestionsBrowse all questions from this exam
Question 133

HOTSPOT -

You are developing an application that includes language translation.

The application will translate text retrieved by using a function named get_text_to_be_translated. The text can be in one of many languages. The content of the text must remain within the Americas Azure geography.

You need to develop code to translate the text to a single language.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

    Correct Answer:

    Box 1: ("api-nam.cognitive.microsofttranslator.com")

    Geography USA: api-nam.cognitive.microsofttranslator.com

    Datacenters: East US, South Central US, West Central US, and West US 2

    Box 2: "/translate?to=en"

    Must specify the language which it is being translated to. The 'to' parameter is required

    Reference:

    https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate

Discussion
zellck

1.api-nam.cognitive.microsofttranslator.com 2. /translate?to=en https://learn.microsoft.com/en-us/azure/cognitive-services/Translator/reference/v3-0-reference#base-urls Requests to Translator are, in most cases, handled by the datacenter that is closest to where the request originated. If there's a datacenter failure when using the global endpoint, the request may be routed outside of the geography. To force the request to be handled within a specific geography, use the desired geographical endpoint. All requests are processed among the datacenters within the geography. - United States api-nam.cognitive.microsofttranslator.com https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/rest-api-guide - translate Translate specified source language text into the target language text.

rdemontis

agree with you, answer is correct

Davard

The answer seems correct to me. api.nam would keep it within the US.

evangelist

"api-apc.cognitive.microsofttranslator.com" refers to the Asia Pacific endpoint. Using this endpoint will route requests to Azure data centers located in Asia Pacific for processing. "api-nam.cognitive.microsofttranslator.com" refers to the North America endpoint. Using this endpoint will route requests to Azure data centers located in North America for processing. So in summary: "api-apc.cognitive.microsofttranslator.com" - Asia Pacific endpoint "api-nam.cognitive.microsofttranslator.com" - North America endpoint

reiwanotora

api-nam.cognitive.microsofttranslator.com translate?to=en

Gvalli

A modified version of this was in the exam today.

ddogg

I feel like the second one should be /detect?to=en since the input can be multiple unspecified languages.

krzkrzkra

1.api-nam.cognitive.microsofttranslator.com 2. /translate?to=en

ziggy1117

answer is correct