To use the functionality in ABBYY FlexiCapture SDK, you will need a license that allows you to use the Document Definition associated with the solution.
- USA (English)
- Germany (German)
- France (French)
- Spain (Spanish)
- Create a new project of a Purchase Orders type with the help of ABBYY FlexiCapture 12 Developer’s Package.
- Customize the project to your needs, managing validation rules and using data sets.
- Open it in ABBYY FlexiCapture SDK using the OpenProject method of the Engine object (see also Opening the Project).
Training to extract fields using a “Variants” data set
For a project of a Purchase Orders type, you can train field extraction for a variant of a Document Definition section. Document Definition has a “Variants” data set to which you should add a record populating the information about your purchase order.- Add a new record to the “Variants” data set using AddNew method of the DataSetTableRecords object.
- Add a new training batch using the AddNew method of the FieldsExtractionTrainingBatches object.
- Pass the SectionDefinition object for the section and the DataSetTableRecord object record from the “Variants” data set for the section variant.
- Add the images for training to the batch. Call the Recognize method of the Batch object to match the Document Definition and recognize all the documents in the batch.
- Correct the layout of the fields that will be trained. Assign the correct region to each field by calling the SetFieldRegion method of the Page object.
- Train field extraction. Get the FieldsExtractionTrainer object from the training batch and call its Train method. The Document Definition will be updated automatically.
Processing purchase orders without data sets
The process of capturing purchase orders can be carried out without data sets. In this case, training uses the clustering feature, which is enabled by default when creating a project with the help of ABBYY FlexiCapture 12 Developer’s Package.- Add a new training batch using the AddNew method of the FieldsExtractionTrainingBatches object. Pass NULL as a value of the Record parameter.
- Add some documents for training. On each page, find the fields that you are going to train, for example, the Total field.
- Get the FieldsExtractionTrainer object using the FieldsExtractionTrainer property of the FieldsExtractionTrainingBatch object.
- Train fields extraction by calling the Train method of the trainer object.
- Now you can recognize the documents from the working batch similar to those used in training calling the Recognize method of the Batch object. The fields you have trained should be detected and extracted more precisely.
