Downloads · 30 days
17
5% of all-time downloads
laihuiyuan/RPT
RPT is a machine learning model from laihuiyuan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This is an mBART-based model for responsibility perspective transfer, a novel text style transfer task of automatically rewriting gender-based violence descriptions as a means to alter the perceived level of responsib…
Downloads · 30 days
17
5% of all-time downloads
All-time downloads
369
Public
Repo size
4.9 GB
Likes
1
Public
Click a slice to open those files.
.bin2.4 GB · 100%
From the Hugging Face model README
This is an mBART-based model for responsibility perspective transfer, a novel text style transfer task of automatically rewriting gender-based violence descriptions as a means to alter the perceived level of responsibility on the perpetrator. It is introduced in the paper Responsibility Perspective Transfer for Italian Femicide News.
Different ways of linguistically expressing the same real-world event can lead to different perceptions of what happened. Previous work has shown that different descriptions of gender-based violence (GBV) influence the reader's perception of who is to blame for the violence, possibly reinforcing stereotypes which see the victim as partly responsible, too. As a contribution to raise awareness on perspective-based writing, and to facilitate access to alternative perspectives, we introduce the novel task of automatically rewriting GBV descriptions as a means to alter the perceived level of responsibility on the perpetrator. We present a quasi-parallel dataset of sentences with low and high perceived responsibility levels for the perpetrator, and experiment with unsupervised (mBART-based), zero-shot and few-shot (GPT3-based) methods for rewriting sentences. We evaluate our models using a questionnaire study and a suite of automatic metrics.
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
model = MBartForConditionalGeneration.from_pretrained("laihuiyuan/RPT")
tokenizer = MBart50TokenizerFast.from_pretrained("laihuiyuan/RPT", src_lang="it_IT")
source = "Provaglio d'Iseo , donna trovata morta in casa : si sospetta il compagno"
meta_info = "Simona Simonini, Elio Cadei, partner, percosse, Provaglio d'Iseo, c." #<victim name, perpetrator name, relationship, weapon, municipality, place>
inputs = meta_info + ' ' +source
inputs = tokenizer(inputs, return_tensors="pt")
decode_start_id =tokenizer.lang_code_to_id['it_IT']
output = model.generate(input_ids=inputs['input_ids'], num_beams=5, max_length=80, forced_bos_token_id=decode_start_id)
transferred_text = tokenizer.decode(output[0].tolist(), skip_special_tokens=True, clean_up_tokenization_spaces=False)
@inproceedings{minnemaa-etal-2023-responsibility,
title = "Responsibility Perspective Transfer for Italian Femicide News",
author = "Minnemaa, Gosse and Lai, Huiyuan and Muscato, Benedetta and Nissim, Malvina",
booktitle = "Findings of the Association for Computational Linguistics: ACL 2023",
month = July,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
}