Academic research on Moroccan Darija has crossed several key milestones: the Arabic-Moroccan Darija Code-Switched corpus by Samih et al. (2016, 49 citations) laid the foundations for code-switching work, and the study by Chabbaki et al. (2025) proposed sentiment analysis on a large corpus of Hespress comments. But between the academic state of the art and industrial production, the gap remains wide. On the commercial-tool side, the finding is harsh: 41% average accuracy on Darija, versus 91% on English.
The three structural challenges
Moroccan multilingualism is not an addition of juxtaposed languages. It is an intertwining. Three structural challenges face any sentiment-analysis system operating on Moroccan content.
- Intra-sentence code-switching: 'Le service de la banque est l3q, wallah je vais changer' combines French, Darija (in Latin script) and MSA. Models classifying by dominant language get it wrong.
- Script variation: the same text can exist in Arabic script, Latin script (Arabizi, with digits for emphatic consonants: 7 for ح, 9 for ق), or a mix. Without script normalization, the model is blind to 30% of Moroccan social content.
- A specific emotional register: Darija carries intensity markers (wallah, swear words, augmentative suffixes) with no direct MSA equivalent. Models trained on Tunisian or Levantine Arabic misread them.
The academic state of the art
The corpus by Samih et al. (2016) remains a reference: it documents the frequency and structure of Moroccan code-switching from tweets, with linguistic annotations. The awesome-moroccan-arabic-nlp GitHub repository now lists several datasets, including a corpus of 50,000 tweets annotated for sentiment, dialect detection and topic detection. Chabbaki et al. (2025) extended this work to Hespress comments, demonstrating the feasibility of Darija sentiment analysis on a production corpus, with accuracy strongly dependent on preprocessing and annotation quality.
Transformer approaches
Recent work (Scribd 2024, arXiv 2024-2025) explores multi-task transformer architectures for processing code-switched Arabic, including Moroccan Darija mixed with English and French. These architectures show significant gains on intra-sentence language detection and sentiment classification. Scaling to industrial production, however, is held back by three factors: annotation cost, the scarcity of domain-specific corpora (banking, telecom, retail), and the fast linguistic drift of Darija.
The false-neutral problem
The most costly failure mode is not misclassification — it is false neutrality. A classifier that has not understood Darija will label a negative sentence 'neutral', because it failed to spot the sentiment marker. And an erroneous neutral triggers no alert: it is invisible. In our benchmarks, 38% of negative Darija sentences are labelled neutral by commercial tools. More than a third of negative signals is therefore silently ignored.
The Harch methodology in production
Harch Atelier's approach rests on three pillars aligned with the academic state of the art but adapted to industrial constraints. First, a Darija-native model trained on 1.4 million annotated Moroccan sentences — not an MSA adapter. Second, a code-switching detector that segments a sentence by language span before classification, rather than classifying by dominant language. Third, an Arabizi → Arabic script normalization layer, which restores the Darija model's visibility over the 30% of Moroccan social content written in Latin characters.
The Souk test
We benchmark every model release on the 'Souk test': 500 manually annotated Moroccan sentences drawn from real customer-service and social conversations, balanced positive/neutral/negative. The test includes code-switching (FR/Darija), Arabizi, intense emotional register, and edge cases (irony, sarcasm, ambiguous compliments). A model that passes the Souk test handles the registers that matter for reputation monitoring. Generic commercial tools score 41% on it; Harch 88%.
The acknowledged limits
No system is perfect. We acknowledge three limits: incomplete coverage of very recent neologisms (slang under 6 months old), difficulty with context-free irony (text alone is not always enough), and under-training on regional Darija varieties (North, South, Berber-speaking areas). These limits are corrected by quarterly retraining and a panel of regional annotators.
“When a monitoring tool does not understand Darija, it does not fail loudly — it stays silent. And silence over a negative signal is exactly what a communications department cannot afford.”— Karim Alaoui, Harch Atelier
The buying criterion
For a Moroccan buyer of a sentiment-analysis tool, the decision criterion is simple: demand Darija-native accuracy on an annotated, public benchmark. If the vendor cannot produce that number, the tool is not calibrated for the Moroccan market. That is the only question that matters. The rest is accessory.
Harch Atelier's trilingual engine is trained on a 1.4M-sentence Darija-native corpus, retrained quarterly, and benchmarked on the public Souk test. The full methodology is documented in our NLP-2026-01 method note.