Extracting Printed Text from PDF Documents using Read OCR Container | Microsoft Azure AI Solution

Extract Printed Text from PDF Documents using Read OCR Container

Question

You are tasked to extract printed text from PDF documents using the Read OCR container.

This solution option will meet your security and compliance requirements.

You use the docker run command to run the Read OCR container on an On-Prem host.

Review the bash statement given below and complete the code by selecting three answer choices.

docker run --rm -it -p 5000:5000 --memory 18g --cpus 8 \ mcr.microsoft.com/azure-cognitive-services/vision/………………………………………..

\ Eula=..........................................

\ Billing=..........................................

\ ApiKey={API_KEY}

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: A, D and E

Here is the completed statement.

<pre>docker run --rm -it -p 5000:5000 --memory 18g --cpus 8 \

mcr.microsoft.com/azure-cognitive-services/vision/read:3.2 \

Eula=accept \

Billing={ENDPOINT_URI} \

ApiKey={API_KEY}

</pre>Option A is correct because the value “accept” indicates that you have accepted the end-user license agreement.

Option B is incorrect because docker <image id> is not a suited value for the parameters maintained in the statement.

Option C is incorrect because “apply” is not a suited value for the parameters maintained in the statement.

Option D is correct because Read API will provide the capability to read the printed text from the PDF documents.

Option E is correct because Endpoint URI provides the endpoint to connect the cognitive resource for billing purposes.

Reference:

To learn more about Read OCR containers, use the link given below:

The given bash statement is a docker run command used to run the Read OCR container on an On-Prem host. Let's review the individual components of the command:

  • docker run: This command is used to run a container in Docker.
  • --rm: This option specifies that the container should be removed after it exits.
  • -it: This option specifies that the container should be run interactively and allocate a tty for it.
  • -p 5000:5000: This option publishes port 5000 from the container to the host machine.
  • --memory 18g: This option specifies the maximum amount of memory that the container can use.
  • --cpus 8: This option specifies the maximum number of CPUs that the container can use.
  • mcr.microsoft.com/azure-cognitive-services/vision/………………………………………..: This is the image name for the Read OCR container.
  • Eula=..........................................: This parameter specifies that you have accepted the End-User License Agreement (EULA) for the container.
  • Billing=..........................................: This parameter specifies the billing details for using the container.
  • ApiKey={API_KEY}: This parameter specifies the API key for the Cognitive Services endpoint.

To complete the code, we need to select three answer choices from the given options:

  • accept: This option is not a valid image name, and it does not specify any other required parameter in the command. Therefore, this option is not correct.
  • <image-id>: This option is not a valid image name. Moreover, the image ID for the Read OCR container is not provided in the given command. Therefore, this option is not correct.
  • apply: This option is not a valid image name, and it does not specify any other required parameter in the command. Therefore, this option is not correct.
  • read:3.2: This option is a valid image name for the Read OCR container. Therefore, this option is correct.
  • {ENDPOINT_URI}: This option is not a valid image name, and it does not specify any other required parameter in the command. Moreover, the endpoint URI for the Cognitive Services endpoint is not provided in the given command. Therefore, this option is not correct.

In conclusion, the correct options to complete the code are A, D, and E. Therefore, the completed code is:

makefile
docker run --rm -it -p 5000:5000 --memory 18g --cpus 8 \ mcr.microsoft.com/azure-cognitive-services/vision/read:3.2 \ Eula=accept \ Billing=apply \ ApiKey={API_KEY}