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.
- 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.
- 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.
If Footer.kwOrigin.IsNull Then DontFind;