Skip to content

yaushian/Unparalleled-Text-Summarization-using-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unparalleled Text summarization using GAN

This is the official implementation of the paper Learning to Encode Text as Human-Readable Summaries using Generative Adversarial Networks. If you use this code or our results in your research, we'd appreciate you cite our paper as following:

@article{Wang2018Summary_GAN,
  title={Learning to Encode Text as Human-Readable Summaries using Generative Adversarial Networks},
  author={Yau-Shian Wang and Hung-Yi Lee},
  journal={arXiv preprint arXiv:1810.02851},
  year={2018}
}

Dependencies

  • python3
  • 1.0 <= tensorflow < 2.0

Difference between the original paper

In this implementation, I use the GAN training method proposed by ScratchGAN for adversarial training. The performance is more robust and slightly better than original paper.

Running code:

Download English Gigaword:

Download data from Sent-Summary. Then, move downloaded "train.article.txt" and "train.title.txt" to "giga_word" directory in this repository.

Make pretraining data:

python3 make_pretrain.py

Pretraining generator:

python3 main.py -pretrain -model_dir [model_path] -num_steps 20000

Pretraining generator is required.

Unparalleled Summarization Training:

python3 main.py -train -model_dir [model_path]-num_steps 7000

The model_path should be same as the pretrained model path. The default setting can reproduce the results in the paper.

Testing:

python3 main.py -test -model_dir [model_path] -test_input [input_path] -result_path [result_path]

About

Implementation of paper "Learning to Encode Text as Human-Readable Summaries using GAN"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages