MARATTO

article · ACM Transactions on Asian and Low-Resource Language Information Processing

A Hybrid Lexicon–Transformer Framework for Sentiment, Emotion, and Context Classification in Moroccan Darija (TriLex-Darija)

Abstract

This paper introduces TriLex-Darija , a large-scale affective lexicon suite and a hybrid lexicon–transformer framework for analyzing Moroccan Arabic (Darija) social media text across three complementary dimensions: sentiment, emotion, and pragmatic context. The resource is constructed from a corpus of 288,709 manually annotated comments and consists of three unigram lexicons, each mapping 147,565 words to normalized probability distributions over task-specific labels. We first evaluate a symbolic lexicon-based classifier (without machine learning) based on word-level score aggregation to assess the intrinsic quality of the proposed TriLex-Darija resource. Despite the absence of contextual modeling, this approach achieves competitive performance, demonstrating that corpus-derived lexical knowledge captures substantial affective information in Moroccan Darija. To further improve performance, we propose a unified hybrid framework that combines TriLex-Darija features with contextual embeddings extracted from MARBERT. All models are trained using a consistent LinearSVC classifier to ensure fair comparison and reproducibility. In addition to the symbolic model, we evaluate a lexicon-feature-based LinearSVC model, allowing a clear distinction between symbolic, feature-based, and hybrid approaches. Experimental results show that the hybrid model consistently outperforms both BERT-only and lexicon-feature-based baselines across all tasks. For sentiment classification, the hybrid model achieves a macro F1-score of 72.96% , compared to 59.15% for BERT-only and 67.94% for the lexicon-feature-based model. For emotion classification, it reaches 92.92% , outperforming BERT-only ( 79.17% ) and lexicon-feature-based ( 89.55% ) models. For pragmatic context classification, the hybrid model achieves 91.35% , compared to 75.93% for BERT-only and 87.72% for the lexicon-feature-based model. Bootstrap confidence intervals (95%) and McNemar’s tests confirm that all improvements are statistically significant ( p < 0.001). Overall, TriLex-Darija demonstrates that combining lexical knowledge with contextual embeddings leads to robust, interpretable, and statistically validated affective models for Moroccan Darija in low-resource settings.

Research topics

  • Sentiment Analysis and Opinion Mining
  • Hate Speech and Cyberbullying Detection
  • Emotion and Mood Recognition

Read the original research

This page summarises published work. The authoritative version sits with the publisher.

DOI: 10.1145/3812654

Is something wrong with this record? Report it or request removal.

Discussion

Discuss this research

Have you built on this work, tried to replicate it, or seen it applied in practice? Share what you know. Verified researchers and MARATTO™ domain experts can open a discussion, and any member can reply. Contributions are reviewed before they appear.

No discussion yet. Open the first thread.