sexism

BERTweet for sexism detection

This is a fine-tuned BERTweet large (BERTweet: A pre-trained language model for English Tweets) model for detecting sexism. The training dataset is new balanced version of Explainable Detection of Online Sexism (EDOS)--sexism-socialmedia-balanced--consisting of 16000 entries in English gathered from social media platforms: Twitter and Gab. It achieved a Macro-F1 score of 0.85 and an Accuracy of 0.88 on the test set for the EDOS task.

How to use

from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained('tum-nlp/bertweet-sexism')
model = AutoModelForSequenceClassification.from_pretrained('tum-nlp/bertweet-sexism')

# Create the pipeline for classification
sexism_classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)

# Predict
sexism_classifier("Girls like attention and they get desperate")

Licensing Information

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0