Hate Speech Detection Using Text Mining and Machine Learning

Hate Speech Detection Using Text Mining and Machine Learning

Safae Sossi Alaoui, Yousef Farhaoui, Brahim Aksasse
Copyright: © 2022 |Pages: 20
DOI: 10.4018/IJDSST.286680
Article PDF Download
Open access articles are freely available for download

Abstract

Automatic hate speech detection on social media is becoming an outstanding concern in modern countries. Indeed, hate speech towards people brings about violent acts and social chaos; hence, law prohibits it, and it engenders moral and legal implications. It is crucial that we can precisely categorize hate speech and not hate speech automatically. This allows us to identify easily real people who represent a threat for our society. In this paper, the authors applied a complete text mining process and naïve bayes machine learning classification algorithm to two different data sets (tweets_Num1 and tweets_Num2) taken from Twitter to better classify tweets. The results obtained demonstrate that the model performed well regarding different metrics based on the confusion matrix including the accuracy metric, which achieved 87. 23% on the first dataset and 93. 06% on the second.
Article Preview
Top

1 Introduction

Recently, people communicate and discuss their opinions in digital form more and more by taking advantage of online social networks like Twitter, Facebook, and Instagram and so on. These social media have many benefits to humanity in enhancing culture diversity; otherwise, the dark side of social media causes hazardous consequences when it comes to attack others by harassing, bullying and threatening them using hateful expressions known as hate speech. Hate speech (Chetty & Alathur, 2018) can be defined as a threating and abusive language which expresses hatred against a particular group especially on the basis of race, color, religion, ethnicity and even gender.

Generally speaking, media have a significant impact on individuals’ beliefs and perceptions (Mastrorocco & Minale, 2018). Indeed, when social media have been exploited as a tool to convey hate, racist and terroristic contents, it can engender crimes and violent acts (Jendryke & McClure, 2019). For example, Chetty and Alathur (2018) emphasized the strong correlation between hate speech and terrorist activities. As a result, collaborative efforts between government, Internet service providers and online social networks will effectively define policies to combat both hate speech and terrorism.

In order to fight Cyber hate, many organizations have enforced their policies towards law, technology and education so as to prevent and reduce its negative influences (Blaya, 2019).

To handle hate speech automatically, it can be seen as a part from sentiment analysis or opinion mining (Hussein, 2018) which utilizes the natural language processing (NLP), text mining and computational algorithms to automate the identification and extraction of subjective information from text. The hate speech is a behavior built from education, TV and many other factors. It is hard to design a hate speech detector since it depends on the language of the hater. There exist three sentiment analysis techniques (Medhat et al., 2014) lexicon based method, machine learning approach, and hybrid approach. Effectively, the mechanisms of hate speech detection are part of the mentioned approaches; the lexicon-based methods tend to calculate semantic orientation of words or phrases in a text by means of a dictionary which provides words with a positive or negative sentiment value assigned to each of the words. The machine learning approaches are used to get a discriminative function that can separate hate speech from normal speech. Machine learning algorithms are programs; that considered as an evolution of the regular algorithms, which can automatically learn from data and improve from experience, without human intervention. In our case, the hate speech detection can be seen as a supervised learning problem where both the inputs and outputs are already known, which means that the data used to train the algorithm is already labeled with correct answers in order to generate reasonable predictions for the response to new data. Since the outputs are discrete, the classification algorithms (Sossi Alaoui et al., 2018, 2017) are used to categorize the data into specific groups or classes. Finally, the hybrid approach that combines machine learning methods with lexical-based approaches.

In this paper, we focus on machine learning approach because lexical based method tend to confuse between terms used in hate speech and offensive language and therefore it gives low precision (Davidson et al., 2017).

Complete Article List

Search this Journal:
Reset
Volume 16: 1 Issue (2024)
Volume 15: 2 Issues (2023)
Volume 14: 4 Issues (2022): 1 Released, 3 Forthcoming
Volume 13: 4 Issues (2021)
Volume 12: 4 Issues (2020)
Volume 11: 4 Issues (2019)
Volume 10: 4 Issues (2018)
Volume 9: 4 Issues (2017)
Volume 8: 4 Issues (2016)
Volume 7: 4 Issues (2015)
Volume 6: 4 Issues (2014)
Volume 5: 4 Issues (2013)
Volume 4: 4 Issues (2012)
Volume 3: 4 Issues (2011)
Volume 2: 4 Issues (2010)
Volume 1: 4 Issues (2009)
View Complete Journal Contents Listing