Logo Lanfrica

KerenLart/african-language-sentiment-comparison

Domaine:

natural language processing

Type de record:

project
Créateur:
Ker
Hôte:
# Comparative Analysis of Machine Learning Methods for African Language Sentiment Analysis **Author:** [Your Name] **Course:** Computational Models for Social Media Mining **Institution:** [Your University] **Code Available:** github.com ## Overview This project presents a systematic comparison of machine learning approaches for sentiment analysis in African languages, specifically examining Twi and Hausa using the AfriSenti dataset. The study evaluates traditional machine learning methods (Naive Bayes, Support Vector Machines), transformer-based models (BERT), and hybrid ensemble approaches across 4,818 Twi and 22,152 Hausa social media texts. ## Key Findings - **Baseline Traditional ML Performance:** - Twi: SVM 54.7% F1, Naive Bayes 47.1% F1 - Hausa: SVM 74.3% F1, Naive Bayes 71.9% F1 - **Enhanced Traditional ML Performance:** - Twi: Enhanced SVM 57.2% F1, Enhanced Naive Bayes 54.3% F1 - Hausa: Enhanced SVM 75.1% F1, Enhanced Naive Bayes 72.2% F1 - **BERT Performance:** - Twi: 44.0% F1-score - Hausa: 68.5% F1-score - **Enhanced Ensemble Methods:** - Twi: Weighted voting 54.9% F1 - Hausa: Weighted voting 75.4% F1 - **Enhanced preprocessing achieves significant improvements** - up to 5% F1-score gains for traditional ML methods - **Traditional ML maintains competitive performance** while requiring significantly less computational resources - **Dataset size critically impacts performance** - Hausa models benefit from 4.6x larger, more balanced dataset ## Repository Structure ``` ├── README.md ├── requirements.txt ├── data/ │ ├── raw/ # Original AfriSenti files │ └── processed/ # Cleaned/preprocessed data ├── src/ │ ├── __init__.py │ ├── data_preprocessing.py │ ├── traditional_ml.py │ ├── bert_model.py │ ├── hybrid_model.py │ └── evaluation.py ├── notebooks/ │ ├── 01_data_exploration.ipynb │ ├── 02_traditional_ml.ipynb │ ├── 03_bert_training.ipynb │ └── …