Datasets:
You need to agree to share your Hugging Face information to access this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This dataset is shared for research and non-commercial use under CC BY-NC 4.0. We'd love to know who is working on Hassaniya. Please tell us a little about yourself.
Log in or Sign Up to review the conditions and access this dataset content.
Hassaniya GPT Parallel Corpus
A three-way parallel corpus of 12,104 sentences in Hassaniya Arabic, Modern Standard Arabic (MSA), and English, built by Hassaniya GPT in Nouakchott, Mauritania.
Hassaniya is spoken by several million people in Mauritania, Western Sahara, southern Morocco, northern Mali, and Senegal. It still has almost no public NLP resources. We release this corpus to help researchers build and evaluate translation, dialect identification, and language models for Hassaniya, and we hope it encourages more shared work on the language.
Why we are releasing it
Commercial competition between Hassaniya products is healthy: it pushes everyone to build better tools, and the end users are the ones who benefit. Research is different. For a low-resource language like Hassaniya, progress in NLP depends on combining efforts, and no single team has enough data alone. We are sharing ours so that others can build on it rather than start from zero.
A good translator is also the fastest way to bring Hassaniya speakers the benefits of today's large AI systems. Training a Hassaniya language model from scratch would need data and computing power the language does not have. A Hassaniya ↔ MSA translator, by contrast, can be trained on a corpus of this size. Placed in front of an existing LLM, it lets people talk to that LLM in Hassaniya. Our own public chatbot works this way: Hassaniya → MSA → LLM → Hassaniya.
Quick start
from datasets import load_dataset
ds = load_dataset("seyid22/Hassaniya-GPT")
print(ds["train"][0])
# {'id': 'hgpt-00001', 'hassaniya': '...', 'msa': '...', 'english': '...', 'category': '...'}
Dataset structure
| Field | Description |
|---|---|
id |
Unique identifier (hgpt-00001 …) |
hassaniya |
Sentence in Hassaniya Arabic, Arabic script |
msa |
The same sentence in Modern Standard Arabic |
english |
The same sentence in English |
category |
Topic of the sentence (see below), assigned automatically |
Splits
| Split | Pairs |
|---|---|
| train | 10,604 |
| validation | 500 |
| test | 1,000 |
The splits are fixed so that results are comparable across papers. Please report results on the test split and use validation for model selection.
How the test set was built:
- Sentences that are near-duplicates of each other were first grouped. A group is formed when two rows share the same Hassaniya, MSA, or English text, ignoring case and punctuation. Each group was then placed in a single split, so a test sentence never has a near-copy in training.
- The groups were shuffled with a fixed random seed (42), then 1,000 pairs were drawn for
testand 500 forvalidation. The rest went totrain. - Because the draw is random, the test set follows the same topic mix as the whole corpus (see the category table below). A model trained only on
trainnever sees a test sentence.
Categories
The sentences are mostly short, everyday conversational turns: customer-service exchanges and daily-life situations in a Mauritanian setting.
| Category | Pairs | Examples of topics |
|---|---|---|
| general | 3,180 | Generic conversational turns (clarifications, apologies, follow-ups) |
| banking_payments | 1,731 | Cards, accounts, transfers, mobile money (Bankily, Masrvi…) |
| social_daily_life | 1,464 | Ramadan, weddings, family, weather, greetings |
| transport | 1,444 | Ride-hailing, drivers, fares, intercity travel |
| telecom | 1,393 | SIM cards, top-ups, internet, bills |
| web_services | 1,291 | Requests for web pages, forms, logos |
| administration | 857 | ID cards, documents, police, official procedures |
| shopping_prices | 701 | Markets, prices, bargaining |
| health | 43 | Health and wellbeing |
Category labels were inferred automatically from the English sentence using keyword rules. A manual check of about 250 rows found roughly 9 in 10 labels correct. Treat them as approximate, which is good enough for filtering or analysis, but they are not gold labels.
Statistics
| Hassaniya | MSA | English | |
|---|---|---|---|
| Average words per sentence | 11.1 | 12.8 | 16.0 |
| Maximum words | 32 | 38 | 43 |
How the data was made
- Source sentences. English and MSA sentence pairs were generated with Google Gemini across topics relevant to everyday life and customer service in Mauritania.
- Translation into Hassaniya. Five native Hassaniya speakers on the Hassaniya GPT annotation team translated each sentence into Hassaniya the way it is naturally spoken, not word for word.
- Review. Two reviewers checked the translations.
- Cleaning for release. We applied Unicode normalization (NFC) and whitespace cleanup, unified the spelling of the /g/ sound to
گ, removed one misaligned pair, and created the splits.
Orthography notes
- Hassaniya has no standard spelling. This corpus uses Arabic script as written by native speakers, without diacritics.
- The /g/ sound (as in گال "he said") is consistently written
گ. - Many French loanwords appear, as they do in everyday speech in Mauritania, for example كردانديتي (carte d'identité), كوميسيريا (commissariat), كونكسيوه (connexion).
- Spelling varies between annotators for some words (e.g. أشوي / اشوي). We kept this variation because it reflects real usage.
Our experience building a Hassaniya translator
We used this corpus to build a translator. Here is what we learned, in case it saves others time.
1. First attempt: English ↔ Hassaniya with NLLB-200. We fine-tuned NLLB-200 on this corpus plus about 15,000 open-source pairs. The two directions were very unequal: Hassaniya → English was clearly better than English → Hassaniya. Gender was a recurring problem. English is often gender-neutral ("you", "your friend"), but Hassaniya must choose, and the model often chose wrongly or inconsistently. Connected to an LLM, this model already gave a usable Hassaniya chatbot, but it was not reliable enough.
2. Switching the pivot language to MSA. With so little data, English ↔ Hassaniya is a very large gap to bridge. MSA is much closer to Hassaniya in vocabulary and grammar. We started again and fine-tuned MADLAD-400 (3B) on Hassaniya ↔ MSA using about 26,000 pairs from four sources: this corpus, DAH, Alexandria, and RIMAI. The result was clearly better and is the model we tested in production.
3. Understandable beats perfect. We deliberately accept output that mixes Hassaniya and MSA, as long as it is clear, rather than output that looks fully Hassaniya but says the wrong thing. For a user, a slightly formal but correct answer is much better than a fluent mistake.
4. Input and output are not the same register. Users write everyday, informal Hassaniya, but a service should answer politely, using the plural of respect as is customary in Mauritania. Plan for this difference from the start, in both the data and the evaluation.
5. Deployment. In our tests, converting the model to CTranslate2 for faster inference noticeably lowered translation quality, so we serve MADLAD in PyTorch at full precision on a single GPU.
6. Handling variants. As described under Limitations, words outside the annotators' vocabulary (e.g. شطرا) can fail. A simple rule-based fallback for low-confidence inputs fixes many of these cases cheaply.
7. Keep learning from real use. Real conversations show which words and constructions the model gets wrong. Where users consent, our annotators correct those translations and the corrections go back into training.
Evaluation results
Our MADLAD-400 (3B) model, fine-tuned on about 26,000 Hassaniya ↔ MSA pairs, reaches:
| Direction | spBLEU | chrF++ |
|---|---|---|
| Hassaniya → MSA | 47.96 | 59.26 |
| MSA → Hassaniya | 34.82 | 48.00 |
How this test set was built. The scores above were measured on a held-out test set of 1,000 pairs: 250 from each of the four sources used for training (Hassaniya GPT, DAH, RIMAI, and Alexandria). None of these pairs were used in training. Taking an equal share from each source means the score reflects several annotation teams and spelling habits, not only ours. This test set is separate from the test split released here, so the two are not directly comparable.
How well does it generalize? A test on unseen data. We also evaluated an earlier checkpoint (stage 3), trained only on Hassaniya GPT, RIMAI, and DAH, on the public test set of the Mauritanian subset of Alexandria, using MSA versions of these sentences that we added. Alexandria data was never seen during this training.
| Direction (stage 3, Alexandria test) | spBLEU | chrF++ |
|---|---|---|
| Hassaniya → MSA | 29.31 | 43.98 |
| MSA → Hassaniya | 17.00 | 33.90 |
The scores are about 14–15 chrF++ points lower than on our in-domain test set. Two things explain most of the gap:
- New domains. Alexandria covers topics that are absent from the other three datasets, such as agriculture and livestock, education, and health. The model meets vocabulary it has never seen (wells, herds, locusts, crops…).
- New writers. Alexandria was translated by a different team, with its own vocabulary and spelling habits. This is the same kind of drift we saw with real chatbot users (see below).
The scores are not directly comparable with the table above (different test sets and a different model checkpoint), but they give a fair idea of what to expect on Hassaniya text from new topics and new writers.
What 4,000 real users taught us
We opened a free Hassaniya chatbot built on this translator to the public. It translates the user's Hassaniya into MSA, sends it to a general-purpose LLM, and translates the answer back into Hassaniya. More than 4,000 people used it, and users rated it 3.3 / 5 on average. The average hides the most useful finding: almost all ratings were either 1/5 or 5/5. The system worked very well for some requests and failed badly for others, with little in between.
Where it failed:
- Purely Hassaniya culture. Questions about Hassaniya poetry and verse (ڭفان, اطلع) or about deep, rare Hassaniya words (e.g. لڭميره) went badly. This knowledge is in neither the translator's training data nor the general-purpose LLM behind it. A translator lets a Hassaniya speaker talk to an LLM, but it cannot give the LLM knowledge of Hassaniya culture.
- Spelling. Users do not follow one writing convention. For example, they write the /g/ sound in several ways (ڭ, گ, ق, ك…), while the model has only seen the annotators' consistent convention (گ in this corpus). Normalizing such variants before translation is a cheap and effective first fix.
Automatic metrics and real use disagree on which direction is better. On the test set, Hassaniya → MSA scores clearly higher than MSA → Hassaniya. In the chatbot, it was the reverse: MSA → Hassaniya worked much better. The explanation is the input each direction receives:
- MSA → Hassaniya translates the LLM's answers. These are clean, standard Arabic, very close to the MSA side of the training data, so the model sees the kind of input it was trained on.
- Hassaniya → MSA translates what users type. The model only knows the five annotators' vocabulary and spelling. Real users bring different, inconsistent spellings and words, a clear case of data drift between training data and real input.
The lesson for anyone building on this corpus: a test set written by the same people as the training data overestimates how well a model will understand real users. Evaluate on real user text as early as possible.
A paper describing the MADLAD fine-tuning in detail is available on Zenodo.
Intended uses
- Machine translation: Hassaniya ↔ MSA, Hassaniya ↔ English
- Evaluation benchmark for Hassaniya translation and LLMs
- Dialect identification and Arabic dialect research
- Linguistic studies of Hassaniya vocabulary, code-switching, and orthography
Limitations
- The source sentences are synthetic. They were generated by an LLM, so their style is more regular than spontaneous speech, and some topics (customer service, payments, telecom) are over-represented.
- Vocabulary of a small team. All Hassaniya text comes from five annotators and two reviewers, so it reflects the words and spellings they use. Hassaniya varies a lot between regions and speakers, and many variants are missing or rare. We saw the effect in our own MADLAD-based translator. It understood شطاري and شمطري but not شطرا, although all three mean "what's up?". In our chatbot we work around this with a fallback: when the model's confidence is low, regular-expression rules replace known variants with a form the model understands. Models trained only on this corpus will likely need similar handling, or more diverse data.
- No literary or deep vocabulary. The corpus covers everyday and service conversation. It contains no Hassaniya poetry (ڭفان, اطلع) and little rare or traditional vocabulary.
- One translation per sentence. Other valid Hassaniya renderings exist. Use chrF alongside BLEU, since exact-match metrics will underestimate quality.
- Register. Many sentences are polite customer-service turns, and informal or rural speech is under-represented.
- Gender and number. English source sentences are often gender-neutral, while Hassaniya and MSA must mark gender. The chosen gender is sometimes arbitrary.
- Names. Person and place names are common Mauritanian names used in invented situations. They do not refer to real people.
- Automatic categories, see above.
License
CC BY-NC 4.0: free for research and other non-commercial use, with attribution. For commercial licensing, contact us at seyid.ahmedou@hassaniya-gpt.com.
Citation
@misc{hassaniyagpt2026parallel,
title = {Hassaniya GPT Parallel Corpus: A Hassaniya--MSA--English Parallel Dataset},
author = {Ahmedou, Seyid and {Hassaniya GPT team}},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/seyid22/Hassaniya-GPT}}
}
Team and contact
Built by the Hassaniya GPT team (five annotators and two reviewers), led by Seyid Ahmedou Mohamed El Kory.
Questions, corrections, or collaboration ideas: seyid.ahmedou@hassaniya-gpt.com · hassaniya-gpt.com
- Downloads last month
- 58