Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,40 +1,108 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
dtype: string
|
| 17 |
-
- name: script
|
| 18 |
-
dtype: string
|
| 19 |
-
splits:
|
| 20 |
-
- name: train
|
| 21 |
-
num_bytes: 2461263786
|
| 22 |
-
num_examples: 5864
|
| 23 |
-
- name: validation
|
| 24 |
-
num_bytes: 307657973
|
| 25 |
-
num_examples: 733
|
| 26 |
-
- name: test
|
| 27 |
-
num_bytes: 308077697
|
| 28 |
-
num_examples: 734
|
| 29 |
-
download_size: 3076235636
|
| 30 |
-
dataset_size: 3076999456
|
| 31 |
-
configs:
|
| 32 |
-
- config_name: default
|
| 33 |
-
data_files:
|
| 34 |
-
- split: train
|
| 35 |
-
path: data/train-*
|
| 36 |
-
- split: validation
|
| 37 |
-
path: data/validation-*
|
| 38 |
-
- split: test
|
| 39 |
-
path: data/test-*
|
| 40 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- ar
|
| 5 |
+
task_categories:
|
| 6 |
+
- image-to-text
|
| 7 |
+
tags:
|
| 8 |
+
- htr
|
| 9 |
+
- ocr
|
| 10 |
+
- arabic
|
| 11 |
+
- manuscripts
|
| 12 |
+
- historical
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1K<n<10K
|
| 15 |
+
pretty_name: RASAM-1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# RASAM 1 — Line-Level HTR Ground-Truth for Arabic historical manuscripts (Maghrebi)
|
| 19 |
+
|
| 20 |
+
<p align="center">
|
| 21 |
+
<a href="https://doi.org/10.1007/978-3-030-86198-8_19"><img src="https://img.shields.io/badge/Paper-ICDAR 2021-blue" alt="Paper ICDAR 2021"></a>
|
| 22 |
+
<a href="https://github.com/calfa-co/rasam-dataset"><img src="https://img.shields.io/badge/GitHub-PageXML dataset-green" alt="GitHub"></a>
|
| 23 |
+
<a href="https://calfa.fr"><img src="https://img.shields.io/badge/Platform-Calfa Vision-purple" alt="Calfa"></a>
|
| 24 |
+
</p>
|
| 25 |
+
|
| 26 |
+
## Dataset Description
|
| 27 |
+
|
| 28 |
+
RASAM 1 is a specialized dataset for Handwritten Text Recognition (HTR) focusing on Arabic historical manuscripts in **Maghrebi script**.
|
| 29 |
+
|
| 30 |
+
This HuggingFace dataset provides **cropped line-level images** paired with their transcriptions and rich metadata for 3 Arabic Maghrebi manuscripts from the BULAC Library. It is designed as a ready-to-use resource for benchmarking and training HTR models on under-resourced historical scripts.
|
| 31 |
+
|
| 32 |
+
| | |
|
| 33 |
+
|---|---|
|
| 34 |
+
| Manuscripts | 3 |
|
| 35 |
+
| Pages | 299 |
|
| 36 |
+
| Lines | 7,331 |
|
| 37 |
+
| Words | 97,311 |
|
| 38 |
+
| Characters | 492,221 |
|
| 39 |
+
|
| 40 |
+
> The full page-level dataset (PageXML + full-page images) is available on [GitHub](https://github.com/calfa-co/rasam-dataset).
|
| 41 |
+
|
| 42 |
+
## Source Documents
|
| 43 |
+
|
| 44 |
+
The corpus consists of three manuscripts from the BULAC Library (Paris), dating from the 17th to the 19th centuries:
|
| 45 |
+
- `BULAC_MS_ARA_417` (Historical)
|
| 46 |
+
- `BULAC_MS_ARA_609` (Inheritance law)
|
| 47 |
+
- `BULAC_MS_ARA_1977` (Historical)
|
| 48 |
+
|
| 49 |
+
## Usage
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
from datasets import load_dataset
|
| 53 |
+
|
| 54 |
+
# Load the full dataset
|
| 55 |
+
ds = load_dataset("calfa-ai/rasam-1")
|
| 56 |
+
|
| 57 |
+
# Access a sample
|
| 58 |
+
sample = ds["train"][0]
|
| 59 |
+
sample["image"].show()
|
| 60 |
+
print(sample["transcription"])
|
| 61 |
+
|
| 62 |
+
# Filter by manuscript
|
| 63 |
+
bulac_609 = ds["train"].filter(lambda x: x["manuscript_name"].startswith("BULAC_MS_ARA_609"))
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Transcription Guidelines (Summary)
|
| 67 |
+
The RASAM transcription protocol prioritizes fidelity to the scribe's practice over modern standard orthography to ensure robust HTR training. Key principles include:
|
| 68 |
+
|
| 69 |
+
- Orthographic Preservation: Scribes' specific spellings (including archaisms and variant usages of characters like *dād*/*ẓāʾ* or *ṣād*/*ṭāʾ*) are maintained exactly as they appear in the manuscript.
|
| 70 |
+
- Normalization Exceptions: To facilitate computational consistency, specific glyphic forms for relative pronouns (e.g., *allaḏī*/*allatī*) and the preposition *fī* are standardized.
|
| 71 |
+
- Diacritics & Hamza: Vocalization and diacritics are generally excluded unless semantically essential. Hamzas are only transcribed if explicitly present in the source.
|
| 72 |
+
- Handling Uncertainty: Illegible or damaged characters are marked with #. Gaps in the source text are not reconstructed.
|
| 73 |
+
- Formatting: Spaces are restored in the transcription regardless of their visual presence in the manuscript layout.
|
| 74 |
+
|
| 75 |
+
*Source*: For a detailed breakdown of specifications and paleographical considerations, please refer to the full paper (see below)
|
| 76 |
+
|
| 77 |
+
## Citation
|
| 78 |
+
|
| 79 |
+
```bibtex
|
| 80 |
+
@InProceedings{2021rasam-dataset,
|
| 81 |
+
author = {Vidal-Gorène, Chahan and Lucas, Noëmie and Salah, Clément and Decours-Perez, Aliénor and Dupin, Boris},
|
| 82 |
+
editor = {Barney Smith, Elisa H. and Pal, Umapada},
|
| 83 |
+
title = {RASAM -- A Dataset for the Recognition and Analysis of Scripts in Arabic Maghrebi},
|
| 84 |
+
booktitle = {Document Analysis and Recognition -- ICDAR 2021 Workshops},
|
| 85 |
+
year = {2021},
|
| 86 |
+
publisher = {Springer International Publishing},
|
| 87 |
+
address = {Cham},
|
| 88 |
+
pages = {265--281},
|
| 89 |
+
isbn = {978-3-030-86198-8}
|
| 90 |
+
}
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
## License
|
| 94 |
+
|
| 95 |
+
This dataset is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
| 96 |
+
|
| 97 |
+
## Acknowledgements
|
| 98 |
+
|
| 99 |
+
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.
|
| 100 |
+
|
| 101 |
+
<div style="display: flex; align-items: center; gap: 15px;">
|
| 102 |
+
<img src="./assets/bulac.png" style="height: 50px;" alt="bulac-logo">
|
| 103 |
+
<img src="./assets/calfa.png" style="height: 50px;" alt="calfa-logo">
|
| 104 |
+
<img src="./assets/distam.png" style="height: 50px;" alt="distam-logo">
|
| 105 |
+
<img src="./assets/gis-momm.png" style="height: 50px;" alt="gis-logo">
|
| 106 |
+
<img src="./assets/cnrs.png" style="height: 50px;" alt="cnrs-logo">
|
| 107 |
+
<img src="./assets/mesri.png" style="height: 50px;" alt="mesri-logo">
|
| 108 |
+
</div>
|