English (English)

Sample 4. Step 7.4: Name of UnitPrice column, kwUnitPrice element

Once you have analyzed the images you will notice that the name of the Unit Price column can be described by the following search text: "UnitPrice", "Price", and "RATE", and the name Unit appears as "Unit". To prevent the program from detecting the word "Unit" in the name of the Unit Price column, we will first describe Unit Price, because it contains unique text, and then we will use an additional relation do describe Unit.

When creating an element to search for the keywords of the name of the Unit Price column, take into account the fact that the Unit Price column is always located to the right of the Quantity column.

To create a kwUnitPrice element:

  1. In the TableHeader element, create an element of type Static Text and name it kwUnitPrice.
  2. Click the Static Text tab.
  3. In the Search text field, specify the text to search: UnitPrice|Price|RATE.
  4. To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.
  5. On the Relations tab, specify the following condition: search for an element closest to the X coordinate with value = 0.

    Show me...

  1. Click the Advanced tab.
  2. Since the name of the Unit Price column is located to the right of the name of the kwQuantity column, specify the following additional conditions in Advanced pre-search relations:If the kwQuantity element has been detected, search for the image object to the right of the kwQuantity element. In the FlexiLayout language, this condition can be written as follows:
    If Not (TableHeader.kwQuantity.IsNull) Then
    RightOf: TableHeader.kwQuantity, 0 * dot;
  3. To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.
  4. We can influence the quality of generated hypotheses by specifying additional checks in the Advanced post-search relations field. In this case, we may specify the following check:If the element has been detected, calculate the difference between the reference width and the width of the detected element and see if it belongs to the given fuzzy interval. In the FlexiLayout language, this condition can be written as follows:
    If not IsNull then
    { FuzzyQuality: 400dt - width, {-50000,0,0, 50000}*dt;
    }
    //This check means that the greater the difference, the greater the penalty coefficient
  5. Match the FlexiLayout to make sure that the element is detected on the first page of the document.

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.