Skip to content

OCR fix lists: adopt the safest community rules from #12644#12649

Closed
niksedk wants to merge 1 commit into
mainfrom
feat/ocr-fix-lists-community-12644
Closed

OCR fix lists: adopt the safest community rules from #12644#12649
niksedk wants to merge 1 commit into
mainfrom
feat/ocr-fix-lists-community-12644

Conversation

@niksedk

@niksedk niksedk commented Jul 19, 2026

Copy link
Copy Markdown
Member

Adopts the strictly-safe subset of fraternl's community OCR fix lists from #12644 into the shipped Dictionaries/*_OCRFixReplaceList.xml files.

Selection bar

Only rules that fix unambiguous OCR errors and cannot fire on legitimate text. Every adopted rule was behaviorally verified in .NET (fix cases + must-not-change cases, all passing) and deduped against the shipped lists.

Adopted

Lang Rule Fixes
eng iihrerührer Fiihrer/Obergruppenfiihrer (ü misread as ii)
eng \b([Ss])efior${1}eñor Sefior/sefiorita (ñ misread as fi)
eng ompafier/ompafiarompañ… compafiero, acompafiar
fra \bILy a\bIl y a classic merge
fra d'oud'où always wrong in French
fra 5 *'ilS'il, s 'il(s)s'il(s), I'al'a, t' a…t'a… 5/S, spaced apostrophes, I/l
fra 5O5SOS narrowed: letter O only — the contributed rule also matched the number 505
fra mère/père, très, Là in RegularExpressionsIfSpelledCorrectly — double-gated by the dictionary
spa iihrerührer; niñalniña!, túltú! ü and !-as-l
nld ''n/''t'n/'t; wannerwanneer doubled apostrophe, non-word

Deliberately not adopted

  • Style rules: imperative "Stop." → "Stop!" (60+ rules), 'neen rewrites, music-symbol removal, ..., a.m./degree spacing — not OCR errors.
  • Rules that corrupt legitimate text: he causebecause (matches "did he cause"), solucionariosolucionarlo (real word), NeelNee! (a name), gebeurd hiergebeurt (can be valid word order), EIEl (real Spanish usage, e.g. "EI" as acronym), 5O5 with [O0] (number 505), accepted spellings facade/voila/deja vu, \bAil\b→All ("ail" is a word), and 1and I (digits are legit).
  • Buggy rules in the contributed files: doubled ${3}, a replacement inserting a literal $[, a \r?n typo.

XML well-formed, all regexes compile, 132 OCR tests pass.

🤖 Generated with Claude Code

fraternl shared user OCR fix lists for English, French, Dutch and
Spanish refined over years (#12644). Adopted only the rules that fix
unambiguous OCR errors and cannot fire on legitimate text - every rule
was behaviorally verified in .NET with fix cases and must-not-change
cases, and deduped against the shipped lists.

eng: iihrer->ührer (ü misread as ii), Sefior->Señor family (ñ as fi),
compafiero/acompafiar. fra: ILy a, d'ou->d'où, 5'il->S'il, spaced
apostrophes (s 'il, t' aime), I'a->l'a, 5O5->SOS (letter O only - the
contributed rule also matched the number 505 and was narrowed), plus
dictionary-gated mère/père/très/Là diacritic fixes in the
IfSpelledCorrectly section. spa: iihrer, niñal->niña! and túl->tú!
(! misread as l). nld: doubled-apostrophe ''n/''t collapse,
wanner->wanneer.

Deliberately NOT adopted: style rules (imperative "Stop." -> "Stop!",
'n->een rewrites, music-symbol removal, ellipsis/a.m. normalization),
rules that corrupt legitimate text ("he cause"->because matches "did he
cause", solucionario is a real word, Neel is a name, "gebeurd hier" can
be valid word order, EI is real Spanish usage, 505 room numbers,
accepted spellings like facade/voila/deja vu), and rules with bugs in
the contributed files (doubled ${3}, $[ in replacement).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@niksedk niksedk closed this Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant