Logo Lanfrica

MosesOgenrwot/Sentiment_Analysis_Kenya

Domain:

natural language processing

Record type:

project
Creator:
Mos
Host:
This is a project aimed at carrying out sentiment analysis of social media posts in kenya regarding topics such as Mpesa fee, kenya elections an etc # πŸ‡°πŸ‡ͺ Kenya Social Media Sentiment Analysis > **Supervised Machine Learning on Kenyan Multilingual Social Media Data** > Languages supported: English Β· Swahili Β· Sheng (code-switching) --- ## πŸ‘₯ Group Members | # | Name | Student ID | |---|------|------------| | 1 | Moses Ogenrwot | 673380 | | 2 | Victor Kipngeno Rotich | 670388 | --- ## πŸ“‹ Project Overview This project builds and evaluates supervised machine learning classifiers to analyse public sentiment expressed on Kenyan social media. Given the multilingual nature of Kenyan online discourse β€” mixing English, Swahili, and Sheng (urban slang/code-switching) β€” the project includes a custom multilingual preprocessing pipeline, a labelled dataset of 920 posts, and four trained classification models compared by standard NLP metrics. ### Topics Covered | Topic | Description | |-------|-------------| | **M-Pesa Fees** | Public sentiment on Safaricom mobile money transaction charges | | **Elections** | Views on Kenya's electoral process, IEBC, and democracy | | **Fuel Prices** | Reactions to EPRA fuel price reviews and energy costs | | **Education** | Opinions on CBC curriculum, school fees, and teacher strikes | | **Cost of Living** | Sentiments on inflation, rent, food prices, and affordability | ### Research Questions Addressed 1. Can standard ML classifiers (Naive Bayes, Logistic Regression) accurately classify sentiment in multilingual Kenyan social media text? 2. How does TF-IDF feature engineering with bigrams compare to Bag-of-Words for this task? 3. What are the dominant public sentiments across different Kenyan social issues? --- ## πŸ“ Project Structure ``` kenya_sentiment/ β”‚ β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ kenya_social_media_dataset.csv # 920 labelled social media posts β”‚ β”œβ”€β”€ generate_dataset.py # Initial seed dataset generator β”‚ β”œβ”€β”€ build_large_dataset.py # Full 920-row dataset builder β”‚ β”œβ”€β”€ expand_dataset.py # Dataset augmentation utilities β”‚ └── final_dataset.py …