Code for "Query and Output: Generating Words by Querying Distributed Word Representations for Paraphrase Generation" (NAACL 2018)
Switch branches/tags
Nothing to show
Clone or download
Latest commit a3a8d04 Jun 3, 2018
Permalink
Failed to load latest commit information.
data first commit Feb 27, 2018
models first commit Feb 27, 2018
.gitattributes update Feb 27, 2018
README.md Update README.md Jun 2, 2018
ewsew.yaml first commit Feb 27, 2018
lcsts.yaml first commit Feb 27, 2018
optims.py first commit Feb 27, 2018
predit.py update Feb 27, 2018
preprocess.py first commit Feb 27, 2018
pwkp.yaml first commit Feb 27, 2018
train.py update Feb 27, 2018

README.md

Word Embedding Attention Network

Code for "Query and Output: Generating Words by Querying Distributed Word Representations for Paraphrase Generation" [pdf]

Requirements

  • Ubuntu 16.04
  • Python 3.5
  • Pytorch 0.2.0
  • ROUGE

Data

Run

python3 preprocess.py -train_src TRAIN_SRC_DATA -train_tgt TRAIN_TGT_DATA
		      -test_src TEST_SRC_DATA -test_tgt TEST_TGT_DATA
		      -valid_src VALID_SRC_DATA -valid_tgt VALID_TGT_DATA
		      -save_data data/lcsts/lcsts.low.share.train.pt
		      -lower -share
python3 train.py -gpus 0 -score general -config lcsts.yaml -log wean
python3 predict.py -gpus 0 -score general -config lcsts.yaml -unk -restore data/lcsts/wean/best_rouge_checkpoint.pt

Cite

To use this code, please cite the following paper:

Shuming Ma, Xu Sun, Wei Li, Sujian Li, Wenjie Li, and Xuancheng Ren. Query and Output: Generating Words by Querying Distributed Word Representations for Paraphrase Generation. In proceedings of NAACL-HLT 2018.

bibtext:

@inproceedings{wean,
  author    = {Shuming Ma and Xu Sun and Wei Li and Sujian Li and Wenjie Li and Xuancheng Ren},
  title     = {Query and Output: Generating Words by Querying Distributed Word 
	       Representations for Paraphrase Generation},
  booktitle = {{NAACL} {HLT} 2018, The 2018 Conference of the North American Chapter
	       of the Association for Computational Linguistics: Human Language Technologies},
  year      = {2018}
}