Ground-truth of the Tarima project (HTR of Maghrebi Arabic documents).
> **[May 22, 2026]**: The official version of our dataset is now also available at the line-level for download directly on Hugging Face!
# TariMa dataset
Ground-truth of the TariMa project (HTR/OCR of Maghrebi Arabic documents).
The dataset has been collated within the frame of the TariMa project (Tarih al-Maghrib. Writing History in the Maghreb in the modern and contemporary era), sponsored by the French agency Collex-Persee and supervised by Antoine Perrier (CNRS).
The project combines the development of character recognition models for manuscripts (HTR) and prints (OCR) of Maghrebi Arabic texts and the scientific study of collections of Maghrebi works held in French libraries (BULAC, project manager, Maison méditerranénne des sciences de l'Homme et 'Institut de recherche sur les mondes arabes et musulmans (CNRS/AMU)).
It aims to make available the digitization of a set of primary sources (in image and text format) that have been rarely used until now. Online accessibility will promote the use of Arabic sources, which are at the heart of recent shifts in the historiography of the Maghreb.
The selected corpus is composed of manuscripts and printed texts of the historical genre in a broad sens (chronicles, travelogues, biographical dictionaries, universal history, genealogy, autobiography...) Historians using Arabic manuscripts had neglected the study of this genre, in comparison with religious sciences or linguistics.
## Dataset composition
The RASAM dataset already provides a strong baseline for the recognition of Arabic Maghrebi scripts. This new dataset is focused on specific contents or vocabulary lacking in previous RASAM models.
It contains 120 images, for a total of:
* 144 TextRegions
* 2.673 TextLines (2.364 transcribed)
* 27.583 words (11.307 unique)
* 146.667 characters
The TariMa dataset comprises different image resolution and size (width from 982px to 8049px), different layouts (double page, multiple columns), state of conservation, and also m …