AI Briefing
KO

RTL PDF Document Parsing

·2026.01.22 22:06

Key point

Word Shape Encoding significantly boosts Hebrew and Arabic PDF parsing quality.

1 / 2

Details

Existing PDF parsers frequently break down layouts in RTL (right-to-left) languages like Hebrew and Arabic, misreading text or even hallucinating content. In particular, for RAG pipelines, parsing quality is essentially input quality, so this gap became a real problem blocking actual customer data usage.

To solve this problem, the authors built a new Hebrew dataset based on OmniDocBench, going through MonkeyOCR-based preprocessing and manual verification to precisely tag document structure, reading order, and layout. The goal was not to force RTL documents into a new model, but to make direct use of the capabilities of already-strong LTR (left-to-right) parsers.

The core solution is Word Shape Encoding. First, English words are rendered in Arial 10pt to measure their width and height, and based on this, an offline shape-to-word index is created. Then, each word in an RTL document is mapped via KNN to an English word with a similar bounding box size, and re-rendered as a standardized English-form PDF.

This process is completed in two steps.

  • Text substitution: RTL words are replaced with corresponding English words, while preserving styling such as font size, bold, and italic.
  • Spatial mirroring: The page's horizontal coordinates are flipped, repositioning all text, images, and vector graphics on an LTR basis.

The resulting "English-looking" PDF is fed into a general parser, and then, using the Markdown output and the original mapping, it is converted back into the original words. In the restoration step, even if it's not exactly the same word, Levenshtein distance is used to find the closest candidate and reconstruct the original Hebrew meaning.

Evaluation was conducted across parsers from several different families. For VLMs, GPT-4o, Gemini 3.0, and Qwen2.5-VL were compared; for modular pipelines, MinerU and Marker; and for commercial SaaS, LLaMaParse and Apryse. The metrics were edit distance-based accuracy for paragraph text and Table-TEDS, which also looks at table structure, and the results showed particularly large improvements in table parsing.

The same effect did not appear uniformly across all RTL languages. For Arabic, GPT-4o-mini improved, but GPT-4.1 actually got worse, and the authors interpreted this as being due to differences in language exposure rather than the model's RTL processing capability. To verify this, they measured self-consistency by parsing the same input multiple times and looking at the average similarity between outputs, and found that the effect of this method was greater for language-model combinations that were less confident.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.