Sample 3. Step 24: Describing the Country field with a Country element
We will use an element of type Character String to detect the Country field. The element must be located on the same horizontal level with the name of this field and will be used only if the name has been detected.
To create the Country element:
- In the Footer element, create an element of type Character String and name it Country.
- Click the Character String tab.
- Select all Latin characters as the alphabet and set the Percentage of non-alphabet characters to 20.
- In the Character count field, specify this fuzzy interval: [-1, 2, 25, 2147483647]. This is an estimation of the length of the character string. We assume that the possible values may range from 2 to 25. Any hypotheses outside this range will be penalized.
Show me...
- Leave the default values for the other parameters of the element.
- Click the Relations tab.
- Since the Country field can only be located to the right of the keywords of the name kwOrigin but no farther than 500 dots from its right boundary, set the following search constraints:
- Right of the element kwOrigin, Offset = 10.
- Left of the element kwOrigin, Offset = -500, Reference boundary = Right.
- Since the Country element is always located on the same level with the keywords of the name kwOrigin, set the following search constraints:
- Above the element kwOrigin, Offset = -10, Reference boundary = Bottom.
- Below the element kwOrigin, Offset = -10, Reference boundary = Top.
Note.Prior to setting the values for the offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Offset values are selected by trial and error. - Click the Advanced tab.
- The Country field is optional on this document but whenever it occurs, it is always located next to its name. So set the following additional search constraintconstraint in the Advanced pre-search relations field:Look for the object on the image only if the kwOrigin element has been detected.In the FlexiLayout language:
If Footer.kwOrigin.IsNull Then DontFind; - 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 Country block, select the Source element option, then click and select the Country element as the source element.
12.04.2024 18:16:02