fix: Correct logical condition for better OCR candidate selection
This commit is contained in:
@@ -987,8 +987,8 @@
|
||||
const reasons = getOcrPhiReasons(text);
|
||||
|
||||
const isBetter = reasons.length > bestReasons.length
|
||||
|| (reasons.length === bestReasons.length && text.length > bestText.length)
|
||||
|| (reasons.length === bestReasons.length && text.length === bestText.length && confidence > bestConfidence);
|
||||
|| (reasons.length === bestReasons.length && text.length > bestText.length)
|
||||
|| (reasons.length === bestReasons.length && text.length === bestText.length && confidence > bestConfidence);
|
||||
|
||||
if (isBetter) {
|
||||
bestText = text;
|
||||
|
||||
Reference in New Issue
Block a user