ABBYY FlexiCapture for Invoices lets you extract invoice fields for which no predefined data types are available, and change the way any field is extracted.
There are several ways to do this:
|Develop an additional FlexiLayout||An additional FlexiLayout will let you extract fields for which no predefined data types are available and change the way standard fields are extracted from invoices from any vendor.|
|Develop a FlexiLayout for a specific vendor||Vendor-specific FlexiLayouts let you extract fields for which no predefined data types are available and change the way standard fields are extracted from invoices from a specific vendor.|
|Train a Document Definition for a specific vendor||Creating a Document Definition for invoices from a specific vendor will let you train the program to extract fields from that vendor's invoices.|
You can choose to take advantage of any one of these solutions, or combine them. For example, you can add a new field to an additional Document Definition that is applied to invoices from all vendors, and then train the program to recognize the new field on invoices from some vendors and create a FlexiLayout variant for the other vendors.
You can find more information about how multiple FlexiLayouts are applied in How FlexiLayout matching results are merged.
Creating an additional FlexiLayout
Any FlexiLayout created in ABBYY FlexiLayout Studio can be used as an additional FlexiLayout in ABBYY FlexiCapture for Invoices
To extract a new type of field, create a new block with a unique name in a FlexiLayout and define the logic for finding it on images. When this FlexiLayout is added to a Document Definition, a new field with the same name as the new block in the FlexiLayout will be created.
If the name of the block in the additional FlexiLayout is the same as the name of a standard field in the Document Definition, the additional FlexiLayout will be used to extract the block.
To add a FlexiLayout to a Document Definition:
- Click Document Definitions... on the Project menu.
- In the dialog box that opens, select a Document Definition and click the Edit... button.
- Click Document Definition Properties... on the Document Definition menu.
- Click the FlexiLayout tab in the dialog box that opens.
- Click the Load... button in the Additional FlexiLayout options group and specify the path to the FlexiLayout file in the dialog box that opens (FlexiLayout files have the *.afl extension).
ABBYY FlexiLayout Studio has several features for developing additional FlexiLayouts for invoices:
- You can find the IDs of the vendor and the business unit of an invoice and reference a data set in a Document Definition.
- You can specify the positions of elements relative to fields that may be detected when the main FlexiLayout is applied.
- You can parametrize the FlexiLayout using an XML file, which lets you store and edit complex lists of keywords and other FlexiLayout parameters without editing the FlexiLayout or the Document Definition.
For more information on the special features of ABBYY FlexiLayout Studio, See Special features of ABBYY FlexiLayout Studio for creating additional FlexiLayouts.
Developing a FlexiLayout variant for a specific vendor
ABBYY FlexiCapture for Invoices lets you use a separate FlexiLayout variant when processing invoices from a specific vendor. This additional FlexiLayout variant can be created automatically using training. If you are unsatisfied with the variant, you can open it in ABBYY FlexiLayout Studio and manually change the field search algorithm.
Creating a FlexiLayout variant
To enable the training feature, complete the following steps in the Document Definition editor: Document Definition Properties...→Document Definition Settings, then click Edit... in Additional Fields and Features and choose Training during invoice processing.
You can train both existing fields and new ones. To apply the training feature, complete the following procedure:
- Add at least one invoice from the vendor to a batch.
- Recognize it.
- Make sure the program determines the vendor correctly. If it doesn't, specify the right vendor manually.
- Change the location of the field you want to train, or designate its region.
- Select invoice and click Train. A Training batch will be created.
Note: Training will begin after the first recognized invoice. But for better quality you need to provide the program with at least three sample images that contain this field.
An Administrator can review, view and modify the Training batch created as a result of Operator-driven training. To do this:
- Click the Open Field Extraction Training Batches button on the toolbar to switch to the training batch view. The training batch contains sample batches from a specific vendor which will be used to train the FlexiLayout for this vendor. Next, decide if you want to use automatic training or edit the FlexiLayout variant manually:
- If you want to use automatic training, add a few more sample invoices to the batch (we recommend adding at least 3) and specify the field regions. For more information about training on sample batches see Training by users with project setup permissions.
- If you want to begin editing the FlexiLayout variant manually right away, go to the next step.
- Click Training → Export Trained FlexiLayout... on the Project menu,
- right-click the batch and select Export Trained FlexiLayout... from the shortcut menu of the batch.
Blocks in the FlexiLayout correspond to fields in the Document Definition. All of the blocks involved in the training have theicon. This icon indicates that the algorithm for extracting a block has been generated automatically.
Making changes to the FlexiLayout will cause the program to consider these blocks to have been created manually. When the Document Definition is applied, the program has to choose the FlexiLayout from which it will pick the field's region (for details, see How FlexiLayout matching results are merged). Manually created blocks always have higher priority.
Because of this, you need to remove blocks the search algorithm for which you don't want to change. These blocks will still be present in the main FlexiLayout, so they will still be extracted when the Document Definition is applied. So if, for example, you want to specify a custom algorithm for the InvoiceDate and MyField blocks, leave these blocks in the FlexiLayout and delete all of the other blocks.
Note: You cannot create new fields in a Document Definition for a specific vendor by simply adding a new block to a FlexiLayout. Blocks in a FlexiLayout variant that do not correspond to a field in a Document Definition will cause an error when processing invoices from the vendor. If you need to extract a new field from invoices from a specific vendor, create the field in the Document Definition first (see step 1).
- Click Training → Import FlexiLayout... on the Project menu,
- Right-click the batch and click Import FlexiLayout... on the shortcut menu.
Specify the path to the *.afl file you created in the previous step.
This operation's log will contain messages about which field regions were selected from the FlexiLayout variant for the vendor.
Training a Document Definition for a specific vendor
To create a new field:
- In the Document Definition editor, select Edit → Create Field (or right-click in the list of fields). Select a field type.
- In the Properties dialog box, enter a name for the additional field and select the Can have region option.
Note: For detailed instructions on configuring fields of various types, see Document Definition fields.
A new field with the name you specified will appear on the data form and in the list of fields.
Now you need to train the program to capture data from this field.
Note that training is done separately for each vendor. See Training during invoice capture for more information.
3/2/2021 8:10:42 AM