OCR & HTR
- View
An image alone is not searchable. Optical Character Recognition (OCR) and Handwritten Text Recognition (HTR) convert the pixels of a page into machine-readable text, unlocking full-text search, indexing and text analysis. OCR handles printed and typed material; HTR tackles the far harder problem of handwriting, and both have been transformed by machine-learning models in recent years.
The critical distinction is that these processes produce text layered onto - not replacing - the preservation image. The master image remains the authoritative record; the recognised text is a derived, correctable representation of its content.
OCR for printed material
- Inputs matter most - clean, deskewed, well-exposed images at adequate resolution drive accuracy far more than the engine chosen. Binarisation and despeckling help degraded originals.
- Layout analysis - columns, tables and marginalia need segmentation before recognition, or reading order collapses.
- Output formats - retain word coordinates using ALTO XML or hOCR so search terms can be highlighted on the image, and produce searchable PDF/A for delivery.
HTR for manuscripts
HTR uses trained neural models rather than fixed character templates. Platforms such as Transkribus and the open eScriptorium/Kraken stack learn from transcribed examples. Because handwriting varies by hand, era and language, HTR usually requires a model trained or fine-tuned on comparable material to reach usable accuracy.
- Ground truth - a corpus of accurately transcribed pages is the raw material for training and for measuring performance.
- Measure honestly - report Character Error Rate (CER) and Word Error Rate (WER) on a held-out set, not on the training pages.
Fitness for purpose
Uncorrected OCR is often perfectly adequate for keyword discovery across large volumes, where imperfect recall is acceptable. Legal, evidential or publication uses demand correction and review. Match the effort to the use, and record the method and accuracy so downstream users know what they are searching.
Key takeaways
- OCR suits print; HTR suits handwriting and usually needs a trained model.
- Preserve text coordinates (ALTO/hOCR) and deliver searchable PDF/A.
- Set an accuracy target with CER/WER and budget correction to the actual use.