refactor: Clean up OCR debug table structure and remove redundant regex checks
This commit is contained in:
@@ -754,13 +754,6 @@
|
|||||||
return getOcrPhiReasons(text).length > 0;
|
return getOcrPhiReasons(text).length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return /(ref|rk9|rh8|ra9|rbz|rba)\d+/i.test(value)
|
|
||||||
|| /\b\d{3}[\s-]?\d{3}[\s-]?\d{4}\b/.test(value)
|
|
||||||
|| /\b\d{10}\b/.test(value)
|
|
||||||
|| /\b\d{6,8}\b/.test(value)
|
|
||||||
|| /\b(?:dob|d\.o\.b|birth|born)\b/.test(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildOcrSamples(records) {
|
function buildOcrSamples(records) {
|
||||||
const includeRecords = records.filter((record) => record.include);
|
const includeRecords = records.filter((record) => record.include);
|
||||||
const seriesMap = {};
|
const seriesMap = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user