Microsoft Azure AI Engineer Associate AI-102 Practice Question
You have an Azure.AI.TextAnalytics client configured with your Cognitive Services key and endpoint. For a document that contains 140 Unicode characters, you call the DetectLanguage method without providing any additional options. The result shows the following scores:
Language: es
ConfidenceScore: 0.60
Your solution must improve the reliability of language detection for documents that may be short or ambiguous while keeping the code changes minimal. Which approach should you use?
Set the service version to the newest preview when instantiating the TextAnalyticsClient.
Pass a DetectLanguageOptions object with the CountryHint property set to the user's locale (for example, "ES").
Call the DetectLanguageBatch method with IncludeStatistics set to true so that additional metadata is returned.
Wrap the text in an AnalyzeActions operation that runs DetectLanguage as an action.
The DetectLanguage method accepts a DetectLanguageOptions object that allows you to provide a countryHint. Supplying the two-letter ISO country/region code gives the service additional context, which improves accuracy when the text is short or contains words common to several languages. Setting countryHint to the relevant locale (for example, "ES" for Spain) is therefore the most effective way to strengthen the detection result. Enabling monitoring or switching API versions does not influence detection quality, and adding a TextAnalyticsActions batch is unnecessary because it still relies on the same detection engine without extra context.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the DetectLanguageOptions object in Azure AI Text Analytics?
Open an interactive chat with Bash
How does setting the CountryHint property affect language detection?
Open an interactive chat with Bash
Why is it unnecessary to switch to the newest preview version of the TextAnalyticsClient for better language detection?
Open an interactive chat with Bash
Microsoft Azure AI Engineer Associate AI-102
Implement natural language processing solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .