To extract a confidence level at a field level and at a document level in the output .

  • Last Post 27 September 2019
Aman Bhagat posted this 17 September 2019

One of the requirements of my project is to extract a confidence level at a field level and at a document level in the output excel file. I tried it with the Service field in the document definition file which is working for the whole pdf but not on the basis of field wise criteria.

So, Kindly suggest a solution for this.

Thanks in advance.

Order By: Standard | Newest | Votes
sahota posted this 20 September 2019

I am also looking for confidence score at field level. Any help ?

sahota posted this 26 September 2019

I was able to calculate field level confidence score at Document Processing stage (C#) .

Algorithm in C# Workflow Stage (Document Processing Type):

1. Extract field object from Document

2. Iterate Over all the Symbols in the Field Object

3. Keep track if individual character NeedsVerification

4. Calculate confidence = (NonSuspeciousChars/TotalChars)*100

Let me know if someone needs help with this.

Objects/Interfaces used :  Document and ICharacterParams



sara posted this 27 September 2019

Hi Sahota,

Can you send me the exact code and where to write that.


sahota posted this 27 September 2019

Hi Sara , This code has to be written in Advanced Work Flow stage (C#) of Document Processing Type. 

You may have to make few changes in field names . Following fields must exist in your Document Definition : "Your_Field_Name" and "ConfidenceScore". 


string documentDefinationName = Document.DocumentDefinition.Name;

string newAddressParagraphPath=documentDefinationName+"\\Your_Field_Name";

string confidenceScorePath=documentDefinationName+"\\ConfidenceScore";

double iNonSuspeciousCount = 0.0;

double iTotalCount = 0.0 ;

double confidenceScore = 0.0;


foreach(ICharacterParams CharParam in Document.Field(newAddressParagraphPath).Symbols)



    if ( ! CharParam.NeedVerification) {








confidenceScore = (iNonSuspeciousCount/iTotalCount)*100;


Document.Field(confidenceScorePath).Text = confidenceScore.ToString();