OCR fix lists: adopt the safest community rules from #12644#12649
Closed
niksedk wants to merge 1 commit into
Closed
OCR fix lists: adopt the safest community rules from #12644#12649niksedk wants to merge 1 commit into
niksedk wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts the strictly-safe subset of fraternl's community OCR fix lists from #12644 into the shipped
Dictionaries/*_OCRFixReplaceList.xmlfiles.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
iihrer→ührer\b([Ss])efior→${1}eñorompafier/ompafiar→ompañ…\bILy a\b→Il y ad'ou→d'où5 *'il→S'il,s 'il(s)→s'il(s),I'a→l'a,t' a…→t'a…5O5→SOSRegularExpressionsIfSpelledCorrectly— double-gated by the dictionaryiihrer→ührer;niñal→niña!,túl→tú!''n/''t→'n/'t;wanner→wanneerDeliberately not adopted
'n→eenrewrites, music-symbol removal,…→..., a.m./degree spacing — not OCR errors.he cause→because(matches "did he cause"),solucionario→solucionarlo(real word),Neel→Nee!(a name),gebeurd hier→gebeurt(can be valid word order),EI→El(real Spanish usage, e.g. "EI" as acronym),5O5with[O0](number 505), accepted spellings facade/voila/deja vu,\bAil\b→All ("ail" is a word),and 1→and I(digits are legit).${3}, a replacement inserting a literal$[, a\r?ntypo.XML well-formed, all regexes compile, 132 OCR tests pass.
🤖 Generated with Claude Code