Implement text analysis solutions 4.1 Apply language model text analysis
A hotel's front-desk app receives guest names written in Cyrillic.
Study guide skill: Build solutions that translate text by using Azure Translator in Foundry Tools or LLM-powered translation flows
Question B5-014
A hotel's front-desk app receives guest names written in Cyrillic. Staff who read only the Latin alphabet need each name shown in Latin script, and the names must not be translated. Which Azure Translator operation should you call?
Select one answer.
Answer: B
Transliteration maps text from one script or alphabet to another and, unlike translation, doesn't return the meaning, only the way the text is written. fromScript names the script of the input text (Cyrl here) and toScript names the output script (Latn). Reversing the scripts would describe Latin input, the Translate operation converts text into another language, and textType only says whether the input is plain text or HTML.
Deep dive
How it works
Azure Translator has separate operations for meaning and for script. The Text transliteration API maps text from the source script or alphabet to a target script or alphabet. Unlike translation, it doesn't return the meaning, only how the text is written. That's exactly what a front desk needs for names: the same name, readable in Latin letters, not translated into another word.
Transliteration takes required query parameters:
- fromScript: the script the input text is written in. For Cyrillic names, that's Cyrl.
- toScript: the output script. For Latin letters, that's Latn.
- language: the input language, which determines which script combinations are available. You look up supported combinations with the transliteration scope.
The docs' own sample request uses fromScript=Cyrl&toScript=Latn on Cyrillic input, the same direction as this scenario. The request body is a JSON array named inputs, with each item carrying the text to convert.
The other options, and when you'd use them
- Transliterate with fromScript Latn and toScript Cyrl: That's the reverse direction. It would convert Latin input into Cyrillic, but the input here is already Cyrillic.
- Translate with English as the target: The Text translation API turns source text into a target language. That changes the meaning-bearing text, which names shouldn't go through. Translation is for content, not for rendering names in another alphabet.
- Translate with textType set to html: textType only says whether the input is plain text (the default) or HTML. It doesn't change scripts, and it's still a translation call.
Exam tip
"Same words, different alphabet" means Transliterate. Read the parameter names literally: fromScript is the input's script and toScript is the output's script.
References
Last reviewed: