English (English)

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:

  1. 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.
  2. Click the Character String tab.
  3. Set the Percentage of non-alphabet characters to 100%, which means that there is no restriction for characters.
  4. 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.
  5. Click the Relations tab.
  6. 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.
  7. 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...

  1. Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.
  2. 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.

12.04.2024 18:16:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.