fix(ocr-review): add pipe→1 as valid OCR correction in _is_spurious_change
Extend _OCR_CHAR_MAP to treat '|' as a possible misread of digit '1' in addition to letters l/L/i/I. Fixes cases like 'cross = |. Kreuz' → 'cross = 1. Kreuz' (numbered list prefix) being rejected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5487,8 +5487,8 @@ def _is_spurious_change(old_val: str, new_val: str) -> bool:
|
||||
'6': set('gG'),
|
||||
'8': set('bB'),
|
||||
# Non-letter symbols mistaken for letters
|
||||
'|': set('lLiI'), # pipe → lowercase l or capital I
|
||||
'l': set('iI|'), # lowercase l → capital I (and reverse)
|
||||
'|': set('lLiI1'), # pipe → lowercase l, capital I, or digit 1
|
||||
'l': set('iI|1'), # lowercase l → capital I (and reverse)
|
||||
}
|
||||
has_valid_fix = False
|
||||
if len(old_val) == len(new_val):
|
||||
|
||||
Reference in New Issue
Block a user