Hi Everyone,
I have a task, where I have 7 vendors, and I need to filter only one particular vendor and check for confidence score of each field for that vendor. If the confidence score of that particular vendor of each field is above 90 % then we can export the extractionresults directly to excel else need to push to Action center. I can only get the overall confidence score from the extraction results. Please help to filter only that particular vendor and get confidence score of each field to be above 90%?
Check this below approach.
- Set Export Extraction Activity property IncludeConfidenc = True
DataTable how it looks like with above prorpertly :
Sample Fields: SampleFieldsDT
InvoiceDate,InvoiceDate - Confidence,InvoiceNumber,InvoiceNumber - Confidence,PONumber,PONumber - Confidence,GrandTotal,GrandTotal - Confidence,VendorName,VendorName - Confidence,SalesTax,SalesTax - Confidence,LineItems,LineItems - Confidence
LineItems: LineItemsDT
PartNumber,PartNumber - Confidence,QuantityShipped,QuantityShipped - Confidence,LineItemTotal,LineItemTotal - Confidence,Description,Description - Confidence
Get DUExtractedVendorName : SampleFieldsDT.Tables(0).Rows(0)(in_Config(“VendorName”).ToString
Check Vendorname :
DUExtractedVendorName.ToUpper.Contains(“Keyword1”) Or
DUExtractedVendorName.ToUpper.Contains(“Keyword2”)
Check Sample Fields Confidence:
If(String.IsNullOrEmpty(SampleFieldsDT.Tables(0).Rows(0)(in_Config(“Invoice_InvoiceNumber”).ToString + " - Confidence").ToString), 0,
Convert.ToDecimal( SampleFieldsDT.Tables(0).Rows(0)(in_Config(“Invoice_InvoiceNumber”).ToString + " - Confidence").ToString) * 100)
Explanation:
If InvoiceNumber is empty confidence is 0
Else DU extracted confidence
Check LineItemsFields Confidence
Iterate the LineItems datatable
if(String.IsNullOrEmpty(CurrentRow(in_Config(“InvoiceLineItem_PartNumber”).ToString + " - Confidence").ToString), 0, Convert.ToDecimal(CurrentRow(in_Config(“InvoiceLineItem_PartNumber”).ToString + " - Confidence").ToString) * 100) < Convert.ToDecimal(in_Config(“InvoiceLineItem_PartNumber_ConfidenceScore”).ToString)
Explanation:
If PartNumberis empty confidence is 0
Else DU extracted confidence
I Hope this would help you.
Here is the link would help you.
(2) Different way of knowing Document understanding fields confidence score. | LinkedIn
Thank you… Actually I got this through the following expression.
For filtering vendor name:
ExtractionResult.ResultsDocument.Fields(5).Values(0).Value OR ExtractionResult.ResultsDocument.DocumentTypeName.ToString
For checking confidence score for each fields:
ExtractionResult.ResultsDocument.Fields(i).Values(0).Confidence
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.