Skip to main content

Research Repository

Advanced Search

Monitoring Users’ Behavior: Anti-Immigration Speech Detection on Twitter

Pitropakis, Nikolaos; Kokot, Kamil; Gkatzia, Dimitra; Ludwiniak, Robert; Mylonas, Alexios; Kandias, Miltiadis


Kamil Kokot

Alexios Mylonas

Miltiadis Kandias


The proliferation of social media platforms changed the way people interact online. However, engagement with social media comes with a price, the users’ privacy. Breaches of users’ privacy, such as the Cambridge Analytica scandal, can reveal how the users’ data can be weaponized in political campaigns, which many times trigger hate speech and anti-immigration views. Hate speech detection is a challenging task due to the different sources of hate that can have an impact on the language used, as well as the lack of relevant annotated data. To tackle this, we collected and manually annotated an immigration-related dataset of publicly available Tweets in UK, US, and Canadian English. In an empirical study, we explored anti-immigration speech detection utilizing various language features (word n-grams, character n-grams) and measured their impact on a number of trained classifiers. Our work demonstrates that using word n-grams results in higher precision, recall, and f-score as compared to character n-grams. Finally, we discuss the implications of these results for future work on hate-speech detection and social media data analysis in general.


Pitropakis, N., Kokot, K., Gkatzia, D., Ludwiniak, R., Mylonas, A., & Kandias, M. (2020). Monitoring Users’ Behavior: Anti-Immigration Speech Detection on Twitter. Machine Learning and Knowledge Extraction, 2(3), 192-215.

Journal Article Type Article
Acceptance Date Jul 30, 2020
Online Publication Date Aug 3, 2020
Publication Date Aug 3, 2020
Deposit Date Aug 10, 2020
Publicly Available Date Aug 10, 2020
Journal Machine Learning and Knowledge Extraction
Print ISSN 2504-4990
Publisher MDPI
Peer Reviewed Peer Reviewed
Volume 2
Issue 3
Pages 192-215
Keywords social media; twitter; privacy; behavior tracking; NLP
Public URL


(1.1 Mb)

Publisher Licence URL

Copyright Statement
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

You might also like

Downloadable Citations