Downloads · 30 days
8
2% of all-time downloads
maiurilorenzo/misogyny-detection-it
misogyny-detection-it is a text classification model from maiurilorenzo. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
This model is a fine-tuned version of dbmdz/bert-base-italian-xxl-uncased for the task of misogyny detection in Italian text. It identifies whether a given text contains misogynistic content (label 1) or not (label 0)…
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
326
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors443 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of dbmdz/bert-base-italian-xxl-uncased for the task of misogyny detection in Italian text. It identifies whether a given text contains misogynistic content (label 1) or not (label 0). The model has been trained and evaluated on the AMI (Automatic Misogyny Identification) dataset.
it)This model is specifically designed for detecting misogynistic content in Italian, making it useful for tasks in moderation, social media analysis, or sociolinguistic studies.
You can try this model interactively using the Misogyny Detection IT Space.
Simply enter a text prompt, and the model will classify it as 'Misogynistic' or 'Non-Misogynistic' along with a confidence score
This model can be used as-is for binary text classification to detect misogyny in Italian. For example:
from transformers import pipeline
classifier = pipeline("text-classification", model="maiurilorenzo/misogyny-detection-it")
output = classifier("Questo è un esempio di testo misogino.")
print(output)
The model can be fine-tuned further on related datasets for similar tasks, such as hate speech detection, sentiment analysis, or offensive language detection.
The model inherits potential biases present in the AMI dataset. It may overfit to linguistic patterns commonly associated with misogyny in the training data and fail to generalize to less explicit forms of misogyny or more nuanced cultural contexts.
Use the code below to get started with the model:
from transformers import pipeline
classifier = pipeline("text-classification", model="maiurilorenzo/misogyny-detection-it")
output = classifier("Esempio di testo italiano.")
print(output)
The model was fine-tuned using the AMI (Automatic Misogyny Identification) dataset, which contains labeled examples of misogynistic and non-misogynistic texts in Italian.
The text was tokenized using the BERT tokenizer, with a maximum sequence length of 128 tokens. Labels were mapped to the labels field as required by the Transformers library.
Total Training Time: Approximately 15 minutes Hardware Used: RTX 2060
The model was evaluated on the test split of the AMI dataset, which is balanced and contains examples of both misogynistic and non-misogynistic content.
The evaluation considers factors such as:
The following metrics were computed for evaluation:
The model achieves strong performance on explicit misogyny detection, with potential for improvement in detecting more subtle or implicit forms of misogyny.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
If you use this model, please cite it as follows:
@misc{misogyny-detection-it,
author = {Lorenzo Maiuri},
title = {Misogyny Detection in Italian},
year = {2024},
publisher = {Hugging Face Hub},
license = {CC BY-NC-SA 4.0}
}