Analyzing Political Sentiment: A Web Application for Ranking Politicians Based on Twitter Data
This thesis project develops a web application designed to analyze and display public sentiment towards politicians derived from Twitter data. Utilizing natural language processing techniques and sentiment analysis, the application systematically collects tweets related to various politicians, evaluates their sentiment as positive or negative, and compiles these into a comprehensive score for each politician. The result is a dynamic ranking system that reflects current public opinion, offering insights into the political landscape through social media discourse. This project not only showcases the application of AI in understanding public sentiments but also explores the implications of social media as a mirror of political approval and dissent.
F1 Scores of all models:
RoBERTa-base: 0.7207202497814849
DeBERTa-v3-base: 0.706612565537888
XLNet-base-cased: 0.703134711476368
DistilBERT-base-uncased: 0.6946310726555206
alBERT-base-v2: 0.6884231790316232
THESIS_PROJECT/
│
├── data/ # Data files, including raw and processed data
│
├── db/ # Database scripts, schemas
│ └── init.sql # SQL script for initializing the database schema
│
├── docs/ # Documentation and thesis content
│
├── models/ # Machine learning models
│
├── src/ # Source code for the project
│ ├── tweet_scraper/ # Module for scraping tweets
│ │ └── Dockerfile # Dockerfile for tweet scraper setup
│ ├── sentiment_analysis/ # Sentiment analysis module
│ │ └── Dockerfile # Dockerfile for sentiment analysis setup
│ └── java_backend/ # Java backend application
│ └── Dockerfile # Dockerfile for Java backend setup
│
├── docker-compose.yml # Docker Compose file to manage all containers
│
├── notebooks/ # Jupyter notebooks for exploration and presentations
│
├── .gitignore # Standard gitignore file
└── README.md # Project overview and general instructions