English (English)

Selecting a Table block and specifying search constraints for columns

You can select the Table block to bind to the current Table element on the Columns tab of the element's Properties dialog box.

Show Properties dialog tab, Columns tab

Selecting a Table block

Each Table element must correspond to a Table block, for which search it intends. To select a Table block, click the Select button and select the Table block which corresponds to the current Table element. A list of all its columns will appear in the List1 field. Set the properties for each of the columns - these will be used as search constraints when looking for the columns.

Note.

  1. The list of the columns of the block displayed on the Columns tab in the element's Properties dialog box cannot be edited in this dialog box. To edit the list, you need to open the Properties dialog box of the block.
  2. To better understand how an element and its corresponding block are connected, consider the following: a Table block serves as an interface between the FlexiLayout and a data capture application, whereas a Table element is the implementation of that interface. A Table element contains the instructions about how to find the Table block. You can create several program implementations for any interface. Likewise, you can create several Table elements for a Table block (but not the other way round).

When you select a Table block on the Columns tab of an element, by default the program uses the names and order of the columns in the Table block to set the search constraints for each of the columns (see Setting search constraints for table columns) and to set the order of the columns (see Order of table columns).

Disabling a table column

When testing your FlexiLayout, you may need to disable a column without removing it from the FlexiLayout altogether. Disabling a column retains all the information about the column in the FlexiLayout but tells the program to ignore the column when testing the FlexiLayout. To disable a column, select the column you wish to disable in the List1 field and click Disable. This will clear the check mark next to the name of the column. To enable the column, select its name in the list and then click Enable.

Note.When you disable a column, it is automatically disabled in all of the order lists on the Order tab.

Setting search constraints for table columns

The search constraints for table columns are set in the columns' Properties dialog box. To open the Properties dialog box of a column, select the column in the List1 field and then click the Properties... button next to the field.

Show Properties of Column dialog box

The names of the columns located in the header of the table play an important part in column detection. To help the program to detect the names of the columns, you can use keywords which can be found in the header. Alternatively, the name of a column can be detected by relying on another element, whose region will be considered also the region of the column name.

Using key words to detect the names of columns

To detect the name of a column by means of keywords, select the Detect by keyword in name option. In the field below, enter the keywords or phrases which occur in the column name on the test images. Press Enter after typing each keyword.

If you wish the program to use only whole words when looking for the names of the columns, select the Whole words only option.

In a narrow column, words in the name will often be carried over to the next line. Select the Multi-line name option to detected column names like that.

Since one and the same column may have different names on different images, the list of keywords must include all the possible variants which may actually occur. However, on some of the images the column may have no name at all or may be absent altogether. For this reason, the name of a column is always optional. This means that the name of a column need not be found when matching the FlexiLayout with the images. If a keyword is not found (either because it is actually absent or because the quality of the image is inadequate for OCR), the hypothesis will be penalized - its quality will be multiplied by the quality of the null hypothesis for the non-detected keyword. The penalty for the hypothesis is set in the Missing keyword penalty field. The default value is 0.97.

Using the region of another element to detect the names of columns

You can use an already found element to find the name of a column. This allows you to set additional search constraints on the keyword. This method also allows you to look not only for Static Text, but also for a Character String, for Inverted Text, or just for a region.

To find the name of a column by means of an already found element, select the Use found element as column name option, next click and in the Select Element dialog box, select the element whose region will be considered also the region of the column name.

Note.The element you use to detect the name of a column must be located above the described Table element in the FlexiLayout tree. When describing a multi-page table, it is recommended to use repeating elements to search for a column name (refer to Detecting multi-page tables for more information about multi-page tables).

Checking whether the column has been detected correctly

When looking for columns, the program uses not only information about their names, but also the information about their content. Thus, if you know that a particular column contains a particular type of data, you can specify this in order to help the program detect the column more reliably. To enable FlexiLayout Studio to check the data type in a column, select the Check content type option and in the Type of column content field specify one of the available data types that the column is likely to contain:

  • Text;
  • Currency;
  • Date;
  • Regular expression;
  • Number.

If you selected the Regular expression type, you need to enter the code of the regular expression which describes the format of the data in the column.

Regular Expression Alphabet

If the data type in the column does not coincide with the data type in the Type of column content field, the hypothesis will be penalized. The field Missing content penalty contains the coefficient by which the quality of the hypothesis will by multiplied if the column content does not correspond to the data type you specified.

Specifying the coordinates of the search area

You can specify the coordinates of the search areas of the left and right boundaries of a column. In the Absolute area constraints property, enter the coordinates of each of the search areas in the Left boundary and Right boundary fields respectively.

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.