Detecting and Categorizing Islamophobic Hate Speech on Spanish Twitter/X
Discursive Patterns, Toxicity Scores, and BERT-Based Classification
DOI:
https://doi.org/10.51480/1899-5101.19.1(42).970Keywords:
Religion, islamophobia, hate speech, toxicity, stereotypesAbstract
Islamophobic hate speech on social media includes overt toxicity and contextual frames that associate Muslims with invasion, criminality, cultural threat, or racialized exclusion. This study examines 21,326 Spanish-language tweets about Islam and Muslims posted in Spain between 2010 and 2022. We combine human annotation, exploratory discursive coding, Perspective API scores, and a multilingual BERT classifier. Human coders classified 28.2% of tweets as Islamophobic hate speech. Explicit hostility was the most frequent pattern, followed by invasion, cultural threat, criminality, race/ethnicity, and socioeconomic burden. Although hate-labeled tweets received significantly higher toxicity-related scores than non-hate tweets, many remained below a 0.70 high-probability threshold. The BERT classifier achieved 0.89 accuracy, 0.97 precision, 0.85 recall, and 0.91 F1 for the hate class. The findings show that generic toxicity measures capture overt aggression more effectively than contextual hostility, supporting target-specific, context-sensitive detection.
References
Alcántara‑Plá, M., & Ruiz‑Sánchez, A. (2017). The framing of Muslims on the Spanish Internet. Lodz Papers in Pragmatics, 13(2), 261–283. https://doi.org/10.1515/lpp-2017-0013
Awan, I. (2014). Islamophobia and Twitter: A typology of online hate against Muslims on social media. Policy & Internet, 6(2), 133–150. https://doi.org/10.1002/1944-2866.POI364
Awan, I., & Zempi, I. (2016). The affinity between online and offline anti-Muslim hate crime: Dynamics and impacts. Aggression and Violent Behavior, 27, 1–8. https://doi.org/10.1016/j.avb.2016.02.001
Baker, P., Gabrielatos, C., & McEnery, T. (2013). Discourse analysis and media attitudes: The representation of Islam in the British press. Cambridge University Press.
Burnap, P., & Williams, M. L. (2015). Cyber hate speech on Twitter: An application of machine classification and statistical modeling for policy and decision making. Policy & Internet, 7(2), 223–242. https://doi.org/10.1002/poi3.85
Cañete, J., Chaperon, G., Fuentes, R., Ho, J.-H., Kang, H., & Pérez, J. (2023). Spanish pre-trained BERT model and evaluation data [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2308.02976
Cockbain, E., & Tufail, W. (2020). Failing victims, fuelling hate: Challenging the harms of the “Muslim grooming gangs” narrative. Race & Class, 61(3), 3–32. https://doi.org/10.1177/0306396819895727
Comisión Islámica de España. (2022, March 14). Estudio demográfico de la población musulmana [Demographic study of the Muslim population]. https://comisionislamica.org/2022/03/14/estudio-demografico-de-la-poblacion-musulmana/
Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, E., Ott, M., Zettlemoyer, L., & Stoyanov, V. (2020). Unsupervised cross-lingual representation learning at scale. In D. Jurafsky, J. Chai, N. Schluter, & J. Tetreault (Eds.), Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 8440–8451). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.acl-main.747
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In J. Burstein, C. Doran, & T. Solorio (Eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) (pp. 4171–4186). Association for Computational Linguistics. https://doi.org/10.18653/v1/N19-1423
Elahi, F., & Khan, O. (Eds.). (2017). Islamophobia: Still a challenge for us all. Runnymede Trust.
Evolvi, G. (2018). Hate in a tweet: Exploring internet-based Islamophobic discourses. Religions, 9(10), Article 307. https://doi.org/10.3390/rel9100307
Fortuna, P., & Nunes, S. (2018). A survey on automatic detection of hate speech in text. ACM Computing Surveys, 51(4), Article 85. https://doi.org/10.1145/3232676
Fuentes‑Lara, C., & Arcila‑Calderón, C. A. (2023). El discurso de odio islamófobo en las redes sociales: Un análisis de las actitudes ante la islamofobia en Twitter [Islamophobic hate speech on social media: An analysis of attitudes toward Islamophobia on Twitter]. Revista Mediterránea de Comunicación, 14(1), 225–240. https://doi.org/10.14198/MEDCOM.23044
García Sanjuán, A. (2017). La persistencia del discurso nacionalcatólico sobre el medievo peninsular en la historiografía española actual [The persistence of National‑Catholic discourse on medieval Iberia in current Spanish historiography]. Historiografías, (12), 132–153. https://doi.org/10.26754/ojs_historiografias/hrht.2016122367
García Sanjuán, A. (2020). Weaponizing historical knowledge: The notion of Reconquista in Spanish nationalism. Imago Temporis: Medium Aevum, 14, 133–162. https://doi.org/10.21001/itma.2020.14.04
Gómez Godino, D. (2021). Islamofobia: La construcción social de un prejuicio y su abordaje educativo. Revisión teórico-crítica y estado de la cuestión [Islamophobia: The social construction of prejudice and its educational approach: A theoretical-critical review and state of affairs]. RES: Revista de Educación Social, (32), 307–327. https://eduso.net/res/revista/32/miscelanea/islamofobia-la-construccion-social-de-un-prejuicio-y-su-abordaje-educativo-revision-teorico-critica-y-estado-de-la-cuestion
González‑Baquero, W., Amores, J. J., & Arcila‑Calderón, C. A. (2023). The conversation around Islam on Twitter: Topic modeling and sentiment analysis of tweets about the Muslim community in Spain since 2015. Religions, 14(6), Article 724. https://doi.org/10.3390/rel14060724
Gorman, C. S., & Culcasi, K. (2021). Invasion and colonization: Islamophobia and anti-refugee sentiment in West Virginia. Environment and Planning C: Politics and Space, 39(1), 168–183. https://doi.org/10.1177/2399654420943897
Gualda, E., & Rebollo, C. (2020). Big data y Twitter para el estudio de procesos migratorios: Métodos, técnicas de investigación y software [Big data and Twitter for the study of migration processes: Methods, research techniques, and software]. EMPIRIA: Revista de Metodología de Ciencias Sociales, (46), 147–177. https://doi.org/10.5944/empiria.46.2020.26970
Hopkins, P. (2016). Gendering Islamophobia, racism and White supremacy: Gendered violence against those who look Muslim. Dialogues in Human Geography, 6(2), 186–189. https://doi.org/10.1177/2043820616655010
Jigsaw. (n.d.). Perspective API. https://perspectiveapi.com/
Krippendorff, K. (2018). Content analysis: An introduction to its methodology (4th ed.). SAGE.
Lees, A., Tran, V. Q., Tay, Y., Sorensen, J., Gupta, J., Metzler, D., & Vasserman, L. (2022). A new generation of Perspective API: Efficient multilingual character-level transformers [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2202.11176
Meer, N. (2013). Racialization and religion: Race, culture and difference in the study of antisemitism and Islamophobia. Ethnic and Racial Studies, 36(3), 385–398. https://doi.org/10.1080/01419870.2013.734392
Meer, N., & Modood, T. (2009). Refutations of racism in the “Muslim question.” Patterns of Prejudice, 43(3–4), 335–354. https://doi.org/10.1080/00313220903109250
Mozafari, M., Farahbakhsh, R., & Crespi, N. (2020). Hate speech detection and racial bias mitigation in social media based on BERT model. PLOS ONE, 15(8), Article e0237861. https://doi.org/10.1371/journal.pone.0237861
Observatorio Andalusí. (2023). Estudio demográfico de la población musulmana: Explotación estadística del censo de ciudadanos musulmanes en España referido a fecha 31/12/2022 [Demographic study of the Muslim population: Statistical analysis of the census of Muslim citizens in Spain as of December 31, 2022]. Unión de Comunidades Islámicas de España. https://ucide.org/wp-content/uploads/2023/03/estademograf22.pdf
Perry, B. (2014). Gendered Islamophobia: Hate crime against Muslim women. Social Identities, 20(1), 74–89. https://doi.org/10.1080/13504630.2013.864467
Ríos Saloma, M. F. (2008). La Reconquista: Génesis de un mito historiográfico [The Reconquista: Genesis of a historiographical myth]. Historia y Grafía, (30), 191–216.
Saeed, T. (2016). Islamophobia and securitization: Religion, ethnicity and the female voice. Palgrave Macmillan. https://doi.org/10.1007/978-3-319-32664-6
Schmidt, A., & Wiegand, M. (2017). A survey on hate speech detection using natural language processing. In L.-W. Ku & C.-T. Li (Eds.), Proceedings of the Fifth International Workshop on Natural Language Processing for Social Media (pp. 1–10). Association for Computational Linguistics. https://doi.org/10.18653/v1/W17-1101
Taras, R. (2013). “Islamophobia never stands still”: Race, religion, and culture. Ethnic and Racial Studies, 36(3), 417–433. https://doi.org/10.1080/01419870.2013.734388
Vidgen, B., & Yasseri, T. (2020). Detecting weak and strong Islamophobic hate speech on social media. Journal of Information Technology & Politics, 17(1), 66–78. https://doi.org/10.1080/19331681.2019.1702607
Wulczyn, E., Thain, N., & Dixon, L. (2017). Ex machina: Personal attacks seen at scale. In R. Barrett, R. Cummings, E. Agichtein, & E. Gabrilovich (Eds.), Proceedings of the 26th International Conference on World Wide Web (pp. 1391–1399). Association for Computing Machinery. https://doi.org/10.1145/3038912.3052591
Zamora Medina, R., Garrido Clemente, P., & Sánchez Martínez, J. (2021). Análisis del discurso de odio sobre la islamofobia en Twitter y su repercusión social en el caso de la campaña “Quítale las etiquetas al velo” [Analysis of hate speech involving Islamophobia on Twitter and its social repercussion in the case of the campaign “Remove the labels from the veil”]. Anàlisi: Quaderns de Comunicació i Cultura, (65), 1–19. https://doi.org/10.5565/rev/analisi.3383
Zempi, I., & Awan, I. (Eds.). (2019). The Routledge international handbook of Islamophobia. Routledge.
Zempi, I., & Chakraborti, N. (2012). The veil under attack: Gendered dimensions of Islamophobic victimization. International Review of Victimology, 18(3), 269–284. https://doi.org/10.1177/0269758012446983
Zempi, I., & Chakraborti, N. (2015). Islamophobia, victimisation and the veil. Palgrave Macmillan. https://doi.org/10.1057/9781137356154
Downloads
Published
How to Cite
Issue
Section
Categories
License
Copyright (c) 2026 Polish Communication Association

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.