exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 3 question 9 discussion

Actual exam question from Microsoft's AI-102
Question #: 9
Topic #: 3
[All AI-102 Questions]

HOTSPOT -
You are developing an application that includes language translation.
The application will translate text retrieved by using a function named getTextToBeTranslated. 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 Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Shourya007
Highly Voted 2 years, 10 months ago
Wrong , correct answer is both last option. api-nam.cognitive.microsofttranslator.com '?to=en'
upvoted 26 times
...
[Removed]
Highly Voted 1 year, 3 months ago
Box 1: api-nam/translate : https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#base-urls Box 2: "?to=en";
upvoted 13 times
...
master9
Most Recent 2 months, 3 weeks ago
var endpoint = "https://api-nam.cognitive.microsofttranslator.com/translate"; var apiKey = "FF956C68B83821838691ABD200A4C606"; var text = getTextToBeTranslated(); var body = '[{"Text":"' + text + '"}]'; var client = new HttpClient(); client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", apiKey); var uri = endpoint + "?to=en"; HttpResponseMessage response; var content = new StringContent(body, Encoding.UTF8, "application/json"); response = await client.PutAsync(uri, content);
upvoted 1 times
...
nanaw770
6 months, 3 weeks ago
api-nam/translate to=en
upvoted 3 times
...
funny_penguin
6 months, 3 weeks ago
on exam, /translate and to=en
upvoted 2 times
...
varinder82
8 months, 3 weeks ago
Final Answer 1. /translate 2. to=en
upvoted 1 times
...
anto69
10 months ago
insane way to ask a question
upvoted 8 times
eskimolight
5 months, 1 week ago
Hhahhahha
upvoted 1 times
...
...
katrang
1 year, 1 month ago
api-nam....../translate ?to=en
upvoted 2 times
...
zellck
1 year, 5 months ago
1. api-nam.cognitive.microsofttranslator.com 2. ?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.
upvoted 7 times
...
RAN_L
1 year, 9 months ago
var endpoint = "https://api-nam.cognitive.microsofttranslator.com/translate"; var apiKey = "FF956C68883821838691A8D200A4C606"; var text = getTextToBeTranslated(); var body = "[{\"Text\":\"" + text + "\"}]"; var client = new HttpClient(); client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", apiKey); var uri = endpoint + "?to=en"; var content = new StringContent(body, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PutAsync(uri, content); string translatedText = await response.Content.ReadAsStringAsync();
upvoted 1 times
...
Eltooth
2 years, 4 months ago
Box 1: api-nam/translate : https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#base-urls Box 2: "?to=en";
upvoted 1 times
...
PHD_CHENG
2 years, 6 months ago
Was on exam 7 Jun 2022
upvoted 2 times
...
Ravnit
3 years ago
Was on exam 27/11/2021
upvoted 4 times
...
Adedoyin_Simeon
3 years, 1 month ago
SuperPetey is correct. ref: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#base-urls
upvoted 3 times
...
alan007
3 years, 3 months ago
wrong for first choice,should be API.cognitive……./tanslate
upvoted 7 times
SuperPetey
3 years, 3 months ago
incorrect - the question specifies it should be routed to the Americas region. The correct answer for box 1 is api-nam.cognitive.microsofttranslator.com/translate according to doc @ https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#base-urls I agree second drop-down is '?to=en'
upvoted 42 times
rdemontis
1 year, 1 month ago
agree with you. thanks for the provided reference
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago