Send to

Choose Destination
Sensors (Basel). 2019 Oct 26;19(21). pii: E4654. doi: 10.3390/s19214654.

Detecting and Monitoring Hate Speech in Twitter.

Author information

Engineering School, Autonomous University of Madrid, 28049 Madrid, Spain.
UC3M-BS Institute of Financial Big Data, Charles III University of Madrid, 28903 Madrid, Spain.
School of Computer Science & Informatics, Cardiff University, Cardiff CF24 3AA, UK.
Artificial Intelligence Area Coordinator, Cabinet of the Secretary of State for Digital Advancement, 28020 Madrid, Spain.
State Secretariat for Security, Interior Ministry, 28010 Madrid, Spain.


Social Media are sensors in the real world that can be used to measure the pulse of societies. However, the massive and unfiltered feed of messages posted in social media is a phenomenon that nowadays raises social alarms, especially when these messages contain hate speech targeted to a specific individual or group. In this context, governments and non-governmental organizations (NGOs) are concerned about the possible negative impact that these messages can have on individuals or on the society. In this paper, we present HaterNet, an intelligent system currently being used by the Spanish National Office Against Hate Crimes of the Spanish State Secretariat for Security that identifies and monitors the evolution of hate speech in Twitter. The contributions of this research are many-fold: (1) It introduces the first intelligent system that monitors and visualizes, using social network analysis techniques, hate speech in Social Media. (2) It introduces a novel public dataset on hate speech in Spanish consisting of 6000 expert-labeled tweets. (3) It compares several classification approaches based on different document representation strategies and text classification models. (4) The best approach consists of a combination of a LTSM+MLP neural network that takes as input the tweet's word, emoji, and expression tokens' embeddings enriched by the tf-idf, and obtains an area under the curve (AUC) of 0.828 on our dataset, outperforming previous methods presented in the literature.


Twitter; hate crime; predictive policing; sentiment analysis; social network analysis; text classification

Free full text

Supplemental Content

Full text links

Icon for Multidisciplinary Digital Publishing Institute (MDPI)
Loading ...
Support Center