ConfidenceString property

The ConfidenceString property sets or gets the confidence values for the primary character data in a field object.

The value of each character can be 0 - 9 and corresponds to integer confidence levels of 0 to 9. After Datacap scans a page and applies recognition rules, Datacap generates an XML file that contains confidence levels for characters in each field on a page. The XML code adds a value of 1 to the confidence level so that the range in XML is 1 - 10.
In this XML sample for the Vendor field, the fourth character contains a confidence level of 6 for the primary character value. The first alternative character value has confidence level of 8, and the second alternative character value has a confidence level of 4.
<F id="Vendor">
       <V n="TYPE">Vendor</V>
       <V n="Position">0,0,0,0</V>
       <V n="Status">1</V>
       <C cn="6,8,10" cr="0,0,0,0>83,49,53</C>
       <C cn="6,8,10" cr="0,0,0,0>116,50,54</C>
       <C cn="6,8,10" cr="0,0,0,0>105,51,55</C>
       <C cn="6,8,4" cr="0,0,0,0>110,52,56</C>

Syntax

VBScript
oDCO.ConfidenceString as String
C#
string ConfidenceString { set; get; }

Applies to

Field objects only.

Type

Read and write.

C# example

This example sets and gets the confidence string that is associated with the primary character data in the Vendor field. The root of the search in this case is the page object.
m_oDCOPage.FindChild("Vendor").ConfidenceString = "7777";
string strReturn = m_oDCOPage.FindChild("Vendor").ConfidenceString;
  • The confidence levels that you specify are the internal confidence levels (0 - 9). When you write them to the page XML file, field object and parent page object confidence values are raised by 1 because the XML values range 1 - 10.
  • If the field contains more characters than specified when you are setting the confidence string, the last specified character is used for all remaining characters. For example, if you specify 1234 but the field has 10 characters, the remaining 6 characters are assigned a confidence value of 4.