Skip to content

feat(harvest): leave out pages whose transcripts were never checked - #96

Merged
stephen-masters merged 2 commits into
mainfrom
feat/transcript-screen
Nov 22, 2026
Merged

stephen-masters merged 2 commits into
mainfrom
feat/transcript-screen

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

Why

A page marked proofread on Wikisource is supposed to have been read against its scan. Some were not: the scanned file carries an OCR text layer, Wikisource fills a new page from it, and a contributor can tidy the obvious damage and mark the page proofread. Page 232 of Abovyan's first volume had about thirty wrong words in 216 (brief 023).

Such a page is worst as training material. A crop only teaches when the reader disagreed with the transcript and the transcript's label was kept, which is exactly the words an unchecked page gets wrong.

What

A page screen in the crop harvester, on when --screen-wordlist is passed. Before any crop is cut:

  • A transcript word is suspect when our reader read different letters there and stock Tesseract read our reader's word on the page and not the transcript's.
  • The word lists veto a confusion the two readers share (the transcript's word common, theirs rare).
  • A page at 1.5 suspects per hundred words or more gives no crops at all, and summary.json lists it with the words that condemned it.

Stock Tesseract is the second reader because it is free to use on training material. A leftover TESSDATA_PREFIX is ignored on purpose.

scripts/calibrate_transcript_screen.py measures the screen on the evaluation pages, and on training harvests without cutting anything.

How it was measured

Against the words where our reader and a third engine agree against the transcript. That test was checked by hand on page 232: seventeen of seventeen were transcript errors.

Result
Evaluation pages 167
Correlation with the two-engine count 0.74
Left out at the default limit 16
Of the 32 worst pages 14
Of the 85 cleanest pages 1
Page 232 as it stood 3.7 per hundred
Page 232 corrected 0.0

On sixty pages from each of fourteen training sources, the validated ones lose 0 to 3% of pages and Abovyan's first two volumes lose more than a third. The table is in the training skill.

What was tried and dropped

A first version also counted a rare transcript word against a common reading, with no second reader. It left out four of the five dictionary pages: a page our reader finds hard gives many misreadings that happen to be words, and those are the pages the model most needs. The skill records this so it is not reintroduced.

Limits

  • It misses bad pages by design (14 of 32) so that it almost never drops a good one.
  • It rests on Tesseract reading the page at all, so it sees less where Tesseract is weak.
  • No existing dataset is changed. The screen applies from the next crop harvest.

Checks

263 tests pass, 14 of them new. No detector or Tesseract is needed to run them.

🤖 Generated with Claude Code

stephen-masters and others added 2 commits November 19, 2026 17:47
A page marked proofread on Wikisource may be the scanned file's OCR
layer, lightly tidied. Page 232 of Abovyan's first volume had about
thirty wrong words in 216 (brief 023). Such a page is worst as training
material: a crop teaches only where the reader disagreed with the
transcript and the transcript's label was kept.

With --screen-wordlist the crop harvester checks each page before
cutting. A word is suspect when our reading has different letters and
stock Tesseract read our word and not the transcript's; the word lists
veto a confusion the two readers share. A page at 1.5 suspects per
hundred words or more gives no crops and is listed in summary.json.

calibrate_transcript_screen.py measures the screen on the evaluation
pages against two unrelated engines agreeing, and on training harvests
without cutting anything. At the default limit it leaves out 14 of the
32 worst evaluation pages and 1 of the 85 cleanest.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@stephen-masters
stephen-masters merged commit 7fe1f31 into main Nov 22, 2026
3 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