Better Japanese post-processing#570
Merged
Merged
Conversation
TheJoeFin
commented
Nov 10, 2025
Owner
- Add more testing
- Add better handling of spaces
Ports the furigana-stripping feature from the previous better-cjk work onto dev's OCR pipeline. Small ruby-text characters rendered above the main text are detected by height and vertical position and removed before the CJK words are merged in GetTextFromOcrLine. Adds a deterministic unit test using OCR test doubles rather than the prior branch's flat-word-border approach, which depended on the now-removed PostOcrUtilities implementation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Covers the FilterFurigana heuristic directly (empty/single/uniform input, overlap and vertical-position requirements, the "larger word below" requirement, and the word-length cutoff) plus end-to-end language gating through BuildTextFromOcrLines for Japanese, Chinese, and space-joining languages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Added a user setting to enable/disable furigana (ruby text) removal from Japanese and Chinese OCR results. Updated LanguageSettings UI with a toggle, explanation, and info note. Synced toggle state with settings and cache invalidation logic.
Comprehensive Japanese OCR test coverage with a new furigana-annotated image. Added geometry-based line ordering and furigana line filtering to OcrUtilities, with opt-in removal via settings. Updated test project to include the new image and validated all new behaviors with unit tests.
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.