ramsleeb narutoelbruto commited on
Commit
815f3f8
·
0 Parent(s):

Duplicate from s-nlp/paradetox

Browse files

Co-authored-by: naruto bruto <narutoelbruto@users.noreply.huggingface.co>

Files changed (4) hide show
  1. .gitattributes +37 -0
  2. README.md +110 -0
  3. generation_pipeline_blue-1.png +0 -0
  4. train.tsv +0 -0
.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ftz filter=lfs diff=lfs merge=lfs -text
6
+ *.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.h5 filter=lfs diff=lfs merge=lfs -text
8
+ *.joblib filter=lfs diff=lfs merge=lfs -text
9
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
+ *.model filter=lfs diff=lfs merge=lfs -text
11
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
12
+ *.onnx filter=lfs diff=lfs merge=lfs -text
13
+ *.ot filter=lfs diff=lfs merge=lfs -text
14
+ *.parquet filter=lfs diff=lfs merge=lfs -text
15
+ *.pb filter=lfs diff=lfs merge=lfs -text
16
+ *.pt filter=lfs diff=lfs merge=lfs -text
17
+ *.pth filter=lfs diff=lfs merge=lfs -text
18
+ *.rar filter=lfs diff=lfs merge=lfs -text
19
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
21
+ *.tflite filter=lfs diff=lfs merge=lfs -text
22
+ *.tgz filter=lfs diff=lfs merge=lfs -text
23
+ *.wasm filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ # Audio files - uncompressed
29
+ *.pcm filter=lfs diff=lfs merge=lfs -text
30
+ *.sam filter=lfs diff=lfs merge=lfs -text
31
+ *.raw filter=lfs diff=lfs merge=lfs -text
32
+ # Audio files - compressed
33
+ *.aac filter=lfs diff=lfs merge=lfs -text
34
+ *.flac filter=lfs diff=lfs merge=lfs -text
35
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
36
+ *.ogg filter=lfs diff=lfs merge=lfs -text
37
+ *.wav filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - detoxification
9
+ size_categories:
10
+ - 10K<n<100K
11
+ ---
12
+
13
+ # ParaDetox: Text Detoxification with Parallel Data (English)
14
+
15
+ This repository contains information about ParaDetox dataset -- the first parallel corpus for the detoxification task -- as well as models and evaluation methodology for the detoxification of English texts. The original paper ["ParaDetox: Detoxification with Parallel Data"](https://aclanthology.org/2022.acl-long.469/) was presented at ACL 2022 main conference.
16
+
17
+ 📰 **Updates**
18
+
19
+ **[2025] !!!NOW OPEN!!! TextDetox CLEF2025 shared task: for even more -- 15 languages!** [website](https://pan.webis.de/clef25/pan25-web/text-detoxification.html) 🤗[Starter Kit](https://huggingface.co/collections/textdetox/)
20
+
21
+ **[2025] COLNG2025**: Daryna Dementieva, Nikolay Babakov, Amit Ronen, Abinew Ali Ayele, Naquee Rizwan, Florian Schneider, Xintong Wang, Seid Muhie Yimam, Daniil Alekhseevich Moskovskiy, Elisei Stakovskii, Eran Kaufman, Ashraf Elnagar, Animesh Mukherjee, and Alexander Panchenko. 2025. ***Multilingual and Explainable Text Detoxification with Parallel Corpora***. In Proceedings of the 31st International Conference on Computational Linguistics, pages 7998–8025, Abu Dhabi, UAE. Association for Computational Linguistics. [pdf](https://aclanthology.org/2025.coling-main.535/)
22
+
23
+ **[2024]** We have also created versions of ParaDetox in more languages. You can checkout a [RuParaDetox](https://huggingface.co/datasets/s-nlp/ru_paradetox) dataset as well as a [Multilingual TextDetox](https://huggingface.co/textdetox) project that includes 9 languages.
24
+
25
+ Corresponding papers:
26
+ * [MultiParaDetox: Extending Text Detoxification with Parallel Data to New Languages](https://aclanthology.org/2024.naacl-short.12/) (NAACL 2024)
27
+ * [Overview of the multilingual text detoxification task at pan 2024](https://ceur-ws.org/Vol-3740/paper-223.pdf) (CLEF Shared Task 2024)
28
+
29
+ ## ParaDetox Collection Pipeline
30
+
31
+ <img alt="Collection Pipeline" src="generation_pipeline_blue-1.png">
32
+
33
+ The ParaDetox Dataset collection was done via [Toloka.ai](https://toloka.ai) crowdsource platform. The collection was done in three steps:
34
+ * *Task 1:* **Generation of Paraphrases**: The first crowdsourcing task asks users to eliminate toxicity in a given sentence while keeping the content.
35
+ * *Task 2:* **Content Preservation Check**: We show users the generated paraphrases along with their original variants and ask them to indicate if they have close meanings.
36
+ * *Task 3:* **Toxicity Check**: Finally, we check if the workers succeeded in removing toxicity.
37
+
38
+ All these steps were done to ensure high quality of the data and make the process of collection automated. For more details please refer to the original paper.
39
+
40
+ ## ParaDetox Dataset
41
+ As a result, we get paraphrases for 11,939 toxic sentences (on average 1.66 paraphrases per sentence), 19,766 paraphrases total.
42
+
43
+ In addition to all ParaDetox dataset, we also make public [samples](https://huggingface.co/datasets/s-nlp/en_non_detoxified) that were marked by annotators as "cannot rewrite" in *Task 1* of crowdsource pipeline.
44
+
45
+ # Detoxification evaluation
46
+
47
+ The automatic evaluation of the model were produced based on three parameters:
48
+ * *style transfer accuracy* (**STA**): percentage of nontoxic outputs identified by a style classifier. We pretrained [toxicity classifier](https://huggingface.co/s-nlp/roberta_toxicity_classifier) on Jigsaw data and put it online in HuggingFace🤗 [repo](https://huggingface.co/s-nlp/roberta_toxicity_classifier).
49
+ * *content preservation* (**SIM**): cosine similarity between the embeddings of the original text and the output computed with the model of [Wieting et al. (2019)](https://aclanthology.org/P19-1427/).
50
+ * *fluency* (**FL**): percentage of fluent sentences identified by a RoBERTa-based classifier of linguistic acceptability trained on the [CoLA dataset](https://nyu-mll.github.io/CoLA/).
51
+
52
+ All code used for our experiments to evluate different detoxifcation models can be run via Colab notebook [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1xTqbx7IPF8bVL2bDCfQSDarA43mIPefE?usp=sharing)
53
+
54
+ ## Detoxification model
55
+ The first *seq2seq* SOTA for the text detoxification task in English -- BART (base) model trained on ParaDetox dataset -- we release online in HuggingFace🤗 [repo](https://huggingface.co/s-nlp/bart-base-detox).
56
+
57
+ You can also check out our [web-demo](https://detoxifier.nlp.zhores.net/junction/).
58
+
59
+ ## Citation
60
+
61
+ ```
62
+ @inproceedings{logacheva-etal-2022-paradetox,
63
+ title = "{P}ara{D}etox: Detoxification with Parallel Data",
64
+ author = "Logacheva, Varvara and
65
+ Dementieva, Daryna and
66
+ Ustyantsev, Sergey and
67
+ Moskovskiy, Daniil and
68
+ Dale, David and
69
+ Krotova, Irina and
70
+ Semenov, Nikita and
71
+ Panchenko, Alexander",
72
+ booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
73
+ month = may,
74
+ year = "2022",
75
+ address = "Dublin, Ireland",
76
+ publisher = "Association for Computational Linguistics",
77
+ url = "https://aclanthology.org/2022.acl-long.469",
78
+ pages = "6804--6818",
79
+ abstract = "We present a novel pipeline for the collection of parallel data for the detoxification task. We collect non-toxic paraphrases for over 10,000 English toxic sentences. We also show that this pipeline can be used to distill a large existing corpus of paraphrases to get toxic-neutral sentence pairs. We release two parallel corpora which can be used for the training of detoxification models. To the best of our knowledge, these are the first parallel datasets for this task.We describe our pipeline in detail to make it fast to set up for a new language or domain, thus contributing to faster and easier development of new parallel resources.We train several detoxification models on the collected data and compare them with several baselines and state-of-the-art unsupervised approaches. We conduct both automatic and manual evaluations. All models trained on parallel data outperform the state-of-the-art unsupervised models by a large margin. This suggests that our novel datasets can boost the performance of detoxification systems.",
80
+ }
81
+ ```
82
+ and
83
+ ```
84
+ @inproceedings{dementieva2021crowdsourcing,
85
+ title = "Crowdsourcing of Parallel Corpora: the Case of Style Transfer for Detoxification",
86
+ author = {Dementieva, Daryna
87
+ and Ustyantsev, Sergey
88
+ and Dale, David
89
+ and Kozlova, Olga
90
+ and Semenov, Nikita
91
+ and Panchenko, Alexander
92
+ and Logacheva, Varvara},
93
+ booktitle = "Proceedings of the 2nd Crowd Science Workshop: Trust, Ethics, and Excellence in Crowdsourced Data Management at Scale co-located with 47th International Conference on Very Large Data Bases (VLDB 2021 (https://vldb.org/2021/))",
94
+ year = "2021",
95
+ address = "Copenhagen, Denmark",
96
+ publisher = "CEUR Workshop Proceedings",
97
+ pages = "35--49",
98
+ url={http://ceur-ws.org/Vol-2932/paper2.pdf}
99
+ }
100
+ ```
101
+
102
+ ## Contacts
103
+
104
+ If you find some issue, do not hesitate to add it to [Github Issues](https://github.com/s-nlp/paradetox/issues).
105
+
106
+ For any questions and get the TEST SET, please, contact: Daryna Dementieva (dardem96@gmail.com), Daniil Moskovskiy (Daniil.Moskovskiy@skoltech.ru), or Alexander Panchenko (a.panchenko@skol.tech)
107
+
108
+ **Dataset Card and Paper corresponding contact**:
109
+
110
+ [Daryna Dementieva](https://huggingface.co/dardem)
generation_pipeline_blue-1.png ADDED
train.tsv ADDED
The diff for this file is too large to render. See raw diff