Make OCR word un-compositing fully optional (#12243)#12251
Merged
Conversation
The "Fix common OCR errors" engine split merged words (e.g. "wehad" -> "we had") via two paths, but only one was gated by a setting: - The curated word-split list obeyed "OCR: use word split list". - The heuristic UnknownWordGuesser (affix/particle/phonetic splitting) ran unconditionally, so turning the setting off still left words being split - over-correcting more than it fixed. Gate the heuristic splitter behind the same UseWordSplitList toggle so one checkbox disables all un-compositing. Also stop the Fix-common-OCR-errors tool from forcing guess-unknown-words on; it now honors the user's DoTryToGuessUnknownWords preference (as the OCR window and SE 4 did), and expose that preference as a checkbox in the Tools settings section. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Fixes #12243.
Problem
In the "Fix common OCR errors" engine, merged words (e.g.
wehad→we had) were split by two independent paths, but only one was gated by a setting:{iso}_WordSplitList.txt)UnknownWordGuesser(affix/particle/phonetic splitting)So even after disabling the word-split list, the aggressive heuristic splitter kept splitting words — "making more errors than it fixes," as the reporter put it, with no way to turn it off. This differs from SE 4, where the tool didn't force this behavior.
Changes
UseWordSplitList()check, so the "OCR: use word split list" checkbox now disables all merged-word splitting. (seconvkeepsUseWordSplitList => true, so CLI behavior is unchanged.)DoTryToGuessUnknownWords(matching the OCR window and SE 4).Defaults are unchanged (both settings default on), so existing behavior is preserved for users who want it.
🤖 Generated with Claude Code