Sample 3. Step 8: Describing the Invoice Number field with an InvoiceNumber element
The field Invoice Number is to the right of the name and is located on the same horizontal level. Analysis of the test images reveals that on some of the images the number has been poorly recognized. So we will not restrict the alphabet, but we will restrict the search area and restrict the length of the string to 3-20 characters.
To create the InvoiceNumber element:
- In the InvoiceHeader element, create an element of type Character String and name it.
Note.The element and the block which corresponds to the field InvoiceNumber need not have identical names, but this is handy when working with the FlexiLayout. - Click the Character String tab.
- Set the Percentage of non-alphabet characters to 100%, which means that there is no restriction for characters.
- In the Character count field, specify this fuzzy interval: {-1, 3, 20, INF}, which restricts the number of characters in the string. We assume that the possible values range from 3 to 20. Any hypotheses outside this range will be penalized.
- Click the Relations tab.
- Since InvoiceNumber can only occur to the right of the keywords of the name kwInvoiceNumber, but no farther than 550 dots from the right boundary of the name kwInvoiceNumber, set the following search constraints:
- Right of the element kwInvoiceNumber, Offset = 0
- Left of the element kwInvoiceNumber, Offset = -550, Reference boundary = Right
Note.Offset values are selected by method of trial and error. - Since InvoiceNumber is always located on the same level with the keyword of the name kwInvoiceNumber, set the following search constraints:
- Above the element kwInvoiceNumber, Offset = -10, Reference boundary = Bottom
- Below the element kwInvoiceNumber, Offset = -10, Reference boundary = Top
Show me...
- Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.
- To describe the location of the InvoiceNumber block, click its Properties and select the Source element option, then click and select the InvoiceNumber element as the source element.
4/12/2024 6:16:02 PM