In this exercise we learn how to use the Form Recognizer service. It is assumed that a storage account has been created (as described in the first demo.)
-
Access to the limited-access preview. To get access to the preview, fill out and submit the Form Recognizer access request form.
-
Postman is used to send requests to the Form Recognizer service REST API. Refer to this short primer to learn more.
-
Postman Form Recognizer requests collection.
The only resource we work with in this demonstration is the Form Recognizer service.
Name | Type | Purpose |
---|---|---|
ttinvoicereader | Form Recognizer Service | This service will eventually end up in the All-In-One sevice. For right now it is in limited-access preview. To get access to the preview, fill out and submit the Form Recognizer access request form. |
There are three main steps:
- Upload training data to the storage account
- Create Form Recognizer service
- Train and Use Form Recognizer service
- Create a container called
train
in the storage account created in the previous demo.
-
Download and unzip invoice training set.
-
Upload unzipped invoice training set to the
train
container. This can be done directly using the portal or by using the Azure Storage Explorer (as shown in the video).
In order to do this you must have access to the Form Recognizer preview. To get access to the preview, fill out and submit the Form Recognizer access request form.
This section uses Postman and assumes you know about loading collections, handling variables, and setting pre-request scripts. To learn how to do these specific things we have included some instructions.
The table below lists the variables set during this section of the exercise:
Name | Type | Purpose |
---|---|---|
Ocp-Apim-Subscription-Key |
Authorization | Key for getting access to Form Recognizer service |
endpoint |
Variable | Specifies the Form Recognizer endpoint |
modelId |
Variable | Current Form Recognizer model (this is set in step 5) |
-
Load the Form Recognizer collection into Postman.
-
Set the
Ocp-Apim-Subscription-Key
authorization header as well as theendpoint
variable to the Form Recognizer service (these can be found in the portal). -
Open the
TrainModel
Request and change the Pre-request script to set thestorageAccount
variable to your storage account (in the video the variable isttinvoicestorage
) and theSASValue
to the appropriate Secure Access Signature to thetrain
container. To learn how to get a Secure Access Signature, refer to our brief explanation.
pm.environment.set('storageAccount', '<YOUR STORAGE ACCOUNT>')
pm.environment.set('container', 'train')
pm.environment.set('SASValue', '<SAS>')
- Hit Send on the Request. Your response should look something like this:
- Set the
modelId
variable for the collection to the returnedmodelId
indicated above.
- Open the
AnalyzeForm
request. In the Body section click on theSelect Files
button to choose an invoice downloaded previously. After sending the request you should get something similar to:
Learn how to create custom Invoice Reader Skill with Azure Functions by continuing on to Demo 3 - Creating a Custom Invoice Reader Skill