AraMS-28k: The Largest Publicly Released Line-Level Dataset of Historical Arabic Manuscripts with Margin and Insertion-Anchor Annotations
Organizations: Higher School of Computer Science (ESI-SBA), Sidi Bel Abbes, Algeria
Abstract
We introduce AraMS-28k, the largest publicly released line-level dataset of genuine historical Arabic manuscripts, comprising 14 books, 3,043 pages, and 28,600 annotated text lines (27,971 main-text, 629 margin). Thirteen books are hand-copied manuscripts spanning three script traditions -- Naskh, Ruq'ah, and Maghrebi -- and one is a lithographed printed edition included to broaden format diversity. Each line is labelled as main-text or margin, and margin lines that have an unambiguous attachment point in the main text are further annotated with an insertion anchor, recovering the manuscript's true non-linear reading order at line-level granularity -- to our knowledge the first such annotation released for a historical Arabic manuscript corpus. Because reference transcriptions are fully vocalised while manuscript hands are typically undiacritised, we release both the raw diacritised transcription and a diacritic-normalised counterpart for every line. The dataset was constructed with RefLAM, a reference-grounded annotation pipeline that aligns multimodal-LLM OCR against independently sourced clean transcriptions and routes every line through human review, combining automatic verification with expert oversight. We describe the construction and quality-control process, present the annotation schema, report dataset statistics at both the corpus and per-book level, and provide baseline HTR results using Kraken and HATFormer, including a cross-script generalisation gradient from in-distribution pages to fully unseen books. AraMS-28k is released with page images, line-level annotations, and fixed train/val/test splits under CC BY-NC-SA 4.0 to support reproducible research on Arabic manuscript recognition, layout analysis, and reading-order recovery.
Figures & tables
| Dataset | Pages | Lines | Insertion anchor |
|---|---|---|---|
| RASM2018 [ 2 ] | 120 | 2,613 | No |
| RASAM [ 3 ] | 300 | 7,540 | No |
| KHATT [ 4 ] | 4,000 | 13,435 | No |
| Muharaf-public [ 6 ] | 1,216 | 24,495 | No |
| AraMS-28k (ours) | 3,043 | 28,600 | Yes |
| Field | Type | Description |
| Top-level identifiers and metadata | ||
| line_uid | string | Globally unique line ID, e.g., book_03_page_076_L0000 |
| book_id | string | Book identifier, e.g., book_03 |
| page_id | string | Page identifier, e.g., book_03_page_076 |
| page_image | string | Relative path to the full-page image |
| line_idx | integer | Zero-based line index on the page (top-to-bottom) |
| Property | Value |
|---|---|
| Books | 14 |
| Pages | 3,043 |
| Page-validated (PV) | 548 |
| Line-validated (LV) | 2,495 |
| Main lines | 27,971 |
| Margin lines | 629 |
| Model / Test subset | CER (%) |
|---|---|
| Kraken [ 14 , 15 ] | |
| Maghrebi (book_03) | 32.71 |
| Ruq‘ah (book_05) | 11.65 |
| Naskh (book_09) | 22.62 |
| Overall | 23.31 |
| HATFormer [ 16 ] | |
| Condition | Setting | CER (%) |
|---|---|---|
| In-distribution | Unseen pages, seen books | 6.48 |
| Unseen book | Ruq‘ah (book_05) | 13.26 |
| Unseen book | Naskh (book_09) | 25.37 |
| Unseen book | Maghrebi (book_03) | 37.88 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Book | Type | Script | Pages | Lines | Margin lines | Avg. words/line | Avg. lines/page | C=100 | Subject | Century (CE) |
| book_03 | PV | Maghrebi | 172 | 3,661 | 168 | 10.2 | 21.3 | 8.4% | Fiqh/Tafsir | 12–13 |
| book_05 | PV | Ruq‘ah | 95 | 2,028 | 74 | 13.9 | 21.3 | 28.0% | Hadith | 9 |
| book_06 | PV | Naskh | 41 | 874 | 15 | 11.3 | 21.3 | 99.9% | Qira’at/Tajwid | 15 |
| book_09 | PV | Naskh | 46 | 1,057 | 7 | 15.5 | 23.0 | 9.8% | Hadith/Rijal | 14 |
| book_10 | PV | Lithograph | 13 | 674 | 0 | 17.2 | 51.8 | 14.1% | Medicine | 11 |
| book_11 | PV | Naskh | 30 | 612 | 1 | 12.2 | 20.4 | 12.1% | Aqidah | 8 |
| Release | Format | Size (approx.) | DOI |
|---|---|---|---|
| AraMS-28k | Images + JSONL | 2.05 GB | https://doi.org/10.5281/zenodo.22095333 |
| AraMS-28k-HTR | PNG crops + .gt.txt | 2.42 GB | https://doi.org/10.5281/zenodo.21499649 |
Historical Document Processing
Historical document processing uses AI to transcribe, structure, restore, and analyze manuscripts, books, newspapers, and archival records.
See all 76 papers