├── .gitignore ├── README.md ├── emnlp2021 ├── data │ ├── dev │ │ ├── dev_normal │ │ └── dev_toxic │ ├── manual_markup │ │ ├── emnlp_eval_long.tsv │ │ └── emnlp_eval_mean.tsv │ ├── test │ │ ├── model_outputs │ │ │ ├── condbert.txt │ │ │ ├── paragedi_with_default_paraphraser.txt │ │ │ └── paragedi_with_mined_paraphraser.txt │ │ ├── test_10k_normal │ │ └── test_10k_toxic │ ├── train │ │ ├── train_normal │ │ └── train_toxic │ └── yelp_seniment_data │ │ ├── evaluate.sh │ │ ├── human.0 │ │ ├── human.1 │ │ ├── mask_infill.0 │ │ ├── mask_infill.1 │ │ ├── other_results │ │ ├── RetrieveOnly_Li.0 │ │ ├── RetrieveOnly_Li.1 │ │ ├── TemplateBase_Li.0 │ │ ├── TemplateBase_Li.1 │ │ ├── UnsuperMT_Zhang.0 │ │ ├── UnsuperMT_Zhang.1 │ │ ├── dual_rl.0 │ │ └── dual_rl.1 │ │ ├── reference.0 │ │ ├── reference.1 │ │ ├── results │ │ ├── condbert_tox1.5_w2_sim20.0.txt │ │ ├── condbert_tox1.5_w2_sim20.1.txt │ │ ├── condbert_tox3_w2_sim20.0.txt │ │ ├── condbert_tox3_w2_sim20.1.txt │ │ ├── gedi_coef4_batch10_rerank.0.txt │ │ └── gedi_coef4_batch10_rerank.1.txt │ │ ├── sentiment.dev.0 │ │ ├── sentiment.dev.1 │ │ ├── sentiment.test.0 │ │ ├── sentiment.test.1 │ │ ├── sentiment.train.0 │ │ ├── sentiment.train.1 │ │ ├── sst_0_07.0 │ │ ├── sst_0_07.1 │ │ ├── sst_75_07.0 │ │ └── sst_75_07.1 ├── metric │ ├── README.md │ ├── metric.py │ └── wieting_similarity │ │ ├── sim_models.py │ │ ├── sim_utils.py │ │ ├── similarity_evaluator.py │ │ ├── spm.py │ │ └── test_sim.py ├── prepare.sh └── style_transfer │ ├── condBERT │ ├── choosers.py │ ├── condbert.py │ ├── condbert_compile_vocab.ipynb │ ├── condbert_inference.ipynb │ ├── multiword │ │ ├── masked_token_predictor_bert.py │ │ └── predict_utils.py │ └── vocab │ │ ├── negative-words.txt │ │ ├── positive-words.txt │ │ ├── token_toxicities.txt │ │ ├── toxic_words.txt │ │ └── word2coef.pkl │ ├── mining_parallel_corpus │ ├── finetune_t5_on_mined.ipynb │ └── paranmt_mining.ipynb │ └── paraGeDi │ ├── gedi_adapter.py │ ├── gedi_inference.ipynb │ ├── gedi_training │ ├── gedi_training.py │ ├── modeling_gpt2.py │ └── modeling_utils.py │ └── text_processing.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/README.md -------------------------------------------------------------------------------- /emnlp2021/data/dev/dev_normal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/dev/dev_normal -------------------------------------------------------------------------------- /emnlp2021/data/dev/dev_toxic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/dev/dev_toxic -------------------------------------------------------------------------------- /emnlp2021/data/manual_markup/emnlp_eval_long.tsv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/manual_markup/emnlp_eval_long.tsv -------------------------------------------------------------------------------- /emnlp2021/data/manual_markup/emnlp_eval_mean.tsv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/manual_markup/emnlp_eval_mean.tsv -------------------------------------------------------------------------------- /emnlp2021/data/test/model_outputs/condbert.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/test/model_outputs/condbert.txt -------------------------------------------------------------------------------- /emnlp2021/data/test/model_outputs/paragedi_with_default_paraphraser.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/test/model_outputs/paragedi_with_default_paraphraser.txt -------------------------------------------------------------------------------- /emnlp2021/data/test/model_outputs/paragedi_with_mined_paraphraser.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/test/model_outputs/paragedi_with_mined_paraphraser.txt -------------------------------------------------------------------------------- /emnlp2021/data/test/test_10k_normal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/test/test_10k_normal -------------------------------------------------------------------------------- /emnlp2021/data/test/test_10k_toxic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/test/test_10k_toxic -------------------------------------------------------------------------------- /emnlp2021/data/train/train_normal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/train/train_normal -------------------------------------------------------------------------------- /emnlp2021/data/train/train_toxic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/train/train_toxic -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/evaluate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/evaluate.sh -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/human.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/human.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/human.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/human.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/mask_infill.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/mask_infill.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/mask_infill.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/mask_infill.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/RetrieveOnly_Li.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/RetrieveOnly_Li.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/RetrieveOnly_Li.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/RetrieveOnly_Li.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/TemplateBase_Li.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/TemplateBase_Li.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/TemplateBase_Li.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/TemplateBase_Li.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/UnsuperMT_Zhang.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/UnsuperMT_Zhang.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/UnsuperMT_Zhang.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/UnsuperMT_Zhang.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/dual_rl.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/dual_rl.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/other_results/dual_rl.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/other_results/dual_rl.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/reference.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/reference.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/reference.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/reference.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/condbert_tox1.5_w2_sim20.0.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/condbert_tox1.5_w2_sim20.0.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/condbert_tox1.5_w2_sim20.1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/condbert_tox1.5_w2_sim20.1.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/condbert_tox3_w2_sim20.0.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/condbert_tox3_w2_sim20.0.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/condbert_tox3_w2_sim20.1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/condbert_tox3_w2_sim20.1.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/gedi_coef4_batch10_rerank.0.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/gedi_coef4_batch10_rerank.0.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/results/gedi_coef4_batch10_rerank.1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/results/gedi_coef4_batch10_rerank.1.txt -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.dev.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.dev.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.dev.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.dev.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.test.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.test.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.test.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.test.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.train.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.train.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sentiment.train.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sentiment.train.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sst_0_07.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sst_0_07.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sst_0_07.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sst_0_07.1 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sst_75_07.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sst_75_07.0 -------------------------------------------------------------------------------- /emnlp2021/data/yelp_seniment_data/sst_75_07.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/data/yelp_seniment_data/sst_75_07.1 -------------------------------------------------------------------------------- /emnlp2021/metric/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/README.md -------------------------------------------------------------------------------- /emnlp2021/metric/metric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/metric.py -------------------------------------------------------------------------------- /emnlp2021/metric/wieting_similarity/sim_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/wieting_similarity/sim_models.py -------------------------------------------------------------------------------- /emnlp2021/metric/wieting_similarity/sim_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/wieting_similarity/sim_utils.py -------------------------------------------------------------------------------- /emnlp2021/metric/wieting_similarity/similarity_evaluator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/wieting_similarity/similarity_evaluator.py -------------------------------------------------------------------------------- /emnlp2021/metric/wieting_similarity/spm.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /emnlp2021/metric/wieting_similarity/test_sim.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/metric/wieting_similarity/test_sim.py -------------------------------------------------------------------------------- /emnlp2021/prepare.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/prepare.sh -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/choosers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/choosers.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/condbert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/condbert.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/condbert_compile_vocab.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/condbert_compile_vocab.ipynb -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/condbert_inference.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/condbert_inference.ipynb -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/multiword/masked_token_predictor_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/multiword/masked_token_predictor_bert.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/multiword/predict_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/multiword/predict_utils.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/vocab/negative-words.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/vocab/negative-words.txt -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/vocab/positive-words.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/vocab/positive-words.txt -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/vocab/token_toxicities.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/vocab/token_toxicities.txt -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/vocab/toxic_words.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/vocab/toxic_words.txt -------------------------------------------------------------------------------- /emnlp2021/style_transfer/condBERT/vocab/word2coef.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/condBERT/vocab/word2coef.pkl -------------------------------------------------------------------------------- /emnlp2021/style_transfer/mining_parallel_corpus/finetune_t5_on_mined.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/mining_parallel_corpus/finetune_t5_on_mined.ipynb -------------------------------------------------------------------------------- /emnlp2021/style_transfer/mining_parallel_corpus/paranmt_mining.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/mining_parallel_corpus/paranmt_mining.ipynb -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/gedi_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/gedi_adapter.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/gedi_inference.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/gedi_inference.ipynb -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/gedi_training/gedi_training.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/gedi_training/gedi_training.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/gedi_training/modeling_gpt2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/gedi_training/modeling_gpt2.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/gedi_training/modeling_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/gedi_training/modeling_utils.py -------------------------------------------------------------------------------- /emnlp2021/style_transfer/paraGeDi/text_processing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/emnlp2021/style_transfer/paraGeDi/text_processing.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/s-nlp/detox/HEAD/requirements.txt --------------------------------------------------------------------------------