Papers › Scrambled text: training Language Models to correct OCR errors using synthetic data

Scrambled text: training Language Models to correct OCR errors using synthetic data

29 Sep 2024arXiv:2409.19735archive 2025-07-28

Jonathan Bourne

OCR errors are common in digitised historical archives significantly affecting their usability and value. Generative Language Models (LMs) have shown potential for correcting these errors using the context provided by the corrupted text and the broader socio-cultural context, a process called Context Leveraging OCR Correction (CLOCR-C). However, getting sufficient training data for fine-tuning such models can prove challenging. This paper shows that fine-tuning a language model on synthetic data using an LM and using a character level Markov corruption process can significantly improve the ability to correct OCR errors. Models trained on synthetic data reduce the character error rate by 55% and word error rate by 32% over the base LM and outperform models trained on real data. Key findings include; training on under-corrupted data is better than over-corrupted data; non-uniform character level corruption is better than uniform corruption; More tokens-per-observation outperforms more observations for a fixed token budget. The outputs for this paper are a set of 8 heuristics for training effective CLOCR-C models, a dataset of 11,000 synthetic 19th century newspaper articles and scrambledtext a python library for creating synthetic corrupted data.

PaperPDFCode

Code

JonnoB/scrambledtext officialmentioned on GitHub report
JonnoB/scrambledtext_analysis officialmentioned on GitHub report
JonnoB/training_lms_with_synthetic_data officialmentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

ArticlesLanguage ModelingLanguage ModellingOptical Character Recognition (OCR)

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

BASESET

1 archive method tag without a method page not shown.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections