- Introduced by
- Transkribus and the READ project
- Year
- 2019
- Type
- ml-recognition-pipeline
- Family
- document-image-recognition
What does it do?
Handwritten text recognition (HTR) for archives converts digital images of manuscript pages into searchable, machine-readable text.
Optical character recognition, designed for print, handles handwriting poorly, so HTR uses neural networks trained on transcribed examples of a given script. The Transkribus platform, developed with EU Horizon 2020 funding, applies a pipeline of layout analysis, line segmentation and line recognition to archival material, producing text that can feed full-text search and downstream named-entity recognition.
The intuition behind the method
Printed text is uniform, since every instance of a letter comes from the same font, so machines learned to read it long ago. Handwriting varies: each scribe forms letters differently, ink fades, abbreviations are common, and older scripts can defeat even trained paleographers. For most of history, manuscripts could only be read by people, one page at a time, which left large archives effectively unsearchable. HTR trains a neural network to learn the shapes of one hand or style from examples, then read pages it has not seen. The model is given images alongside correct transcriptions, learns the mapping from ink to text, and can then transcribe similar material, improving as its errors are corrected. Handwriting recognition is therefore a learning problem rather than a fixed set of rules: the model internalizes the quirks of the scripts it is shown.
History
Automatic handwriting recognition has long been studied in pattern recognition, but historical manuscript transcription has been difficult for methods developed for print. The Transkribus platform, developed with EU Horizon 2020 funding, was described in a 2019 case study by Muehlberger et al. as the one openly available HTR platform for individual collections of historical documents at the time of writing. That study reported that HTR is now usable technology, which can be employed alongside mass digitisation to generate accurate transcripts of archival material. Its machine-readable output in turn connects HTR to named-entity recognition and corpus text mining.
When to use it
Use handwritten text recognition when you need to make large quantities of handwritten archival material machine-readable and searchable, and manual transcription would be prohibitively slow. It suits collections of letters, administrative registers, charters, parish records, and notebooks, especially where many pages share a similar hand, period, or language that a model can learn. The approach requires good-quality page images and some transcribed ground truth to train or adapt a recognition model, with accuracy depending on script regularity and image condition. Before relying on the output, measure error rates on held-out pages of the collection. HTR is the entry point of a digital-history pipeline, producing the text that named-entity recognition and corpus text mining then exploit. It is less worthwhile for tiny collections, for extremely heterogeneous or damaged hands where models cannot reach usable accuracy, or where high-quality transcriptions already exist.
Limitations and considerations
- Requires transcribed ground truth to train or adapt models for each hand.
- Accuracy drops on highly irregular, damaged, or low-contrast manuscripts.
- Layout and line-segmentation errors propagate into transcription mistakes.
- Models trained on one scribe or period transfer poorly to very different hands.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Makes previously unsearchable handwritten archives machine-readable at scale.
- Learns specific scripts from examples, handling variation print OCR cannot.
- Improves continuously as scholars correct output and expand training data.
- Provides the foundational text layer for downstream NER and text mining.
Applications
- Transcribing large correspondence collections to enable full-text search of letters.
- Making administrative registers and account books machine-readable for economic history.
- Digitizing parish and notarial records for demographic and genealogical research.
- Opening medieval and early modern charters and codices to large-scale analysis.
- Producing searchable text from field notebooks and diaries in archival collections.
How it works
How it works
The pipeline begins with a digitized page image, which is preprocessed to aid recognition. Preparation typically includes binarization, denoising, deskewing and contrast enhancement, which compensate for faded ink, stains, bleed-through and uneven scanning. The recognizer can only work with what the image presents, so scan quality and preparation strongly affect the final result. This stage produces a clean input from which page structure and individual lines can be detected.
Formula
I : \text{page image}, \; \text{binarize/denoise}Layout analysis segments the page into structural regions, distinguishing main text from margins, headers, marginalia, tables and illustrations, and determines reading order. Manuscript pages are often irregular, with insertions, multiple columns and annotations, so accurate region detection is needed to avoid scrambling the text. This step isolates the coherent blocks of writing that will be split into lines and recognized, preserving the document's organization in the output.
Formula
I \to \{R_1, \ldots, R_m\}, \; R_j = \text{text region}Within each text region, line segmentation identifies the individual lines of writing, which are the units the recognizer processes. Historical handwriting complicates this task, with sloping, crowded or overlapping lines and ascenders and descenders that intrude on neighbouring rows. Errors here, such as merged or split lines, carry directly into the transcription, whatever the quality of the recognizer itself.
Formula
R_j \to \{\ell_1, \ldots, \ell_p\}, \; \ell = \text{text line}Each segmented line image is passed to a neural recognition model, commonly combining convolutional feature extraction with recurrent or transformer layers, which decodes it into a sequence of characters. Connectionist temporal classification aligns variable-width image features with text without requiring each character to be segmented beforehand, which suits the joined and irregular spacing of handwriting. The output is the most probable transcription of the line. Some systems add a language model to help resolve ambiguous strokes.
Formula
\hat{s} = \arg\max_s P(s \mid \ell; \theta), \; \text{CTC decode}Recognition models are trained on ground-truth pairs of images and their correct transcriptions, prepared by scholars, and their parameters are adjusted so that the output agrees better with those transcriptions. Character error rate (CER) is the standard measure for judging how well a model has learned a given collection and for comparing models. It is the character-level edit distance between the model output and the ground-truth transcription, divided by the length of the ground-truth transcription; word error rate (WER) is defined analogously over words. Because accuracy depends on how closely the training data match the target hand, scholars often fine-tune models for specific scribes, periods or languages, and correct output to enlarge the training set. Error rates should be computed on pages held out from training, since scores measured on training pages overstate performance.
Formula
\theta^* = \arg\min_\theta \sum_i \text{CER}(\hat{s}_i, s_i^{gt})Common pitfalls
- Expecting a generic model to read an idiosyncratic hand without fine-tuning.
- Neglecting image quality, so faded or skewed scans cripple recognition.
- Letting bad layout segmentation scramble reading order and corrupt the text.
- Ignoring character-error-rate evaluation and trusting unverified transcriptions.
Frequently asked questions
How is HTR different from OCR?
OCR was built for printed text, where characters are uniform and well separated, and it fails on handwriting. HTR uses neural networks trained on examples to read variable, joined and irregular handwriting, often without segmenting individual characters. Where OCR applies fixed recognition to consistent type, HTR learns the idiosyncrasies of particular hands and scripts, which makes it suitable for manuscripts that defeat conventional optical character recognition.
How much training data does HTR need?
The requirement depends on how regular and difficult the script is, and no fixed amount applies to every collection. Scholars commonly start from existing models, fine-tune them on transcribed pages from their own material, and correct the output to grow the training set. Highly variable or damaged material needs more ground truth, and performance should be checked on pages the model has not seen during training.
What accuracy can HTR achieve?
Accuracy varies widely and no single figure applies. The source reports that HTR is now usable on archival material and can generate accurate transcripts when combined with mass digitisation, but performance depends on script regularity, period, language and image quality, and it falls on irregular, faded or heterogeneous manuscripts. Results are reported as character error rate (CER) or word error rate (WER) against ground truth. Measure these rates on held-out pages of your own collection before relying on the text for search or analysis.
Related methods
Sources
Muehlberger, G., Seaward, L., Terras, M., et al. (2019). Transforming scholarship in the archives through handwritten text recognition: Transkribus as a case study. Journal of Documentation, 75(5), 954-976.
Open DOI referenceMoretti, F. (2013). Distant Reading. Verso.
ISBN: 9781781680841