Azure AI-102 Exam: Form Recognizer Layout API Integration

Analyzing and Extracting Text from PDF and JPG Documents

Question

You use Azure's Form Recognizer Layout API to analyze and extract the text from a set of PDF and JPG documents.

You have the Azure subscription, Form Recognizer resource endpoint, key and all other input requirements are met.In the first call, you analyze the layout and in the second call you get the analyze layout results.

As a result of these two operations, you get the recognized text and additional details such as bounding box and confidence.

Given the scenario above, which value from the Analyze Layout operation will you use as input for the Get Analyze Layout Result operation?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

Option A is incorrect.

The Operation-Location is a url that contains the result id value.

This value is passed as query input to the Get Analyze Layout Result operation in order to get the recognized text.

Option B is incorrect because Result URL is not used as input by the Get Analyze Layout Result operation.

Instead, the Result ID value is used in this operation as the input.

Option C is correct because the Result ID value, as obtained from the Operation-Location url “https://cognitiveservice/formrecognizer/v2.1/layout/analyzeResults/{resultId}” is used as a query parameter to get the recognized text using the Get Analyze Layout Result operation.

Option D is incorrect because Response Header is Operation-Location.

As explained earlier, it is not the value that is used as-is by the Get Analyze Layout Result operation.

Reference:

To learn more about form recognizer layout service, use the link given below:

In the scenario given, the Form Recognizer Layout API is being used to analyze and extract text from a set of PDF and JPG documents. The API provides two operations for this purpose: "Analyze Layout" and "Get Analyze Layout Result".

The "Analyze Layout" operation is used to analyze the layout of the input documents and extract the text, along with additional details such as bounding boxes and confidence scores. This operation returns a response with an HTTP status code of 202 (Accepted) and a header named "Operation-Location", which contains the URL to query the status of the operation.

The "Get Analyze Layout Result" operation is used to retrieve the results of the "Analyze Layout" operation. This operation requires an input parameter that specifies the URL to the results, which is obtained from the "Operation-Location" header returned by the "Analyze Layout" operation.

Therefore, the correct answer to the question is A. Operation-Location. This value should be used as input for the "Get Analyze Layout Result" operation to retrieve the results of the "Analyze Layout" operation. The "Result URL" and "Result ID" options are not valid input parameters for this operation, and the "Response Header" is not specific enough to be used as input.