AI-102 Exam QuestionsBrowse all questions from this exam

AI-102 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:

Show Answer
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

8 comments
Sign in to comment
zellck
Jul 1, 2023

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
Nov 5, 2023

agree with you, answer is correct

Davard
Sep 25, 2022

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

evangelist
Jan 24, 2024

"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

ddogg
Aug 22, 2023

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

Gvalli
Dec 21, 2023

A modified version of this was in the exam today.

reiwanotora
May 24, 2024

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

ziggy1117
Jun 11, 2023

answer is correct

krzkrzkra
Jul 14, 2024

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