hiexam
microsoft · AI-102 · Q652 · code_completion · azure, ai_document_intelligence, code_completion

HOTSPOT - You have an Azure subscription that contains an Azure AI Document Intelligence resource named DI1. You buil…

HOTSPOT - You have an Azure subscription that contains an Azure AI Document Intelligence resource named DI1. You build an app named App1 that analyzes PDF files for handwritten content by using DI1. You need to ensure that App1 will recognize the handwritten content. How should you complete the code? To answer, select the appropriate options in the answer area. //IMG//
Uri fileUri = new Uri("<fileUri>");

AnalyzeDocumentOperation operation = await client.AnalyzeDocumentFromUriAsync(WaitUntil.Completed, {{slot1}} fileUri);

AnalyzeResult result = operation.Value;

foreach (DocumentStyle style in result.Styles)
{
    bool isHandwritten = style.IsHandwritten.HasValue && style.IsHandwritten == true;

    if (isHandwritten && style.Confidence > {{slot2}})
    {
        Console.WriteLine($"Handwritten content found:");

        foreach (DocumentSpan span in style.Spans)
        {
            // Process span
        }
    }
}
Correct slot values

Answer hidden

Unlock AI-102

First 5 questions of every exam are free. Unlock the rest.

Includes
  • · All — questions
  • · Verified answers + AI explanations
  • · Spaced-repetition mistake notebook
  • · Phone, tablet, laptop sync

One-time payment. Doesn't auto-renew. · Already paid? Sign in