Sample 2. Step 22: Creating a Portions element
To create the Portions element:
- Create an element of type Character String and name it Portions.
- Click the Character String tab.
- Set the required alphabet. Judging by the test images, the alphabet includes all the digits and the letters "T", "t", "O", and "o".
- Set the Percentage of alphabet characters to 1.
- Clear the Allow embedded hypotheses box.
- Set the Percentage of non-alphabet characters to 20.
- In the Character count field, specify this fuzzy range {0, 1, 10, 15}. This interval is an estimation of the length of the character string. We assume that the number of characters may be from 1 to 10. Any hypotheses outside this range will be penalized.
- Click the Relations tab.
- Since the number of servings is always located to the right of the word "Serves" and the distance between the right boundary of the word "Serves" and the right boundary of the number cannot exceed 200 dots, specify the following search constraints:
- Right of the Serves element, Offset = 0
- Left of the Serves element, Offset = -200, Reference boundary = right
- Since the number of servings is always written on the same level with the word Serves, add the following search constraints:
- Above the Serves element, Offset = -50
- Below the Serves element, Offset = -50
12.04.2024 18:16:02