OCR Improves Machine Translation for Low-Resource Languages

Oana Ignat, Jean Maillard, Vishrav Chaudhary, Francisco Guzmán

TL;DR

This paper introduces OCR4MT, a first-of-its-kind benchmark for evaluating Optical Character Recognition (OCR) across 60 low-resource languages. The researchers demonstrate that using OCR to "unlock" text from scanned documents can significantly boost Machine Translation (MT) performance through backtranslation, even when the OCR output contains substantial noise.

What Problem Does This Paper Address?

Machine Translation has seen incredible leaps in recent years, but these successes are largely confined to high-resource languages like English or French. For the thousands of low-resource languages spoken globally, the primary bottleneck is a lack of clean, machine-readable training data.

Interestingly, the data often exists—it’s just "locked" away in digitized books, archives, and PDFs that aren't easily searchable or processable by computers. While OCR tools can theoretically extract this text, we haven't known how well they perform on low-resource scripts (like Khmer or Ethiopic) or how much "OCR noise" (errors in text recognition) an MT system can tolerate before the data becomes more harmful than helpful.

Methods

The authors tackled this by building a comprehensive evaluation pipeline:

  1. Benchmark Creation: They developed OCR4MT, a benchmark covering 60 languages across diverse scripts (Latin, Cyrillic, Perso-Arabic, Indic, etc.). It includes both "real" PDFs from the Universal Declaration of Human Rights (UDHR) and "synthetic" PDFs generated from the Flores-101 dataset.
  2. Noise Simulation: To make synthetic data realistic, they applied various augmentations like skewing, salt-and-pepper noise, and changing opacity to mimic old or poorly scanned documents. Sample of data augmentations applied to Amharic text to simulate real-world scan conditions.

  3. OCR Evaluation: They performed a "black-box" evaluation of two state-of-the-art systems: the commercial Google Vision API and the open-source Tesseract.

  4. Downstream MT Impact: They used the extracted text for backtranslation—a technique where a model translates target-language text back into a source language to create synthetic parallel training pairs. They then measured how different levels and types of OCR errors affected the final translation quality (BLEU score).
Figure 1: Data augmentation sample on Amharic artifi- cial PDF from Flores 101: adding bold, italic, increas- ing letter spacing, decreasing opacity, adding salt and pepper, skewing and all combined.

Datasets

  • OCR4MT (New): The core contribution, featuring 186,060 lines of text across 60 languages. It bridges the gap between existing small-scale benchmarks (which usually cover only 3-4 languages) and the needs of modern multilingual AI.
  • UDHR: Used for real-world PDF validation.
  • Flores-101: Used to create the synthetic, augmented portion of the benchmark.
  • Nepali Books Corpus: A real-world test case containing ~342M tokens, used to prove the utility of OCR in a practical MT setting.

Key Insights and Ideas

  • The Script Gap: OCR performance is highly uneven. While Latin and Cyrillic scripts are handled with near-perfect accuracy (Character Error Rate < 2%), Perso-Arabic and Southeast Asian scripts remain a significant challenge for current SOTA models.
  • MT is Surprisingly Resilient: One of the most encouraging findings is that MT models are robust to small amounts of noise. Performance remains stable up to a Character Error Rate (CER) of about 4%.
  • Not All Errors Are Equal: The type of error matters more than the amount. Character replacements (e.g., mistaking 'o' for 'e') are far more damaging to translation quality than simple insertions or deletions (like missing a space or an extra character).
  • Net Positive Gain: Even with "poor" OCR quality (CER > 10%), using the noisy data for backtranslation is often better than having no data at all.

Key Results

The evaluation showed that Google Vision generally outperformed Tesseract across almost all language groups. As seen in Figure 2, the average CER for Google Vision on real UDHR documents was 8.5%, compared to 12.1% for Tesseract.

Figure 2: Average CER (the lower, the better) of the SOTA OCR systems: Tesseract and Fujii et al. 2017, across datasets, over 60 languages. UDHR synth con- tains artificially created PDFs from UDHR.

In a practical application for English-to-Nepali translation, the researchers found that adding 30,000 sentences of OCR-extracted data led to a massive +7 BLEU point increase in translation quality.

Figure 4: English to Nepali Machine Translation re- sults from fine-tuning on OCR-ed monolingual data collected from Nepali books corpus.

The ablation studies (Figure 5 and 6) further quantified the "noise threshold," showing that while replacement errors cause a sharp drop in BLEU, the model can tolerate significant insertion/deletion noise before performance degrades substantially.

Ablation study showing how different types of OCR errors (insertion, deletion, replacement) impact the change in BLEU score.

Limitations and Future Work

While the study proves OCR is a viable path for data augmentation, it highlights that Perso-Arabic scripts still need significant attention from the OCR research community. Additionally, the current work focuses on backtranslation; future research could explore how OCR noise impacts other techniques like masked language modeling or direct fine-tuning. The authors have made their scripts and benchmark available on GitHub to encourage further exploration in this area.

Summary updated

BibTeX
@inproceedings{ignat2022ocr,
  author = {Oana Ignat and Jean Maillard and Vishrav Chaudhary and Francisco Guzmán},
  title = {{OCR Improves Machine Translation for Low-Resource Languages}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.92},
}
Figure