---
license: apache-2.0
language:
- ar
task_categories:
- image-to-text
tags:
- htr
- ocr
- arabic
- manuscripts
- historical
size_categories:
- 1K
## Dataset Description
RASAM 2 extends the initial initiative [RASAM 1](https://huggingface.co/datasets/calfa-ai/RASAM-1) by integrating the outcomes of the second manuscript transcription hackathon organized by the Research Consortium Middle-East and Muslim Worlds (GIS MOMM) and Calfa at BULAC (Paris) between December 2021 and March 2022.
This HuggingFace dataset provides cropped line-level images paired with their transcriptions and rich metadata for 15 Arabic Maghrebi manuscripts sourced from the BULAC Library. Building upon the original RASAM 1 collection, this expanded resource features a deliberately heterogeneous corpus that includes Berber texts written in Arabic script, covering diverse genres such as history (chronicles), law, literature, poetry, Muslim piety, and grammar.
The collection is composed primarily of texts copied during the modern period (17th–19th centuries) and is specifically designed as a ready-to-use, robust resource for Arabic Maghrebi Handwritten Text Recognition (HTR) benchmarking and model training.
| | |
|---|---|
| Manuscripts | 15 |
| Pages | 162 |
| Lines | 3,720 |
| Words | 45,645 |
| Characters | 223,426 |
> The full page-level dataset (PageXML + full-page images) is available on [GitHub](https://github.com/calfa-co/rasam-dataset).
## Source Documents
15 manuscripts from the BULAC Library (Paris), spanning history, law, literature, poetry, and religious studies, 17th–19th centuries:
- `BULAC_MS_ARA_6`, `BULAC_MS_ARA_9`, `BULAC_MS_ARA_23`, `BULAC_MS_ARA_24`, `BULAC_MS_ARA_45b`, `BULAC_MS_ARA_65`, `BULAC_ARA_MS_1982`, `BULAC_MS_ARA_1926`, `BULAC_MS_ARA_1936`, `BULAC_MS_ARA_1943`, `BULAC_MS_ARA_1944`, `BULAC_MS_ARA_1946`, `BULAC_MS_ARA_1947`, `BULAC_MS_ARA_1960`, `BULAC_MS_ARA_1983`
## Usage
```python
from datasets import load_dataset
# Load the full dataset
ds = load_dataset("calfa-ai/rasam-2")
# Access a sample
sample = ds["train"][0]
sample["image"].show()
print(sample["transcription"])
# Filter by manuscript
bulac_9 = ds["train"].filter(lambda x: x["manuscript_name"].startswith("BULAC_MS_ARA_9"))
```
## Transcription Guidelines (Summary)
The transcription guidelines follow the RASAM specification: transcriptions preserve the text as found in the image, including variant spellings, while excluding vocalization marks unless structurally significant. See [RASAM 1](https://huggingface.co/datasets/calfa-ai/RASAM-1) and [original paper](https://link.springer.com/chapter/10.1007/978-3-030-86198-8_19) for details.
## Citation
```bibtex
@inproceedings{2024rasam-dataset,
title = {{Enhancing Arabic Maghribi Handwritten Text Recognition with RASAM 2: A Comprehensive Dataset and Benchmarking}},
author = {Vidal-Gorène, Chahan and Salah, Clément and Lucas, Noëmie and Decours-Perez, Aliénor and Perrier, Antoine},
url = {https://enc.hal.science/hal-04722622},
booktitle = {{Computational Humanities Research (CHR)}},
address = {Aarhus, Denmark},
volume = {3834},
pages = {200--216},
year = {2024},
month = dec,
}
```
## License
This dataset is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
## Acknowledgements
The RASAM dataset was developed collaboratively between 2021–2023 by the Research Consortium Middle-East and Muslim Worlds (GIS MOMM), DISTAM, Calfa, and the BULAC Library. The project was funded by the French Ministry of Higher Education, Research and Innovation.