The Template-based Recognition activity allows you to set a recognition template in order to extract data from documents of the same type. A document is displayed as an image with the recognized areas highlighted. You can set context variables that will store the recognized text and use them in the process. Read more about context variables in the "Process context" article.
To open the settings window, click on the activity on the process diagram.
The basic activity parameters are displayed In the Parameters tab:
- Name. The activity name on the process diagram. Its name is set automatically when adding the activity. If you want to change the name, you can do it in this field;
- Image. A document recognized by the template. Only the File type context variables can be selected as an image.
- Template. Select and set a recognition template. You can select .png or .jpg format files.
Select the image that will be used as a recognition template. Image processing can take some time. After the image is processed, a thumbnail will be displayed in the Template field. To delete the template, click the button.
Click on the thumbnail. In the window that opens you will see the image with highlighted text areas recognized by OCR (Optical Character Recognition).
Recognized text can be saved to the process context variables. To do this, click on the area containing text. The recognized word will appear. Click on it and select the variable that will store the extracted text.
Select the language for the recognized text in the top left corner: Russian or English. If the language is not selected, the text can be recognized for both languages. It can also be defined automatically. If the word consists of symbols that are similar in Russian and English, the variants for both languages will be displayed. This is due to the internal algorithms and models of artificial neural networks.
To save the extracted text to another variable, click on the area containing the text and click the button.
To delete the extracted text from the variable, click on the area containing the text and click the button.
You can scale the image:
- by the zoom slider in the lower left corner;
- by the mouse wheel while holding the Ctrl button.
After selecting a context variable, a panel with extractable data is displayed on the right, indicating the name, the variable type, and the extracted text.
Save all the necessary data to the context variables and click the Apply button on the top panel of RPA Designer.
After that, the Extracted data block will appear in activity parameters. It displays a list of context variables containing the saved data.
Read more about the Conditions tab in the "Basic activity settings principles" article.