Scrambled text: training Language Models to correct OCR errors using synthetic data
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
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.
Results and benchmarks
OCR errors are common in digitised historical archives significantly affecting their usability and value.
Benchmark evidence is limited
Evidence graph: 2 refs, 1 links.
Utility signals: depth 95/100, grounding 68/100, status medium.
Implementation
Historical official implementation (not recommended for new builds)
Only a historical official implementation is available
Use with caution for new projects; verify against current tooling and maintained community alternatives.
JonnoB/scrambledtext_analysis · 1 stars · Last push Apr 21, 2025
Only historical official repository was found (JonnoB/scrambledtext_analysis).
Open JonnoB/scrambledtext_analysis- Only historical official implementation is available
- No direct maintained implementation is currently verified.
- Only historical official repository was found: JonnoB/scrambledtext_analysis.
- No maintained paper-verified implementation met reliability thresholds.
Compare implementation paths
Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Moderate
- Stars
- 1
- Last push
- Apr 21, 2025 (490d)
Official implementation from Papers with Code · Strong overlap with paper title keywords
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Limited
- Stars
- 9
- Last push
- Apr 30, 2025 (482d)
Official implementation from Papers with Code · Strong overlap with paper title keywords
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Limited
- Stars
- 2
- Last push
- Apr 21, 2025 (490d)
Official implementation from Papers with Code · Strong overlap with paper title keywords
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
Reproduction readiness
Setup required
Dependencies pinned, manual setup needed
- JonnoB/scrambledtext_analysis has requirements.txt but requires manual environment setup.
- Last push was 490 days ago, so expect possible dependency version conflicts.
- No Dockerfile, so you will set up the environment manually.
- No CI pipeline, so test coverage is unknown.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Quick start
git clone https://github.com/JonnoB/scrambledtext_analysis.git
pip install -r requirements.txt Repositories and ecosystem
Official
- JonnoB/scrambledtextConfidence: High
A python library for creating synthetic corrupted OCR text using a markov process
9 stars · 1 forks · Last push Apr 30, 2025 · MIT license
- JonnoB/training_lms_with_synthetic_dataConfidence: High
A repo for training Language models to correct errors in OCR text
2 stars · 2 forks · Last push Apr 21, 2025 · MIT license
Community
No additional community repositories detected yet.
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Models
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
Tasks
Natural language processing
Methods
Transformer
Domains
Natural Language Processing
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).