Genaug:鉴定文本生成器的数据增强
Genaug的代码,在Genaug中介绍:EMNLP 2020 DEELIO研讨会上发布的Finetuning Text Generator的数据增强。您可以如下引用:
@inproceedings{feng-etal-2020-genaug,
title = "{G}en{A}ug: Data Augmentation for Finetuning Text Generators",
author = "Feng, Steven Y. and Gangal, Varun and Kang, Dongyeop and Mitamura, Teruko and Hovy, Eduard",
booktitle = "Proceedings of Deep Learning Inside Out (DeeLIO): The First Workshop on Knowledge Extraction and Integration for Deep Learning Architectures",
month = nov, year = "2020", address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.deelio-1.4",
doi = "10.18653/v1/2020.deelio-1.4", pages = "29--42",
}
作者:史蒂文·Y.
谈话可以在这里找到。幻灯片和其他资源可以在这里找到。
注意:询问应引导到[email protected]或在此处打开问题。

需要资源
- Stanford Pos Tagger:https://nlp.stanford.edu/software/stanford-postagger-2018-10-16.zip
- Stanford Corenlp:http://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip
预审计/捕获模型(在Yelp上):
- BERT情感回归器(在YLR评论中进行了列表的填充):https://drive.google.com/drive/folders/1jt07zpxmmo9my5hh3mvjf8vmalzuuugf?usp = sharing
- GPT-2(对200万Yelp评论进行了填充 - 用于困惑和SLOR评估):https://drive.google.com/drive/folders/1j3jcw-qtdwxcyzv7lonljkvjzpxifs2h?usp = sharing
- smerti-transformer(在YLR的子集上进行培训):https://drive.google.com/drive/folders/1a-jynp5so4lmv3ztgkmwqmwqmwq7be8coftf_b?usp = sharing
数据
- “ stopwords.txt”包含使用的停车列表。
- “ yelp_train.txt”,“ yelp_val.txt”和“ yelp_test.txt”包含YLR的整个培训,验证和测试示例(既提示和延续部分)。
- “ yelp_train_0.5.txt”和“ yelp_test_0.5.txt”包含YLR的培训和测试示例的上半年版本(仅提示部分)。
- “ smerti_chosen_res.txt”包含选择的150个名词作为Smerti推断的替代实体。
- “ smerti_train.csv”和“ smerti_val.csv”分别包含smerti-transformer的训练和验证分割。
代码
- “ Augmentation_Methods”文件夹包含各种Genaug增强方法的代码(不包括Smerti)。
- “评估”文件夹包含评估的代码。具体来说,“ get_unigram_distribution.py”用于rare_words(rwords)度量,“ evaluate_combined.py”包含用于sbleu,utr,utr,ttr和rwords的代码。 “情感”子文件夹包含情感一致性评估的代码[稍后更多详细信息]。
- “ Finetuning_and_generation”文件夹包含用于Finetuning GPT-2型号的脚本和代码,并从GPT-2模型中生成输出。将两个.sh脚本运行到Finetune并生成。
- “ processing_and_setup”文件夹包含用于处理和设置实验所需的数据的代码。 “ Continuation_PostProcessor.py”清洁GPT-2输出(例如剥离尾随感叹号),genaug_finetuning_setup.ipynb“包含代码来设置GPT-2 finetuning的最终增强数据“ genaug_yelp_dataset_processing.ipynb”包含用于处理和设置Yelp评论YLR的数据的代码,以及200万个评论和SLOR评估的评论子集。
Smerti扩展方法代码
Smerti增强方法的代码可以在此存储库的“ Genaug Smerti-Transformer”文件夹中找到。这是“ Smerti for Smertantic Text Exchange”的官方回购,并在保持冷静和开启中介绍!在EMNLP-IJCNLP 2019上发布的语义文本交换中保留情感和流利度。
注意:所有代码的更多详细信息和示例命令将在以后添加。