Manuscript Offprint

arXiv:2608.26921

AraMS-28k: The Largest Publicly Released Line-Level Dataset of Historical Arabic Manuscripts with Margin and Insertion-Anchor Annotations

Mohamed Guechaoui, Mohamed Diaa Zellagui, Souleyman Chaib, Sahraoui Dhelim

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 [1], 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 a 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.

1 Introduction

Handwritten text recognition (HTR) for historical Arabic manuscripts lags behind Latin-script HTR largely because of a shortage of large, line-level corpora drawn from genuine manuscripts rather than modern handwriting samples or synthetic renderings. Existing public resources for historical Arabic HTR are limited in scale, restricted to modern handwriting rather than genuine manuscript material, or – even when drawn from real manuscripts – do not record where a given margin annotation belongs within the main-text reading flow; section 2 compares these resources in detail. This combination of gaps motivates AraMS-28k. Margin content in historical Arabic manuscripts is rarely incidental. A marginal note is usually anchored to a specific point in the main text: it is a correction, an alternate reading, or a gloss meant to be read in place, not as an appendix to the page. Recognising a margin region, or even placing it correctly in a coarse page-level reading order, is not the same as recording which line of the main text it belongs next to. Recovering this fine-grained, non-linear reading order requires an annotation that goes beyond a bounding box, a line transcription, or a region-level layout label – it requires recording, at line-level granularity, where each margin line is intended to be read. AraMS-28k is built to supply this annotation across a large corpus of genuine manuscripts. Every line in the corpus is labelled as main-text or margin, and each margin line is further annotated with an insertion anchor – the index of the main-text line after which it logically inserts – wherever the manuscript provides an unambiguous attachment point; roughly 30% of margin lines meet this criterion (section 4), while the remainder are retained with a null anchor rather than a forced, unverifiable guess. To our knowledge, no prior publicly released Arabic manuscript corpus provides this line-level reading-order annotation at all: existing resources may identify marginal text as a distinct region, or in some cases order regions at the page level, but none record where a specific margin line attaches within the main text. Separately, because the reference transcriptions we align against are drawn from fully-vocalised scholarly editions while the manuscript hands themselves are typically undiacritised, we also release a diacritic-normalised transcription alongside the raw one for every line (section 4) – a mismatch between reference and image that, as far as we are aware, existing Arabic manuscript datasets do not document or address explicitly. Combined with 28,600 line-level transcriptions across three script traditions, this makes AraMS-28k usable both as an HTR training corpus and as a resource for manuscript layout analysis and reading-order recovery.

References (15)