This repository describe the process to finetune a BERT model for the detection of sexist texts within English language.
BERT was fine tuned on the following datasets:
- Samory, M., Sen, I., Kohne, J., Flöck, F., & Wagner, C. (2021, May). “Call me sexist, but...”: Revisiting sexism detection using psychological scales and adversarial samples. In Proceedings of the international AAAI conference on web and social media (Vol. 15, pp. 573-584).
- Kirk, H., Yin, W., Vidgen, B., & Röttger, P. (2023, July). SemEval-2023 task 10: Explainable detection of online sexism. In Proceedings of the 17th International Workshop on Semantic Evaluation (SemEval-2023) (pp. 2193-2210).
- EXIST: sEXism Identification in Social neTworks. Datasets from 2021, 2023 and 2024.
- Sexist Stereotype Classification. [Dataset].
- Grosz, D., & Conde-Cespedes, P. (2020, May). Automatic detection of sexist statements commonly used at the workplace. In Pacific-Asia Conference on Knowledge Discovery and Data Mining (pp. 104-115). Cham: Springer International Publishing.
- Guest, E., Vidgen, B., Mittos, A., Sastry, N., Tyson, G., & Margetts, H. (2021, April). An expert annotated dataset for the detection of online misogyny. In Proceedings of the 16th conference of the European chapter of the association for computational linguistics: main volume (pp. 1336-1350).
- Singh, A. Sexism Detection in English Texts. Uncovering Bias: A Dataset for Analyzing Sexism in Language. [Dataset].
- Toosi, A. Twitter Sentiment Analysis: Detecting hatred tweets.. [Dataset].
The work "You're not sexist.. but what you just wronte might be" has been particularly useful to develop this project.
The model is publicly available here.
This finetuned model is valuable to verify whether a text is sexist or not sexist. Its usage is limited to the english language and to its generated context. Moreover, the model is intended to analyze phrases and it is inefficient to analyze words or couple of words.
| Accuracy | Precision | Recall | F-1 score |
|---|---|---|---|
| 0.8809 | 0.8812 | 0.8810 | 0.8811 |