This paper presents Raqim, a hybrid framework for correcting Arabic optical character recognition (OCR) errors by integrating dictionary-based and generative techniques. The key contributions of this research are: (1) the development of CorpusFilter, a layer built on a dictionary of 500,000 error-correction pairs extracted from real-world OCR outputs generated by the Tesseract engine.(2) the enhancement of OCR performance through the integration of large language models (LLMs).Correction quality was assessed across four LLMs: GPT-4, Gemini 2.0 Flash, Mistral Saba, and LLaMA3-8B. The results show that CorpusFilter alone raised accuracy from 87.89% to 89.18%. The highest performance 89.81% correction accuracy was achieved when Gemini 2.0 Flash was combined with dictionary-based correction. These results illustrate the relevance of the dual approach of using dictionary-based techniques and the application of the state-of- the-art deep models of the LLM toolkit.
Almegbil et al. (Thu,) studied this question.