keras_generative_pg
keras_generative_pg copied to clipboard
A Deep Generative Framework for Paraphrase Generation Implementaion
Paraphrase generation based on LSTM-VAE by wanzeyu
Overview
Keras implementation for A Deep Generative Framework for Paraphrase Generation.
Resource Used:
-
MSRP paraphrase corpus
-
Fasttext's pretrained vector
Requirements:
- Keras
- Numpy
In this project I try to implement novel VAE-LSTM architecture mentioned in A Deep Generative Framework for Paraphrase Generation.
QuickStart
Use python example.py. The code will train on the corpus and
print predicted result after every epoch.
By default ,the program will be in training mode and will save model to three files.
The default epoch is 200.
If you want to change the parameters. You have to change according lines.
Resource
test_source.txtis the original filetest_target.txtis the paraphrase filewiki.simple.vecis fasttext's pretrained vector on simple wiki
Model Architecture
encoder model:

decoder model:

vae overview:

Problems
- I didn't write a proper test function or use BLEU to evaluate. This has to be done after I found out what's wrong with my implementation.
Progress
- [x] Implement the basic framework of the thesis
- [ ] Write the evaluation code
- [x] Refactor and clean up the messy code