Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion
This study investigates the effectiveness of various deep learning architectures and statistical models in both sentiment analysis and the temporal analysis of online public discourse through topic modelling and sentiment forecasting of tweets related to the 2024 Indonesian and U.S. elections. Given...
Saved in:
Main Author: | |
---|---|
Other Authors: | |
Format: | Final Year Project |
Language: | English |
Published: |
Nanyang Technological University
2024
|
Subjects: | |
Online Access: | https://hdl.handle.net/10356/181153 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Nanyang Technological University |
Language: | English |
id |
sg-ntu-dr.10356-181153 |
---|---|
record_format |
dspace |
spelling |
sg-ntu-dr.10356-1811532024-11-18T00:40:45Z Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion Widawati, Elisia Brispalma Jagath C Rajapakse College of Computing and Data Science ASJagath@ntu.edu.sg Computer and Information Science Sentiment analysis Topic modelling Social media analytics This study investigates the effectiveness of various deep learning architectures and statistical models in both sentiment analysis and the temporal analysis of online public discourse through topic modelling and sentiment forecasting of tweets related to the 2024 Indonesian and U.S. elections. Given the increasing importance of social media platforms like X (Twitter) in shaping political discourse, this research aims to explore how different models perform across diverse linguistic contexts. The study employs Long Short-Term Memory (LSTM) networks, Transformer models (IndoBERTweet and BERTweet), and Large Language Models (LLM) like GPT-4o for sentiment analysis, BERTopic leveraging Transformers and LLM for topic modelling, and Seasonal AutoRegressive Integrated Moving Average (SARIMA) model for sentiment forecasting. Data was collected using the Tweet Harvest tool, focusing on tweets with specific keywords related to the elections, and analysed across different time periods to capture the evolution of public sentiment and key themes. The sentiment classification models were evaluated using accuracy, precision, recall, and F1-score metrics; the topic models were assessed for coherence and diversity; and the SARIMA models were evaluated by their fit and residual diagnostics. Results demonstrate that LLMs significantly outperform LSTM and Transformer models in sentiment classification; BERTopic successfully captures the dynamic shifts in conversations, highlighting the evolving focus on key election-related issues; and SARIMA models fairly reliably forecast sentiment trends, though they struggle with predicting extreme fluctuations. These findings underscore the importance of combining advanced LLMs and topic modelling techniques with forecasting to provide a nuanced understanding of public sentiment and discourse and inform future research and applications in these areas. Bachelor's degree 2024-11-18T00:40:45Z 2024-11-18T00:40:45Z 2024 Final Year Project (FYP) Widawati, E. B. (2024). Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion. Final Year Project (FYP), Nanyang Technological University, Singapore. https://hdl.handle.net/10356/181153 https://hdl.handle.net/10356/181153 en CCDS24-0831 application/pdf Nanyang Technological University |
institution |
Nanyang Technological University |
building |
NTU Library |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
NTU Library |
collection |
DR-NTU |
language |
English |
topic |
Computer and Information Science Sentiment analysis Topic modelling Social media analytics |
spellingShingle |
Computer and Information Science Sentiment analysis Topic modelling Social media analytics Widawati, Elisia Brispalma Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
description |
This study investigates the effectiveness of various deep learning architectures and statistical models in both sentiment analysis and the temporal analysis of online public discourse through topic modelling and sentiment forecasting of tweets related to the 2024 Indonesian and U.S. elections. Given the increasing importance of social media platforms like X (Twitter) in shaping political discourse, this research aims to explore how different models perform across diverse linguistic contexts. The study employs Long Short-Term Memory (LSTM) networks, Transformer models (IndoBERTweet and BERTweet), and Large Language Models (LLM) like GPT-4o for sentiment analysis, BERTopic leveraging Transformers and LLM for topic modelling, and Seasonal AutoRegressive Integrated Moving Average (SARIMA) model for sentiment forecasting.
Data was collected using the Tweet Harvest tool, focusing on tweets with specific keywords related to the elections, and analysed across different time periods to capture the evolution of public sentiment and key themes. The sentiment classification models were evaluated using accuracy, precision, recall, and F1-score metrics; the topic models were assessed for coherence and diversity; and the SARIMA models were evaluated by their fit and residual diagnostics.
Results demonstrate that LLMs significantly outperform LSTM and Transformer models in sentiment classification; BERTopic successfully captures the dynamic shifts in conversations, highlighting the evolving focus on key election-related issues; and SARIMA models fairly reliably forecast sentiment trends, though they struggle with predicting extreme fluctuations. These findings underscore the importance of combining advanced LLMs and topic modelling techniques with forecasting to provide a nuanced understanding of public sentiment and discourse and inform future research and applications in these areas. |
author2 |
Jagath C Rajapakse |
author_facet |
Jagath C Rajapakse Widawati, Elisia Brispalma |
format |
Final Year Project |
author |
Widawati, Elisia Brispalma |
author_sort |
Widawati, Elisia Brispalma |
title |
Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
title_short |
Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
title_full |
Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
title_fullStr |
Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
title_full_unstemmed |
Sentiment analysis and topic modelling of 2024 U.S. and Indonesian election tweets: a study of political discourse and public opinion |
title_sort |
sentiment analysis and topic modelling of 2024 u.s. and indonesian election tweets: a study of political discourse and public opinion |
publisher |
Nanyang Technological University |
publishDate |
2024 |
url |
https://hdl.handle.net/10356/181153 |
_version_ |
1816859056131801088 |