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上發布的語義文本交換中保留情感和流利度。
注意:所有代碼的更多詳細信息和示例命令將在以後添加。