A Transmission, With Compassion

a tiny python script to help with transcription/groundtruth

The slow part of HTR isn't running the model. It's correcting the output line by line until you have ground truth you'd actually trust to train on. For BnF lat. 9561 that's 318 lines on the leaves I'm working with, in an uncial hand that no off-the-shelf model reads well. So I vibecoded a small tool to make the correcting less miserable.

It's called Line Corrector, which is about as glamorous as it is. For each line it shows three things stacked under the line image:

You can take either source as a starting point (Ctrl+1 / Ctrl+2), fix it against the image, and hit Enter to mark the line verified and move on. Alt+arrows move between lines, edits save as you type, and Push verified sends the finished lines back to eScriptorium.

Line Corrector on f. 15r, line 1

The edition row is the tempting one, and it's also the one that will quietly ruin your ground truth if you let it. An edition is not the manuscript. It gives you voluisse, while the scribe wrote uoluisse. It adds punctuation the page doesn't have, regularizes spelling, expands abbreviations and chooses its own word division. So the tool keeps a standing reminder under every line: check ae/e, i/y, abbreviations and word breaks against the image. The edition helps me find my place, but the image is still what I'm transcribing from.

Two small pleasures. Line 1 opens mid-word ("…storalis curae"), so you can watch the Regula pastoralis start in the middle of its own first word. And the machine's FUGERADILITISCENDO gets most of the letters of fugere delitescendo right; it just has no idea where one word stops.

The hard part of ground truth turns out to be staying faithful to the scribe. The model I’m training toward, CATMuS Medieval, learns from strictly graphematic transcriptions: his spelling, his word division, and none of his abbreviations expanded. His shorthand is everywhere (quib:dā, adq;, q̄d, n̄, a p with a stroke through it for per), and a text box isn’t built for any of it. So Line Corrector now has a toolbar of special letters under the edit box: a combining macron (Alt+M puts a stroke over the letter you just typed), ę, ꝑ, ꝓ, ꝯ, ⁊, and the ; and : that end words like quib: and quisq:. One click, and the scribe’s own sign goes where the cursor is.

#dry-points