Skip to content

feat: add visual OCR review report - #2

Merged
SimpleCaci merged 4 commits into
mainfrom
codex/showcase-upgrade
Jul 14, 2026
Merged

SimpleCaci merged 4 commits into
mainfrom
codex/showcase-upgrade

Conversation

@SimpleCaci

Copy link
Copy Markdown
Owner

Summary

  • Add a self-contained HTML review report pairing each source page with recognized text.
  • Calculate and display average OCR word confidence per page.
  • Keep the existing text and PDF outputs unchanged and document the new workflow.

Progression

  • Previous state: OCR exported text and PDF without an easy visual comparison step.
  • New state: every conversion can produce a portable source/transcription review page.
  • Next unlock or recommended follow-up: install Tesseract locally and capture a reviewed before/after sample.

Changes

  • Switch OCR collection to structured Tesseract data so word confidence is available.
  • Embed source images directly in a responsive, print-friendly HTML report.
  • Add --no-review-report for text/PDF-only runs.
  • Extend deterministic tests for confidence, escaping, and embedded images.

Impact

  • Added: reviewable HTML output and per-page confidence.
  • Improved: transparency around imperfect handwriting recognition.
  • Unchanged: local-only processing and existing text/PDF exports.

Verification

  • Automated tests — 4 passed
  • Lint/type-check — Ruff passed
  • Manual behavior check — Tesseract executable is not installed in this environment
  • Security/privacy review — report stays local and embeds only user-selected source files

Risks and Trade-offs

  • Confidence is Tesseract's word-level estimate, not a guarantee of transcription accuracy.
  • Embedded source images can make the HTML report large.

Reviewer Focus

Review the structured OCR conversion and HTML escaping/data-URI generation in main.py.

Follow-ups

  • Run the sample set with a local Tesseract installation.
  • Add orientation and perspective correction separately.

@SimpleCaci
SimpleCaci merged commit e3233d6 into main Jul 14, 2026
2 checks passed
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