Skip to content

Better Japanese post-processing#570

Merged
TheJoeFin merged 4 commits into
devfrom
better-cjk
Jul 5, 2026
Merged

Better Japanese post-processing#570
TheJoeFin merged 4 commits into
devfrom
better-cjk

Conversation

@TheJoeFin

Copy link
Copy Markdown
Owner
  • Add more testing
  • Add better handling of spaces

@TheJoeFin TheJoeFin added enhancement New feature or request General Processing Relating to the processing of images to some type of text output labels Nov 10, 2025
Base automatically changed from dev to main November 16, 2025 07:05
@TheJoeFin TheJoeFin marked this pull request as draft December 19, 2025 04:54
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>
@TheJoeFin TheJoeFin changed the base branch from main to dev July 5, 2026 02:46
TheJoeFin and others added 3 commits July 4, 2026 22:14
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.
@TheJoeFin TheJoeFin marked this pull request as ready for review July 5, 2026 22:41
@TheJoeFin TheJoeFin merged commit 865556e into dev Jul 5, 2026
1 check passed
@TheJoeFin TheJoeFin deleted the better-cjk branch July 5, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request General Processing Relating to the processing of images to some type of text output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant