User Corrected Results
User Corrected Results (UCR) lets your end-users tell Anyline when a scan was wrong: they simply type the value they should have received and send the corrected result to Anyline to improve future accuracy.
Prerequisites
UCR is opt-in, and you decide how it is implemented in your app. Additionally, your Anyline License Key needs to have the relevant flag enabled for UCR. Please contact your CSM or Support for further information.
Reporting a corrected result
After a successful scan, you can provide your end user with a UI element to correct the scanned data by calling the reportCorrectedResult
method with the blobKey
you have acquired from the scan result:
let blobKey = result["blobKey"];
if (typeof blobKey === 'undefined' || blobKey === '' || blobKey === null) {
//Only licenses with 'debugReporting' set to 'on' allow user corrected results.
} else if (correctedResult !== "") {
AnylineOCR.reportCorrectedResult(blobKey, correctedResult, onReportCorrectedResultResponseHandler, onReportCorrectedResultErrorHandler);
}
let onReportCorrectedResultResponseHandler = function (response) {
setResponseText("UCR report succeed with message: " + response);
}
let onReportCorrectedResultErrorHandler = function (error) {
setResponseText("UCR report failed with message: " + error);
}
Wait about 1 second after the original scan call before reporting the correction so the backend has the original result first. |