Arabic OCR Error Correction Using Character Segment Correction, Language Modeling, and Shallow Morphology
Paper · 2006 · Walid Magdy and Kareem Darwish
Summary
The paper addresses cleaning up Arabic text produced by OCR. Arabic is hard to correct with dictionaries because the script is cursive, letters are told apart by dots, and the rich morphology yields a vast number of surface forms. Magdy and Darwish build a post-OCR corrector on the noisy channel framework. It learns how the OCR engine distorts characters or multi-character segments from aligned pairs of corrupted and hand-fixed words. It then reranks candidate corrections with a word n-gram language model.
They compare one-to-one character alignment with m:n segment alignment, test smoothing and character-position modeling, and check whether shallow morphology helps: correcting stems instead of full words, or modeling segmented text. Segment-based error modeling combined with a language model clearly works best. Morphological processing slightly hurts.
The main lesson is that a large in-domain corpus, supplying both the correction dictionary and the language model, is enough to cut word error rate by about 70%, even for a morphologically rich language.
Key points
- Training and test data come from 6,000 OCR'd words of a modern printing of Ibn Al-Qayim's medieval book "Provisions". Pages were scanned at 300 dpi and recognized with Sakhr's Automatic Reader. The words were split 4,000 for training and 2,000 for testing, and the test words had a baseline WER of 39%.
- Before training, all alef/hamza variants were normalized to alef, and alef maqsoura to ya.
- m:n segment alignment, following Brill and Moore, outperformed 1:1 alignment, following Church and Gale. The segment model placed correct answers in the top 10 more often and gave them better scores.
- When the right candidate was among the proposals, the language model picked it about 98% of the time. Smoothing helped, while modeling character position hurt, likely because the training data were sparse.
- A 6-gram model over morphologically segmented words damaged accuracy badly. Word-based correction slightly beat stem-based correction. The best setup reduced WER by roughly 70%.
Interesting ideas
- I1. Segment alignments are built from an ordinary Levenshtein character alignment: correctly matched characters act as fixed anchors, and the empty slots are merged into the neighboring mismatched characters to form many-to-many edit pairs. This is cheap and captures cases where one symbol is misread as several.
- I2. The authors evaluate the candidate generator (is the right answer in the top 10?) separately from the ranker (how often is it picked when present?). This shows which component is the bottleneck.
- I3. Collapsing orthographic variants before counting edits shrinks the event space and reduces sparsity in a small training set.
- I4. Their negative result is that stemming or segmenting text hurt once enough surface-form data existed, and the authors suspect the outcome could flip with less data. So deeper linguistic units should be tested against plain surface forms rather than assumed better.
- I5. To combine morphology with sparse data, the authors propose a factored language model that conditions on surface words alongside POS tags and affixes.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): Mova could learn a many-to-many confusion model from pairs of noisy and clean English text, such as OCR'd fables or typo-laden student answers, and use it to normalize input before the tokenizer and tagger.
- I2 (learn): any Mova stage that proposes and then selects could be scored on both rates separately, so that repair rules or teacher signals target the weaker half.
- I3 (tokens): normalizing quote styles, ligatures, and British/American spelling variants before learning confusion or lemma statistics would make small hand-corrected samples go further.
- I4 (learn): ablations should include a surface-form baseline and vary training size, checking whether morphology-based features still help as silver data grows.
- I5 (tree): parser features or candidate rerankers could back off from word forms to lemma, UPOS, and affix factors, so rare words still receive informed scores.
Institutions
Fields, topics and concepts
📚 Shelves 7The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksComputer Vision and Pattern Recognition · 2,869 worksEngineering · 133 worksMedia Technology · 34 works
🧭 Topics 3Research subjects and languages the work is about.Language models & pretraining · 3,320 worksSemitic languages · 2,908 worksMorphology · 405 works
Cite
Cite as Walid Magdy and Kareem Darwish. 2006. Arabic OCR Error Correction Using Character Segment Correction, Language Modeling, and Shallow Morphology. Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{magdy2006arabic,
title = {{Arabic OCR Error Correction Using Character Segment Correction, Language Modeling, and Shallow Morphology}},
author = {Walid Magdy and Kareem Darwish},
booktitle = {Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing},
year = {2006},
doi = {10.3115/1610075.1610132},
url = {https://doi.org/10.3115/1610075.1610132}
}References
- Agirre, E., K. Gojenola, K. Sarasola, and A. Voutilainen. Towards a Single Proposal in Spelling Correction. In COLING-ACL'98 (1998). find
- Ahmed, M. A Large-Scale Computational Processor of Arabic Morphology and Applications. MSc. Thesis, in Faculty of Engineering Cairo University: Cairo, Egypt. (2000). find
- Baeza-Yates, R. and G. Navarro. A Faster Algorithm for Approximate String Matching. In Combinatorial Pattern Matching (CPM'96), Springer-Verlag LNCS (1996). find
- Brill, E. and R. Moore. An improved error model for noisy channel spelling correction. In the proceedings of the 38th Annual Meeting on Association for Computational Linguistics, pages 286 – 293 (2000).
- Church, K. and W. Gale. “Probability Scoringfor Spelling Correction.” Statistics and Computing, 1: 93-103 (1991). find
- Darwish, K. and D. Oard. Term Selection for Searching Printed Arabic. In SIGIR-2002 (2002). find
- Darwish, K., H. Hassan, and O. Emam. Examining the Effect of Improved Context Sensitive Morphology on Arabic Information Retrieval. In ACL Workshop on Computation Approaches to Semitic Languages, Ann Arbor, (2005).
- De Roeck, A. and W. Al-Fares. A Morphologically Sensitive Clustering Algorithm for Identifying Arabic Roots. In the 38th Annual Meeting of the ACL, Hong Kong, (2000).
- Domeij, R., J. Hollman, V. Kann. Detection of spelling errors in Swedish not using a word list en clair. Journal of Quantitative Linguistics (1994) 195-201. ↗
- Harding, S., W. Croft, and C. Weir. Probabilistic Retrieval of OCR-degraded Text Using N-Grams. In European Conference on Digital Libraries (1997). find
- Hong, T. Degraded Text Recognition Using Visual and Linguistic Context. Ph.D. Thesis, Computer Science Department, SUNY Buffalo: Buffalo (1995). find
- Jurafsky, D. and J. Martin. Speech and Language Processing. Chapter 5: pages 141-163. Prentice Hall (2000). find
- Larkey, L., L. Ballesteros, and M. Connell. Improving stemming for Arabic information retrieval: light stemming and cooccurrence analysis. In proceedings of the 25th annual international ACM SIGIR conference, pages 275-282 (2002). find
- Lee, Y., K. Papineni, S. Roukos, O. Emam, and H. Hassan. Language Model Based Arabic Word Segmentation. In the Proceedings of the 41st Annual Meeting of the Association for Computational Linguistics, pages 399 - 406 (2003).
- Lu, Z., I. Bazzi, A. Kornai, J. Makhoul, P. Natarajan, and R. Schwartz. A Robust, Language-Independent OCR System. In the 27th AIPR Workshop: Advances in Computer Assisted Recognition, SPIE (1999). find
- Moussa B., M. Maamouri, H. Jin, A. Bies, X. Ma. Arabic Treebank: Part 1 - 10Kword English Translation. Linguistic Data Consortium (2003). find
- Oflazer, K. Error-Tolerant Finite State Recognition with Applications to Morphological Analysis and Spelling Correction. Computational Linguistics 22(1), 73-90 (1996). find
- Taghva, K., J. Borsack, and A. Condit. An Expert System for Automatically Correcting OCR Output. In SPIE - Document Recognition (1994). find
- Tillenius, M., Efficient generation and ranking of spelling error corrections. NADA (1996). find
- Tseng, Y. and D. Oard. Document Image Retrieval Techniques for Chinese. In Symposium on Document Image Understanding Technology, Columbia, MD (2001). find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/magdy-2006-arabic-ocr-error-correction-character/