Create Custom Template for Custom Documents
- How to create a template for custom documents using your schema
- How to add sample documents to your template and how to annotate them
- How to use your template when extracting information from documents
- Step 1
In Create Custom Schema for Custom Documents, you defined a schema that includes a list of header fields you want to extract from power of attorney documents. In this tutorial, you’ll create a template that uses your schema and additional sample documents. You’ll add annotations to the sample documents to teach the Document Information Extraction service where certain field values are located on the document to improve the accuracy of the extraction prediction for similar documents.
This tutorial uses the following power of attorney documents. Download them to follow along (right click on the link, then click Save link as to download the files locally):
In Document Information Extraction Trial UI, access Template on the left navigation pane and click + to create a new template.
In the dialog, proceed as follows:
-
Enter a name for your template,
Custom_power_of_attorney_template
, for instance. -
Choose
Custom
as yourDocument Type
. -
Select the schema you created in Create Custom Schema for Custom Documents.
-
Choose one of the sample documents by clicking Browse. The following images use the Sample Power of Attorney 1. Upload the same document in the file dialog to follow along.
-
Click Create to create your template.
-
After your template is created, a confirmation dialog pops up. Click OK to acknowledge it. It will now navigate you to the detail page of your template.
Here, you find a list of your sample documents as well as a list of the included extraction fields that you have defined in your schema.
In the next step, you’ll start annotating your sample document.
CAUTION:
Be aware of the following Document Information Extraction Trial UI trial account limitations:
- Maximum 40 uploaded document pages per week (the documents can have more than 1 page)
- Maximum 10 schemas per trial account
- Maximum 3 templates per trial account (with a maximum of 5 sample documents each)
-
- Step 2
Click on the row of your sample document to open it.
Next, click Annotations to open the annotations pane on the right side.
To start annotating, click Edit.
If you now hover your mouse over the document, the mouse pointer changes to a crosshair cursor. This allows you to draw a box around the information on the document.
You may further notice that all the text on the document has a gray background now. This indicates that Document Information Extraction has recognized the text. Now you only have to connect the text with the field, without actually entering the text yourself. Start with
shipperNumber
:Find the shipper number at the top of the document. Draw a box around it by holding down the left mouse button and moving the cursor diagonally to the opposite corner. Do not include the “Required”! If you are on a smaller screen, zoom in and out by using the magnifying glass icons on the top.
Once you drew the bounding box, a dialog appears. Here, you find that the service recognized the shipper number of your power of attorney document and pre-filled the field. Select
shipperNumber
as the field to which this value belongs. Then, click Apply.Now, the field for
shipperNumber
on the right is filled with the shipper number of your power of attorney document. Additionally, the shipper number on the document is surrounded by a blue box.Continue until you fill out all header fields with a value and a corresponding box.
Once you are done, and have successfully annotated the sample document, click Save to ensure your hard work is not lost.
- Step 3
The last step that remains is to activate the template. Therefore, click Activate.
Now, the status of your template changes from
DRAFT
toACTIVE
which means you can use the template to extract information from documents. To make changes to your template (add more sample document files, for example), you have to Deactivate it first.Congratulations, you have created and activated your first Document Information Extraction schema.
If you want to add more sample document files to your template, the status should be:
- Step 4
-
Access Document on the left navigation pane and click + to upload a new document.
-
In the Select Document screen, choose
Custom
for the Document Type. -
Select the Schema and Template you created.
-
Drop files directly or click + to upload one or more document files. First, use the Sample Power of Attorney 2.
-
Click Step 2.
-
The selection of header fields comes from the schema and cannot be edited. Click Step 3 and then click Review.
-
Review your selection. Click Edit if you want to change anything. Click Confirm.
The document status changes from
PENDING
toREADY
. -
Click the document row and Extraction Results to see the information extracted from the document using the schema and template you created.
You can repeat this step using the Sample Power of Attorney 3.
Congratulations, you have completed this tutorial.
-