Abstract
Xenophobia is a pressing issue in South Africa, with
frequent instances of violence against immigrants.
With the rise of social media, platforms like Twitter
reflect public sentiment on this matter. This study
examines tweets from 2017 to 2022 about xenophobia
in South Africa, using NLP, sentiment analysis,
and machine learning to understand public feelings
and predict potential xenophobic incidents. The
findings aim to help policymakers devise strategies
to enhance social cohesion and promote a more inclusive
society.