arXiv:2610.25235cs.CVOct 2026

Manuscript Offprint

arXiv:2610.25235

Evaluating Cloud and Self-Hosted OCR Systems for Arabic, English, and French Documents: Bounding Box Detection, Text Recognition, and Mathematical Expression Recognition

Jumana Alsubhi, Ahmed Alhusayni, Abdulrahman Gharawi, Israa Hamdine, Khadija Alansari, Alshaymaa Allahim, Lamees Alhumaid, Ahmad Shabana

Abstract

Choosing an OCR system for a multilingual archive requires balancing accuracy against deployment constraints. This study compares cloud and self-hosted systems on three tasks: bounding box detection on 48 Arabic, English, and French pages, text recognition on 315 pages across nine document types, and mathematical expression recognition on 83 English and Arabic samples. Detection was assessed by page-level visual grades, text by character error rate (CER) against a Gemini-generated reference transcription, and mathematics by scores against known answers. Main estimates are accompanied by 95% intervals and paired comparisons. Google Document AI and Surya produced Good line boxes on 47 of 48 (98%) and 46 of 48 (96%) pages. Datalab, Azure Document Intelligence, and Document AI had mean CERs of 0.145–0.152, with no difference detected in unadjusted paired comparisons. Surya had the lowest mean CER among self-hosted systems (0.199). No mathematical test had a statistically clear leader. Strict checks showed that near-perfect page scores could conceal a replaced Arabic variable or Eastern Arabic digits rewritten in Western form. Reliable evaluation therefore requires uncertainty estimates, structural checks, and notation-specific tests in addition to aggregate recognition scores.

1 Introduction

Optical character recognition (OCR) is a core component of document digitisation. It converts document images into machine-readable text for search, indexing, and downstream information extraction [13]. Reliable document processing requires more than character transcription. A system must locate text, preserve reading order and layout, and represent tables and mathematical expressions in usable forms [4, 19]. Errors in any of these stages can reduce the reliability of the complete workflow.

Multilingual collections make these tasks more difficult. Arabic, English, and French may occur in the same archive or page. Arabic adds challenges related to right-to-left writing, connected letter forms, diacritics, mixed scripts, Eastern Arabic digits, handwriting, calligraphy, and manuscripts [2, 11, 12]. Real documents may also be faded, stained, skewed, photographed, or arranged in tables and multi-column layouts.

Performance on clean printed text therefore does not represent all practical conditions [11].

Contemporary OCR deployments include managed cloud services, general vision-language models, specialised recognition models, and self-hosted engines. Cloud and self-hosted systems differ in recognition performance and in deployment constraints, including speed, hardware, cost, licensing, and data residency. System selection must therefore consider both.

A single text-recognition score does not capture the full document-processing task [15]. Bounding box detection measures whether text is located correctly. Text recognition measures transcription quality across languages and document types. Mathematical recognition measures whether equations retain their symbols, structure, variables, and notation [4, 8]. Aggregate scores may also hide serious errors, including incomplete tables, incorrect reading order, and plausible but incorrect substitutions in Arabic text and notation [11, 12, 19].

This study evaluates cloud and self-hosted OCR systems through three complementary components. The bounding box detection benchmark compares five systems on 48 real pages. The text recognition benchmark compares ten systems on 315 Arabic, English, and French pages. The mathematical recognition benchmark compares thirteen systems on 83 English and Arabic samples. The evaluations combine quantitative scoring with qualitative error analysis and operational measures.

The main contributions of this study are: (i) a structured benchmark covering bounding box detection, multilingual text recognition, and mathematical recognition; (ii) analysis across Arabic, English, French, and multiple document types; (iii) evaluation of Arabic-specific challenges in text and mathematical notation; (iv) comparison of cloud and self-hosted systems under practical deployment constraints; and (v) statistical and diagnostic analysis using confidence intervals, paired tests, robustness checks, and strict checks of Arabic symbols and digits to reveal errors hidden by aggregate scores.