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.
Ouahabi et al. (Mon,) studied this question.