hiexam
microsoft · AI-102 · Q280 · code_completion · analyze_document, code_completion, azure_sdk

Complete the following code to analyze a document and detect handwritten styles.

Complete the following code to analyze a document and detect handwritten styles.
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)
        {
            // Handle each 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