Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

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

Domain:

natural language processing

Record type:

paper
Creator:
SarSafEl
Publisher:
Ass
Host:
This article 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.

Visit

doi.org

Tasks

emotion identificationsentiment analysistext classification

Languages

Arabic, Algerian SpokenArabic, Moroccan Spoken

Licenses

https://creativecommons.org/licenses/by/4.0/legalcode

Similar

Sentiment Analysis in Moroccan Darija: Comparative Evaluation of Transformer Models for a Large-Scale Multi-Domain DatasetCompact Transformer-based Language Models for the Moroccan DarijaMSA-Moroccan Dialect: A Multimodal Sentiment Analysis Dataset for Moroccan Arabic (Darija)Enhancing Automatic Speech Recognition for Moroccan Darija Using Transformer ModelsTRANSFORMER-BASED CYBERBULLYING DETECTION IN MOROCCAN DARIJA: A WILLARD TAXONOMY APPROACHlazyAspirations/Sentiment-classification-of-texts-in-Darija

Sentiment Analysis in Moroccan Darija: Comparative Evaluation of Transformer Models for a Large-Scale Multi-Domain Dataset

Compact Transformer-based Language Models for the Moroccan Darija

MSA-Moroccan Dialect: A Multimodal Sentiment Analysis Dataset for Moroccan Arabic (Darija)

This dataset provides the first publicly available multimodal resource for sentiment analysis in Mor

Enhancing Automatic Speech Recognition for Moroccan Darija Using Transformer Models

TRANSFORMER-BASED CYBERBULLYING DETECTION IN MOROCCAN DARIJA: A WILLARD TAXONOMY APPROACH

Cyberbullying remains a serious threat, yet detection tools for Arabic dialects are scarce. Moroccan

lazyAspirations/Sentiment-classification-of-texts-in-Darija

Sentiment Classification of Texts in Darija 🇩🇿🇲🇦 📌 Project Overview This project focuses on the Sent