An ABBYY FlexiCapture classifier processes submitted documents and determines their class. This lets you choose a document definition to be used for field extraction.Each classifier corresponds to a specific classification training batch.If you want to use several classifiers for a single batch, you need to set up a classification script. This can be useful when there are documents that need to undergo additional classification. In this case, the first classifier will be used to classify the documents according to their class, and then, an additional classifier will be selected from the script depending on the classification results. For example, documents can be first classified into “invoices” and “contracts”, then the invoices can be further classified according to company name.
This script can only be set up for an already existing classification training batch and cannot be set up when creating a new batch.
To set up a classification script:
Open Project → Project Properties…
Go to the Recognition tab found in the project properties window.
Open the classification script Editor by clicking Set… to the right of Use script in the Classification section.
In the dialog box, select an appropriate classifier by clicking Add… and choosing a classification batch from the list.
Now, you can change a classifier’s Alias Name. This allows you to not have to rewrite a script if a classifier’s name has been changed during processing. The script will refer to the particular name specified in the Alias Name column.
Classification confidence. Unlike working with automatic classifiers, when working with the script this parameter must be manually specified in page properties.
Sample script that assigns the Unknown class to documents, whose classification confidence turns out to be lower than the specified value
The following script can be used if your scenario does not require documents with a low confidence level to be assigned a class (even if a class has already been specified for them). Such documents should be classified manually by an operator.Important! For the script to work, a new class should be created beforehand — for example, “Unknown”. Then, it should be linked to the document definition in the Class Mapping… dialog. For more information, see Mapping classes to Document Definition sections.
{ //FCTools.ShowMessage( c.Name + " -- " + c.Confidence.ToString() ); // records the classification confidence value in the event log Page.Comment = Page.Comment + c.Name + "-" + c.Confidence.ToString() + "; "; // records the classification confidence value in the page comments
}
if (classVars.Count>0)
{ if (classVars[0].Confidence<80) Page.IsResultClassConfident=false; // confidence threshold below which a document will be classified as uncertainly classified else Page.IsResultClassConfident=true;
if (classVars[0].Confidence<20) Page.ResultClassName="Unknown"; // confidence threshold below which a document will be assigned the "Unknown" class if (classVars.Count>1) {
int classesToShow = Math.Min(classVars.Count, 3); for(int i=0; i<classesToShow; i++)
Note: The confidence threshold values in this script are only for demonstration purposes and can be modified by the user depending on a particular workflow.