Sentiment Analysis to Detect Cyberbullying on Twitter

Over the last four decades, as populations around the world have expanded their use of social networks, cyberbullying incidents have likewise risen. Although social networks, including Twitter (now known as X), provide numerous benefits, such as quick communication with people both locally and globally, they also have negative consequences, the most common of which is cyberbullying. Studies show that users who have experienced cyberbullying have more negative feelings about themselves than those who have not. Thus, having technology that can effectively detect cyberbullying instances on social networks, such as Twitter, flag them and find ways to prevent them in the future is of utmost importance. This paper evaluates the available literature on utilising sentiment analysis to detect cases of cyberbullying. The research then explores sentiment analysis by constructing a machine learning model and training and testing the model using a dataset from Twitter. The algorithms used are naive Bayes, recurrent neural network (RNN) and support vector machine (SVM). These are all built on Python with the aid of existing Python libraries. The models are then evaluated to establish their performance, including the recall score, which measures false negatives. A performance comparison is carried out across the three models to find the most suitable algorithm for the task. The SVM, RNN and naive Bayes achieved accuracy scores of 91.37%, 90.59% and 83.62%, respectively. The results reveal that the SVM algorithm consistently outperformed the other two in detecting cyberbullying tweets. SVM has the potential to alter the way social media platforms and online communities moderate content, offering a strong balance of performance, speed and interpretability, making it well‐suited for real‐time cyberbullying detection on large‐scale platforms. This allows for faster intervention to safeguard users, particularly vulnerable persons, from harassment and abuse, resulting in safer digital environments and improved overall user well‐being.

Authors

Institutions

Publication Details

Journal
Human Behavior and Emerging Technologies
Published
2025-01-01
DOI
https://doi.org/10.1155/hbe2/5419912
Primary Topic
Hate Speech and Cyberbullying Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Sentiment Analysis to Detect Cyberbullying on Twitter

Ibidun Christiana Obagbuwa, Avuzwa Lerotholi
Human Behavior and Emerging Technologies
Hate Speech and Cyberbullying Detection
article

Sentiment Analysis to Detect Cyberbullying on Twitter

Ibidun Christiana Obagbuwa, Avuzwa Lerotholi
article en

Abstract

Over the last four decades, as populations around the world have expanded their use of social networks, cyberbullying incidents have likewise risen. Although social networks, including Twitter (now known as X), provide numerous benefits, such as quick communication with people both locally and globally, they also have negative consequences, the most common of which is cyberbullying. Studies show that users who have experienced cyberbullying have more negative feelings about themselves than those who have not. Thus, having technology that can effectively detect cyberbullying instances on social networks, such as Twitter, flag them and find ways to prevent them in the future is of utmost importance. This paper evaluates the available literature on utilising sentiment analysis to detect cases of cyberbullying. The research then explores sentiment analysis by constructing a machine learning model and training and testing the model using a dataset from Twitter. The algorithms used are naive Bayes, recurrent neural network (RNN) and support vector machine (SVM). These are all built on Python with the aid of existing Python libraries. The models are then evaluated to establish their performance, including the recall score, which measures false negatives. A performance comparison is carried out across the three models to find the most suitable algorithm for the task. The SVM, RNN and naive Bayes achieved accuracy scores of 91.37%, 90.59% and 83.62%, respectively. The results reveal that the SVM algorithm consistently outperformed the other two in detecting cyberbullying tweets. SVM has the potential to alter the way social media platforms and online communities moderate content, offering a strong balance of performance, speed and interpretability, making it well‐suited for real‐time cyberbullying detection on large‐scale platforms. This allows for faster intervention to safeguard users, particularly vulnerable persons, from harassment and abuse, resulting in safer digital environments and improved overall user well‐being.

Human Behavior and Emerging TechnologiesVol. 2025(1)
University of the Witwatersrand (ZA), Walter Sisulu University (ZA)
Openalex Percentile: Top 85%
Hate Speech and Cyberbullying Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.