The model writes what is on the page, as it is laid out — plain text, one line per written line, plus a few paired marks for what a plain transcription loses. The training ground truth is written in the same format.
-.Each mark has its own opening and closing character, so nesting stays readable.
| Mark | Meaning | Example |
|---|---|---|
⟦…⟧ | struck through (words, phrases, a line) | Sie werden ⟦bereits⟧ wissen |
⟨…⟩ | inserted (above or below the line, in the margin) | der ⟨alte⟩ Freund |
〔…〕 | underlined | 〔Berlin〕 |
〔〔…〕〕 | double underlined — in the format and the converter; the current model has not been trained on it yet | 〔〔Zürich〕〕 |
⌈…⌉ | superscript | 1⌈te⌉, D⌈r⌉ |
⌊…⌋ | subscript | H⌊2⌋O |
⌈+⌉ | the writer's insertion or reference sign | |
▨ | one lost or illegible spot (damage, blot, unreadable) — no length | am ▨ Juni |
⟦ab⌈c⌉⟧. The same mark does not nest in itself —
except the double underline, two underline pairs directly inside each other.u., Hr., d. J.), punctuation, capitalisation;
nothing is expanded or normalised.m / n (U+0305, e.g. m̅).s, two keep ſ. The model
therefore writes ſ only occasionally (in hands like those sources); normalise ſ → s
if you need uniform text.⟦bereits⟧ schon. Only a replacement written elsewhere (above, below, in
the margin) carries ⟨ ⟩.⌈+⌉) is not wrapped in ⟨ ⟩: the
sign already says it was moved.↵; a paragraph break inside a cell is ↵↵.↵. Read ↵ outside a table as a line break: OCR Lite and convert_output.py do.Name Ort Jahr
Humboldt Berlin 1856
Kardong↵(Lahaul)
Editions (TEI) follow the logic of the text; this model follows the layout of the page. Where they differ, the ground truth was rebuilt in page order:
Compare the output with an edition's text only after accounting for this: plain CER against an edition's reading text overstates the error.
convert_output.py (shipped with the model on Hugging Face) turns the output into plain TEI P5, or into
a self-contained HTML viewer of that TEI — the examples are made with it:
python convert_output.py page.txt --to tei --status raw > page.xml
python convert_output.py page.txt --to html --status raw > page.html
| Output | TEI |
|---|---|
| line / blank line | <lb/> / <ab> per block |
⟦…⟧ | <del rend="strikethrough"> |
⟨…⟩ | <add> |
〔…〕 / 〔〔…〕〕 | <hi rend="underline"> / <hi rend="double-underline"> |
⌈…⌉ / ⌊…⌋ | <hi rend="superscript"> / <hi rend="subscript"> |
⌈+⌉ | <metamark rend="superscript">+</metamark> |
▨ | <gap/> |
TAB / ↵ | <table><row><cell>, <lb/> in a cell |
The TEI is a diplomatic transcription in page order, with no <choice>, <expan>
or editorial apparatus. A mark the model runs across a line break is closed and reopened per line, and noted; any other
malformed mark is reported with its line number and nothing is written.