HARCHAtelier
Skip to main content
HARCHAtelier
Sign inPricing
Request a demo
← Back to blog
Methodology

Darija Sentiment Analysis: The Challenges of Multilingualism

An average Moroccan tweet mixes Darija, French, MSA and anglicisms. Academic corpora (Samih 2016, Chabbaki 2025) have started equipping research. On the production side, the road remains open. State of the art and operational methodology.

KA
Karim Alaoui
AI Engines Lead, Harch Atelier
May 30, 2026·8 min read

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.

→
The Hespress specificity
Hespress comments form the largest public corpus of unedited written Darija. Chabbaki et al. used it precisely because no other source offers that volume and register diversity. For industrial reputation monitoring, the same reason makes it the number-one calibration source.

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.

Sentiment accuracy by language — commercial tools vs. Harch (%)
91%
English
84%
French
78%
MSA
41%
Darija (commercial average)
88%
Darija (Harch trilingual)

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.

38%
False-neutral rate on Darija
Commercial tools — base of 2,000 annotated sentences

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.

Tags
#Darija#sentiment analysis#NLP#code-switching#Arabic NLP#Samih 2016#Chabbaki 2025#multilingualism#Morocco
KA
Written by

Karim Alaoui

AI Engines Lead, Harch Atelier

Karim heads Harch Atelier's AI Engines practice and the NLP work on Moroccan Darija. He previously built multilingual sentiment systems for a European press-monitoring group.

Get your reputation audit →

A board-ready audit of how your company is perceived across 30+ media sources, 8 AI engines and the social conversation — in Darija, French and English. 5 minutes to request. 7 days to deliver.

Request my free audit →
Related articles

Keep reading.

Methodology13 min read

Sentiment Analysis in Arabic: Why Most Tools Fail on Darija

A technical deep dive on Arabic NLP, code-switching between Darija, French and MSA, and the trilingual approach HarchIQ uses to reach 88% accuracy on Moroccan conversation.

Read →
Methodology11 min read

The Harch 100 Methodology: How We Rank Morocco's Top Companies

The scoring formula, the pillar extraction, the data sources and the expert review — with a worked sample scoring for Bank of Africa at 72/100.

Read →
Methodology8 min read

The Moroccan Media Landscape: 20+ Sources to Monitor

Hespress dominates online audience, TelQuel and Medias24 structure the French-language debate, Le360 and H24Info set the pace of the flow. An operational map of the sources a reputation-intelligence platform must cover in Morocco.

Read →
Checking…
Initializing…
HARCH|Atelier

AI Reputation Intelligence — Africa & the French-speaking world.

atelier@harchcorp.com·+212 684 440 682
→ harchcorp.com
Navigation
ProductsSolutionsDecision AugmentationPricingRequest demoAbout
Products
Reputation Intelligence PlatformAPI & MCP IntegrationsInsight ReportsAdvanced DashboardsNewsletters & Briefings
Tools
★ Flagship Report 2026Harch 100 RankingRisk TrackerConsoleReport TemplatesInstitutional Audit
Resources
All resourcesFlagship Report 20262026 Media ReportCase studiesMethodologyFAQ
Company
About usCareersPartnersContactTrust CenterResilience MatrixLegal
8 francophone markets covered
FR
France
Paris · Lyon · Marseille
MA
Morocco
Casablanca · Rabat · Marrakech
BE
Belgium
Brussels · Antwerp
CH
Switzerland
Geneva · Lausanne · Zurich
QC
Quebec
Montreal · Quebec City
TN
Tunisia
Tunis · Sfax
LB
Lebanon
Beirut
SN
Senegal
Dakar
Building in Public, since 2026 · Casablanca, Morocco
Harch Atelier is a Harch Corp venture · Bank transfer