How to disable default class assignation

If the user will load an image that contains dummy data, then FlexiCapture will assign the default class. This article will show how to avoid this assignation. Please note, that you should apply these changes can be applied to default Project Properties or to any Batch Type.

Step-by-step guide

  1. First of all, add a Classification batch. You can train the classifier within Project Setup Station itself.mceclip0.png Alternatively, create a classifier in the FlexiLayout studio and export it. Then load it to the batch. 
    mceclip0.png
    mceclip1.png
  2. Go to the Recognition and select Classification->Use script. Add a previously created batch and click Edit Script.
    Paste the next code and save.
    IClassificationResult result = Classifiers[0].ClassifyPage( Page);
    Page.Document.Properties.Set("ConfidentProp", result.IsConfident?"1":"0");
  3.  Now in the event Before Matching, use the following script:
    if(Document.Properties.Get("ConfidentProp")=="0")
      Matching.DefinitionsList=null;


  4. If you need to assign a custom DocumentDefinition, then use the next code:
    if(Document.Properties.Get("ConfidentProp")=="0"){
      Matching.ForceMatch=true;
      Matching.DefinitionsList="None\\None";
    }

Related articles

  1. https://help.abbyy.com/en-us/flexicapture/12/developer/script_classification
  2. https://help.abbyy.com/en-us/flexicapture/12/developer/iexportimagetools

 

Was this article helpful?

1 out of 2 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed