Method & Quality

How we measure the pipeline, what the numbers mean, and where their limits lie. Scientifically grounded CER evaluation, last regenerated 2026-08-21 (percentile bootstrap, seed 42, B = 10,000). Full methodology in the repo under knowledge/methodology.md; measured values in docs/data/cer_statistics.json.

What is measured

Character Error Rate (CER) as the Levenshtein distance between pipeline TEI and reference TEI, normalized to the reference length. The reference is 25 ZBZ TEIs created manually in Transkribus. All values are computed over all 25 references (no document exclusion). The fidelity CER is the reliable quality figure; full text and scope are diagnostic quantities. The comparison takes the pipeline end product (output/tei_final/) against the human transcription, not the raw OCR text.

Text extraction with <choice> resolution, footnotes excluded, symmetric Unicode normalization (NFC, quotes, apostrophe, whitespace). The aggregation unit is the document, not the page; the full-text comparison is immune to page-numbering drift. The bootstrap (B = 10,000) yields 95 % confidence intervals via the percentile method, blockwise over documents.

Headline values (all n = 25)

CER of the pipeline TEI against the ZBZ reference TEI, decomposed into real errors and surplus text
MetricMeanMedian95 % CI (mean)
Fidelity CER (primary), real errors2.08 %1.28 %[1.51, 2.73]
Full-text CER (diagnosis, scope included; no quality measure)17.93 %9.59 %[9.47, 28.38]
Scope rate (pipeline surplus text, no error)15.85 %7.03 %
Pipeline gain vs. raw OCR (paired, fidelity)−10.08 ppp = 0.0034
HCPR (diacritics preservation)99.8 %[99.6, 99.96]

Why three numbers? The ZBZ reference TEIs are in part selective partial transcriptions (for example only one of several reviews on a page); the pipeline is often more complete. Large text insertions by the pipeline (≥ 50 characters) are therefore not errors but surplus text (scope). The fidelity CER measures only the real errors and is the reliable quality figure: fidelity + scope = full text. The Transkribus quality bands (< 2 % excellent, 2–5 % good) stem primarily from handwriting recognition practice and flatter a pure print OCR task; decisive is the print OCR literature comparison below. The fidelity median (1.28 %) is solid for historical print but not at the top.

The earlier figure of −14.83 pp for the pipeline gain was an artifact of the trimmed comparison and is retracted; after the reference-verified footnote demotions (E85) and the stock corrections (E94–E98) the gain is −10.08 pp and statistically significant (p = 0.0034, n = 25, 17/25 documents improved). The earlier scope-cleaned subset selection (n = 19) was removed: it followed no reproducible criterion. All values now compute over all 25 references.

Stratified (full-text diagnosis, scope included, n = 25)

The following values are the full-text CER (including pipeline surplus text), a diagnostic quantity, not a quality measure. They sit clearly above the fidelity headline because the ZBZ references are in part selective partial transcriptions and the pipeline surplus text counts as deviation here. A fidelity-exact breakdown per stratum is currently not available.

By layout type
TypenMeanMedian
A (single-column)1223.6 %6.3 %
B (two-column)715.3 %16.9 %
C (monograph)22.8 %2.8 %
D (special)413.3 %10.1 %
By language
LanguagenMeanMedian
French1819.7 %5.6 %
German713.3 %13.4 %

Two-column print (type B) remains the hardest (highest median), mostly column recognition at the layout stage. Such documents are reprocessing candidates, for example python -m scripts.layout.layout_qa_gemini --mode detect --doc {ID}.

Comparison with the research literature (printed historical documents)

SourceMethodLanguageCER
Greif et al. 2025Transkribus M1 + Gemini 2.0 post-correctiondeu (mostly Fraktur)0.84 %
Greif et al. 2025Gemini 2.0 Flash zero-shotdeu (mostly Fraktur)1.27 %
Hersch pipeline (own)Mistral + Docling + Gemini TEIfra/deu1.28 %
Levchenko 2025Gemini 2.5 Prorus (18th c.)3.36 %
Greif et al. 2025Transkribus M1 alonedeu (mostly Fraktur)3.67 %
Greif et al. 2025GPT-4o directdeu (mostly Fraktur)6.31 %
Levchenko 2025traditional OCRrus21.55–45.96 %

The Hersch median (1.28 %) lies between Greif's best stack (Transkribus + LLM post-correction, 0.84 %) and Transkribus alone (3.67 %), better than Gemini 2.5 Pro zero-shot on comparable material. Only sources from 2025 onward are cited; the complete list is in the repo.

Limitations

The honest disclosure of these points is part of the methodology. Whoever cites the headline numbers should cite the limitations with them.

Tools & reproducibility

Statistics library
scripts/eval/cer_statistics.py
Orchestrator
scripts/eval/cer_statistics_full.py
Test suite
python -m pytest tests/test_cer_statistics.py -q
JSON generation
python -m scripts.eval.cer_statistics_full --seed 42 --bootstrap-n 10000
Output
docs/data/cer_statistics.json (deterministic at seed 42, versioned in the repo)
Methodology docs
knowledge/methodology.md (method), docs/project-report.md (values)
Schema
data/schema/zbz_hersch.rng (project-specific RelaxNG, the format authority for the delivered TEI)

Research literature (selection, all 2025+)