In the case of documents with variable field locations, you need to create variants and train a classifier to distinguish these variants. For more about documents with variable field locations and variants, see Variable field locations on documents that belong to the same type.
Complete the following steps:
- Create a Document Definition.
- In the section properties of the Document Definition, select Allow field location training.
- Create the necessary fields in the section. Select Can have region the properties of each field.
- Add section variants using one of the following three methods:
- Create variants manually. To do this, click the Data Sets tab in the section properties and then click the View... button. Then click the Add... button to add variants.
- Load variants from a database. To do this, click the Data Sets tab in the section properties and then click the Set Up... button. From the drop-down list, select Database as the data source.
- Create variants using a script. To do this, click the Data Sets in the section properties and then click the Set Up... button. From the drop-down list, select Script as the data source.
- Save and publish the Document Definition.
- Train a classifier on the newly created variants:
- Switch to Open Classifier Training Batches mode and load document images into a new batch.
- Assign a reference class to each document, using variants as separate classes:
- Click Set Class... → Add... → Add...
- Select Specify variant.
- Select a variant from the list.
- Train a classifier by clicking Classification Training → Train.
Note: You can create a classifier in FlexiLayout Studio and then import it into ABBYY FlexiCapture. For details, see Exporting and importing classifiers.
- Train ABBYY FlexiCapture to detect the field regions on each variant:
- Switch to Field Extraction Training Batches mode.
- Create a new batch. Select your Document Definition and then select a variant to train.
- Load document images and recognize them. We recommend loading 3 to 50 images for each kind of document.
- Adjust the positions of the fields.
- Set the following states for your documents:
- Select some of the documents, right-click the selection, and click Set Document State → For training on the shortcut menu.
- Select the remaining documents, right-click the selection, and click Set Document State → For testing on the shortcut menu.
- Train the program to extract the fields:
- Click Fields Training → Train
When working with the training results, you may need to check which variant was assigned to a document and edit it if necessary. To display the IDs of the variants on the form, create a service field. For details, see Enabling operators to change variants.