Amharic sentiment analysis using multilingual transformers (Afro-XLM-R) fine-tuned on AfriSenti — low-resource NLP for Ethiopian social media text
# Amharic Sentiment Analysis Platform
### Low-Resource NLP with Multilingual Transformers | End-to-End NLP Project
---
## Overview
An end-to-end NLP project that fine-tunes a multilingual transformer (Afro-XLM-R) on Amharic social media text to classify sentiment as **positive**, **negative**, or **neutral**. Amharic is a low-resource language spoken by 50+ million people in Ethiopia — making this a meaningful contribution to African NLP research.
The project compares a classical TF-IDF + SVM baseline against a state-of-the-art transformer, with a live deployed web application for real-time inference.
---
## Problem Statement
Sentiment analysis tools exist for English, French, Arabic — but almost nothing exists for Amharic. Ethiopian businesses, researchers, and policymakers have no automated way to understand public opinion expressed in the national language. This project builds that tool.
---
## Dataset
**AfriSenti-SemEval 2023 — Amharic Subset**
- Source: HuggingFace — shmuhammad/AfriSenti-twitter-sentiment
- Language: Amharic (am)
- Labels: Positive, Negative, Neutral
- Domain: Twitter/social media text
---
## Project Structure
```
amharic-sentiment-analysis/
│
├── data/
│ ├── raw/ # Original AfriSenti dataset files
│ ├── processed/ # Cleaned and tokenized data
│ └── external/ # Reference data
│
├── notebooks/
│ ├── 01_EDA.ipynb # Dataset exploration
│ ├── 02_preprocessing.ipynb # Text cleaning pipeline
│ ├── 03_baseline_model.ipynb # TF-IDF + SVM baseline
│ ├── 04_transformer_finetuning.ipynb # Afro-XLM-R fine-tuning
│ ├── 05_evaluation.ipynb # Model comparison
│ └── 06_error_analysis.ipynb # Error & attention analysis
│
├── src/
│ ├── data/ # Data loading and preprocessing
│ ├── models/ # Model training utilities
│ └── visualization/ # Plotting functions
│
├── app/
│ └── app.py # Streamlit web appli …