Course menuAI-901

Exams / AI-901 / Text analysis and speech apps / Question 2

AI-901 practice question: Text analysis and speech apps (2 of 5)

Implement AI solutions by using Microsoft Foundry A free question from our original AI-901 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current Microsoft Learn ·How we write our questions

A grocery chain stores its customer support chat transcripts. Before analysts read them, the developer must print each transcript with card and phone numbers masked.

from azure.ai.textanalytics import TextAnalyticsClient from azure.core.credentials import AzureKeyCredential client = TextAnalyticsClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) result = client.recognize_pii_entities(documents, language="en") for doc in result: print(doc.________)

Which attribute of each result should replace the blank?

Choose one answer.

  1. A. the entities attribute
  2. B. the redacted_text attribute
  3. C. the is_error attribute
  4. D. the confidence_score attribute
Show the answer and explanation

Answer: B

  • A. Wrong: entities lists each personal item found, with its category and position. It shows what was detected, but the masked text is a separate attribute.
  • B. Right: Correct. redacted_text holds the document's text with the detected personal information masked. It is the value the team needs to print before analysts read the transcripts. Learn more: What is Azure Language? (opens in a new tab)
  • C. Wrong: is_error reports whether processing failed for a document. It is a status flag, so printing it would not show a masked transcript.
  • D. Wrong: confidence_score gives how sure the service is about one detected item. It is a number attached to each entity, not the masked transcript.

Explanation

recognize_pii_entities returns a result for each document. Each result exposes redacted_text with the personal details masked, while entities, error status and confidence values serve other purposes.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Text analysis and speech apps? The 5 full-length practice sets have 25 more Text analysis and speech apps questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets

Every exam starts with free questions. No account needed.