AraMS-28k: The Largest Publicly Released Line-Level Dataset of Historical Arabic Manuscripts with Margin and Insertion-Anchor Annotations
Summary
Historical Arabic handwriting recognition has fallen behind Latin-script work. The main reason is a lack of large, line-level training data taken from real manuscripts. Existing corpora are also missing one feature: none of them says where a marginal note belongs within the main text. AraMS-28k addresses both gaps. It covers 14 books (13 hand-copied in Naskh, Ruq'ah and Maghrebi, plus one lithographed edition), 3,043 pages and 28,600 lines.
Each line is tagged as main text or margin. When the attachment point of a margin line is clear, the line also records the index of the main-text line it follows. Every line has two transcriptions: the fully vocalised reference form and a diacritic-stripped form that matches what the scribe actually wrote. The data was built with the RefLAM pipeline, which aligns multimodal-LLM OCR output against independent clean editions, and every line was checked by a human. HATFormer baselines show error rising sharply as test material moves further from the training distribution. This gives the field a measurable generalisation target.
Key points
- Corpus size: 27,971 main-text lines and 629 margin lines (about 2.2%). Roughly 30% of margin lines carry an insertion anchor; the rest are stored with a null anchor.
- Construction ran in two phases with different review depth:
- page-validated: 7 books, 548 pages, every line checked by two reviewers;
- line-validated: 7 books, 2,495 pages, where only main-text lines that align perfectly with the reference are accepted.
- HATFormer line-level CER by test condition:
| Test condition | CER |
|---|---|
| Held-out pages from training books | 6.48% |
| Unseen Ruq'ah book | 13.26% |
| Unseen Naskh book | 25.37% |
| Unseen Maghrebi book | 37.88% |
- Without the in-between finetuning step on Muharaf, CER on in-distribution data climbs to 7.44%. Kraken serves as a second baseline.
- Two releases are available under CC BY-NC-SA 4.0, with fixed splits, manifests and checksums:
- AraMS-28k, the full annotation release;
- AraMS-28k-HTR, line images paired with normalised text, ready for recognition training.
Interesting ideas
- I1. When a margin line has no clear attachment point, its anchor is left null instead of filled with an unverifiable guess, so the annotation only asserts what can be checked. — For Mova (frames): Coreference and attachment decisions could carry an explicit "unresolved" value instead of a forced antecedent, which keeps the downstream explanation honest.
- I2. Each line stores two targets side by side: the full reference form and a normalised form matching what is visibly present, so each user picks the one that suits their task. — For Mova (tokens): Tokens could keep both the raw surface string and a normalised form (quotes, casing, spelling variants), so lemmatisation and generation each use the right layer.
- I3. Noisy model output is accepted automatically only where it agrees perfectly with an independent reference, and that subset is reported separately because it likely favours easier cases. — For Mova (learn): Silver data agreed by witness parsers could be split by agreement strength and evaluated separately, which would expose the bias toward easy sentences.
- I4. Evaluation is laid out as a ladder that separates difficulty levels: unseen pages from seen books, then unseen books, then unseen scripts. — For Mova (tree): Parser scores could be reported as a gradient running from held-out sentences of training treebanks to unseen treebanks to unseen genres, turning domain shift into a measurable target.
- I5. A small diagnostic test set (the withheld pages) is published as an explicit file but kept outside the official test split, so the extra measurement can be reproduced without contaminating the benchmark. — For Mova (learn): Negative-control and diagnostic subsets could be shipped as fixed manifests apart from the main test set, which makes regressions reproducible.
Cite
@misc{guechaoui2026arams,
title = {{AraMS-28k: The Largest Publicly Released Line-Level Dataset of Historical Arabic Manuscripts with Margin and Insertion-Anchor Annotations}},
author = {Guechaoui, Mohamed and Zellagui, Mohamed Diaa and Chaib, Souleyman and Dhelim, Sahraoui},
year = {2026},
doi = {10.48550/arxiv.2608.26921},
eprint = {2608.26921},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2608.26921}
}References
- Mohamed Guechaoui, Mohamed Diaa Zellagui, Souleyman Chaib, and Sahraoui Dhelim. Reflam: A reference-grounded line annotation pipeline for historical arabic manuscripts, 2026. URL https://arxiv.org/abs/2608.25140. ↗ our card
- Christian Clausner, Apostolos Antonacopoulos, Nora Mcgregor, and Daniel Wilson-Nunn. Icfhr 2018 competition on recognition of historical arabic scientific manuscripts – rasm2018. In 2018 16th International Conference on Frontiers in Handwriting Recognition (ICFHR), pages 471–476, 2018. doi: 10.1109/ICFHR-2018.2018.00088. ↗
- Chahan Vidal-Gorène, Noëmie Lucas, Clément Salah, Aliénor Decours-Perez, and Boris Dupin. RASAM – A Dataset for the Recognition and Analysis of Scripts in Arabic Maghrebi, pages 265–281. 09 2021. ISBN 978-3-030-86197-1. doi: 10.1007/978-3-030-86198-8_19. ↗
- Sabri A. Mahmoud, Irfan Ahmad, Wasfi G. Al-Khatib, Mohammad Alshayeb, Mohammad Tanvir Parvez, Volker Märgner, and Gernot A. Fink. Khatt: An open arabic offline handwritten text database. Pattern Recognition, 47(3):1096–1112, 2014. ISSN 0031-3203. doi: https://doi.org/10.1016/j.patcog.2013.08.009. URL https://www.sciencedirect.com/science/article/pii/S0031320313003300. Handwriting Recognition and other PR Applications. ↗
- Jonathan Parkes Allen, John Mullan, Lorenz Nigst, Mathew Barber, Taimoor Shahid-Khan, Masoumeh Seydi, Danlu Chen, Yufei Weng, Nikolai Vogler, Jacob Murel, Osama Eshera, Taylor Berg-Kirkpatrick, David Smith, Sarah Bowen Savant, and Matthew Thomas Miller. Openiti makhzan: An open annotated dataset of arabic, persian, ottoman turkish, and urdu print and manuscript data. Journal of Open Humanities Data, 2026. URL https://api.semanticscholar.org/CorpusID:288733730. ↗
- Mehreen Saeed, Adrian Chan, Anupam Mijar, Joseph Moukarzel, Georges Habchi, Carlos Younes, Amin Elias, Chau-Wai Wong, and Akram Khater. Muharaf: Manuscripts of handwritten arabic dataset for cursive text recognition, 2025. URL https://arxiv.org/abs/2406.09630. ↗
- Majeed Kassis, Alaa Abdalhaleem, Ahmad Droby, Reem Alaasam, and Jihad El-Sana. Vml-hd: The historical arabic documents dataset for recognition systems. In 2017 1st International Workshop on Arabic Script Analysis and Recognition (ASAR), pages 11–14, 2017. doi: 10.1109/ASAR.2017.8067751. ↗
- Benjamin Kiessling, Daniel Stökl Ben Ezra, and Matthew Thomas Miller. Badam: A public dataset for baseline detection in arabic-script manuscripts. In Proceedings of the 5th International Workshop on Historical Document Imaging and Processing, HIP ’19, page 13–18, New York, NY, USA, 2019. Association for Computing Machinery. ISBN 9781450376686. doi: 10.1145/3352631.3352648. URL https://doi.org/10.1145/3352631.3352648. ↗
- Ahmed Heakl, Abdullah Sohail, Mukul Ranjan, Rania Hossam, Ghazi Shazan Ahmad, Mohamed El-Geish, Omar Maher, Zhiqiang Shen, Fahad Khan, and Salman Khan. Kitab-bench: A comprehensive multi-domain benchmark for arabic ocr and document understanding, 2025. URL https://arxiv.org/abs/2502.14949. ↗
- Omer Nacar, Yasser Al-Habashi, Serry Sibaee, Adel Ammar, and Wadii Boulila. Sard: A large-scale synthetic arabic ocr dataset for book-style text recognition, 2025. URL https://arxiv.org/abs/2505.24600. ↗
- U.-V Marti and H. Bunke. The iam-database: An english sentence database for offline handwriting recognition. International Journal on Document Analysis and Recognition, 5:39–46, 11 2002. doi: 10.1007/s100320200071. ↗
- Emmanuele Grosicki and Haikal El Abed. Icdar 2009 handwriting recognition competition. In Proceedings of the International Conference on Document Analysis and Recognition, ICDAR, pages 1398–1402, 01 2009. doi: 10.1109/ICDAR.2009.184. ↗
- Simion Toader Bors Uifalean. Htr model - arabic handwritten segmentation model trained on the muharaf corpus, December 2024. URL https://doi.org/10.5281/zenodo.14295555. ↗
- Benjamin Kiessling. Kraken – a universal text recognizer for the humanities. In Digital Humanities Conference (DH), 2019. find
- Simion Toader Bors Uifalean. Htr model - arabic handwritten recognition modeltrained on the muharaf corpus, December 2024. URL https://doi.org/10.5281/zenodo.14295489. ↗
- Adrian Chan, Anupam Mijar, Mehreen Saeed, Chau-Wai Wong, and Akram Khater. Hatformer: Historic handwritten arabic text recognition with transformers, 2025. URL https://arxiv.org/abs/2410.02179. ↗ our card
- Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna Wallach, Hal Daumé III, and Kate Crawford. Datasheets for datasets, 2021. URL https://arxiv.org/abs/1803.09010. ↗
This page in Markdown → https://md.research.elamur.ai/free/en/papers/guechaoui-2026-arams-28k-largest-publicly-released/