Late Edition: Giving OCR Text a Second Look
Description and use
Late Edition uses a Gemma model to correct OCR errors, applying strict safety checks to avoid unwanted changes.
Problem
OCR can misread characters, distort words, and turn a perfectly readable page into a messy block of text.
Outcome
32 passing tests and 6 failures; validation thresholds tested on a small sample; model only receives OCR text, not original image.
Workflow
- Split the OCR text into manageable chunks
- Request corrections from a Gemma model via Gemini API
- Validate each proposed correction with deterministic checks (digits, capitalized words, similarity threshold)
- Generate an HTML report showing original text, accepted edits, and rejected suggestions
Evidence
OCR can misread characters, distort words, and turn a perfectly readable page into a messy block of text.
Late Edition takes OCR text, splits it into chunks, and sends those chunks to a selected Gemma model.
Before accepting a proposed correction, it runs a set of deterministic checks to decide whether the change is safe enough to keep.
The validation layer checks three things: Digits, Capitalized words, Text similarity.
My latest test run reported 32 passing tests and 6 failures.
The model only receives OCR text; it never sees the original page image to verify a suspected error.
- Record date: 2026-11-01T14:58:45.113Z