Most commercial sentiment-analysis tools were trained on English, fine-tuned on Modern Standard Arabic, and shipped to the Middle East. Applied to Moroccan conversation — where a single tweet can mix Darija, French, MSA and Latin-script Arabizi — they fail predictably and expensively. This is a technical deep dive on why, and on the trilingual approach HarchIQ uses to reach 88% sentiment accuracy on Moroccan text.
The three failure modes
Off-the-shelf Arabic sentiment models fail on Moroccan text in three characteristic ways. The first is dialect mismatch: a model trained on Levantine or Egyptian Arabic misreads Darija vocabulary ('dbg' = 'now', 'shi' = 'some') and produces neutral or wrong labels. The second is code-switching: a sentence like 'Le service de la banque est l3q, wallah je vais changer' switches from French to Darija mid-sentence, and most models tag the whole sentence by the dominant-script language. The third is script: Arabizi (Arabic in Latin characters, with numbers for emphatic consonants) is invisible to models that expect Arabic script.
The Darija gap is stark. A tool that scores 91% on English and 78% on MSA drops to 41% on Moroccan Darija — barely better than random. For a Moroccan bank monitoring Twitter, this means the majority of customer complaints in Darija are either missed or mislabelled neutral, leaving the reputation-risk signal invisible until it has already migrated to French-language press.
Tool-by-tool comparison
The code-switching problem in detail
Moroccan corporate conversation is not monolingual. A single customer-service thread on X routinely contains French for the formal complaint, Darija for the emotional register, and English loanwords for product names. A sentiment model that classifies by document language mislabels the thread as 'French' and applies a French-language model to the Darija segments. The result is a false neutral — the most dangerous label in reputation monitoring, because it hides a signal rather than corrupting it.
How HarchIQ handles it
HarchIQ is trilingual by design. The pipeline runs three parallel passes — French, MSA, and a Darija-native model trained on 1.4 million hand-labelled Moroccan sentences — and a code-switching detector that segments a sentence by language span before classification. Arabizi is normalised to Arabic script via a rule-based transliteration layer before the Darija model sees it. The three passes are reconciled by a confidence-weighted ensemble that prefers the Darija model on Darija-dominant spans.
What 'Darija-native' means
A Darija-native model is not an MSA model with a dialect adapter. It is a model trained from scratch on Moroccan text, with a vocabulary that includes the French loanwords ('facture', 'service', 'recharge') that are syntactically Darija, the Berber substrate vocabulary, and the emphatic consonants that MSA models handle inconsistently. The training corpus spans customer-service transcripts, social platforms, and press comments — the registers where Moroccan corporate reputation actually lives.
The Souk test
We benchmark every model release against the 'Souk test' — 500 hand-labelled Moroccan sentences drawn from real customer-service and social conversation, balanced across positive, neutral and negative. A model that passes the Souk test handles the registers that matter for reputation monitoring: the frustrated customer, the ironic compliment, the Berber-inflected complaint, the French-formal request. Off-the-shelf models score 41% on the Souk test; HarchIQ scores 88%.
“We were missing every other Darija complaint. The reputation dashboard looked green while Twitter was red. That is how a crisis surprises a bank that thought it was monitoring.”— Head of Digital, Moroccan bank (anonymised)
Practical implications
- Ask any sentiment vendor for a Darija-specific accuracy number on a hand-labelled benchmark. If they cannot produce one, the tool is not fit for Moroccan monitoring.
- Audit the false-neutral rate, not just the overall accuracy. A high false-neutral rate is the silent failure mode.
- Cover Arabizi. Roughly 30% of Moroccan social conversation about brands is in Latin script; a script-only Arabic model is blind to it.
- Test on your own customer-service transcripts before buying. Vendor benchmarks are often MSA-heavy.
- Re-benchmark quarterly. Darija evolves fast — new loanwords, new slang — and a static model degrades.
HarchIQ's trilingual sentiment engine is the foundation of Harch Atelier's reputation monitoring. The Darija-native model is retrained quarterly on fresh Moroccan text, and the Souk test is published in our methodology documentation.