Repository navigation
feat(harvest): leave out pages whose transcripts were never checked - #96
Merged
Merged
Conversation
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>
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.
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-wordlistis passed. Before any crop is cut:summary.jsonlists 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_PREFIXis ignored on purpose.scripts/calibrate_transcript_screen.pymeasures 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.
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
Checks
263 tests pass, 14 of them new. No detector or Tesseract is needed to run them.
🤖 Generated with Claude Code