DELSOM: Decoding the Moroccan Social Media Sociolect for Sentiment Analysis
Modeling and Development of the Linguistic Knowledge Base DELSOM
This paper introduces DELSOM (Dictionnaire Electronique du Langage SOciolecte Marocain), a specialized electronic dictionary designed for the Moroccan sociolect used on social media. It establishes a formal framework for normalizing "Arabizi" (Arabic written with Latin letters and numbers) to facilitate downstream Sentiment Analysis.
TL;DR
The Moroccan digital landscape is a linguistic melting pot where formal rules vanish. Research by Mansouri et al. introduces DELSOM, a first-of-its-kind electronic dictionary specifically designed to normalize the chaotic "Moroccan Sociolect"—a blend of Arabic, French, and numbers. This work provides the architectural blueprint for transforming informal social media posts into structured data for Sentiment Analysis.
The "Sociolect" Challenge: Why Standard NLP Fails
Morocco’s linguistic situation is uniquely complex. Users navigate between Classical Arabic, Darija (Moroccan Arabic), French, and Amazigh. On social networks like Facebook and Hespress, this has evolved into a Sociolect characterized by:
- Latinization: Writing Arabic using Latin characters.
- Numeral Substitution: Using numbers to represent sounds missing from the Latin alphabet (e.g.,
7for ‘ح’,3for ‘ع’). - Code-Switching: Mixing French and Arabic within a single sentence or even a single word.
Standard Arabic NLP tools are rendered useless because they expect formal syntax. The authors identified that without a specialized dictionary to act as a "linguistic bridge," sentiment analysis in this region would remain inaccurate.
Methodology: The Normalization Pipeline
The development of DELSOM follows a rigorous three-step modeling approach to turn "internet slang" into canonical dictionary entries.
1. Grammatical Canonicalization
The authors simplify words to their core forms to reduce dictionary redundancy.
- Verbs: Reduced to the 3rd person masculine singular (the aspectual base in Arabic).
- Nouns/Adjectives: Mapped to the masculine singular, with the specific exception of "broken plurals" (internal derivations) which are kept as unique entries.
2. Phonetic Standardization
Social media users often repeat letters for emphasis (e.g., "waaa3ra"). DELSOM applies rules to collapse these:
- Vocal Elongation: Multiple vowels are reduced to a maximum of two for standardization.
- Gemination: Consonant repetitions are normalized.
- S-Doubling: Adapting French phonetic rules (e.g., doubling 's' between vowels to avoid the 'z' sound).
Figure 1: The correspondence table between numbers, Latin letters, and Arabic phonemes used in DELSOM.
3. Combinatorial Writing Analysis
Since one word can be spelled dozens of ways (e.g., using 'ou' vs 'w'), the authors use a mathematical multiplication principle. If a word has sub-segments with variations each, the dictionary generates all possibilities to ensure the system recognizes every user variant.
From Rule to Reality: A Practical Example
Consider the phrase extracted from Facebook: “waaa3ra hadi 3andak” (roughly: "Check this out, it's superb!").
| Original Word | Processing Step | Canonical Entry |
|---|---|---|
| waaa3ra | Remove elongation, convert to masculine | waa3r / ouaa3r |
| hadi | Convert feminine demonstrative to masculine | hada |
| 3andak | Maintain as preposition/pronoun combo | 3andak / 3andek |
Figure 2: The grammatical modeling workflow for extracting canonical forms.
Critical Insight & Future Directions
The core value of DELSOM lies in its standardization logic. Rather than simply listing words, it provides a mathematical and phonetic framework to handle the infinite variability of the Moroccan sociolect.
Limitations & Open Questions:
- Scalability: As internet slang evolves weekly, how will DELSOM automate the discovery of new "semantic slides" (words shifting meaning)?
- Sentiment Polarity: While the framework is established, the actual annotation of positive/negative weights for thousands of sociolect terms remains a heavy manual task.
- Future Integration: The next logical step is integrating DELSOM with State-Space Models or Transformers to handle the contextual nuances of sentiment beyond simple dictionary lookups.
In conclusion, DELSOM is a foundational work for North African NLP, proving that understanding the "socio" in sociolect is just as important as the "linguistics" itself.
