GitHub - chz816/pointer-generator: Tensorflow 1.x implementation for the ACL 2017 paper "Get To The Point: Summarization with Pointer-Generator Networks" · GitHub
Skip to content

chz816/pointer-generator

 
 

Repository files navigation

Pointer Generator Networks with TensorFlow 1.x

This repo is the TensorFlow 1.x implementation for the ACL 2017 paper "Get To The Point: Summarization with Pointer-Generator Networks".

In this repo, I modify the code from @becxer and make the code executable in Python 3 + TensorFlow 1.x environment.

Local Setup

Tested with Python 3.7 via virtual environment. In this repo, we use TensorFlow 1.15.2, and it also works in other TensorFlow 1.x enviorment.

Clone the repo, go to the repo folder, setup the virtual environment, and install the required packages:

$ python3.7 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Data

According to the paper and its repo: the required data for paper is CNN/DM: you can find it here.

If you download the data by yourself, you can create a data folder inside your local folder, and put everything in data.

You can also choose to download the data by running this:

$ gdown --id 0BzQ6rtO2VN95a0c3TlZCWkl3aU0 --output data.zip
$ unzip data.zip
$ mv finished_files data

cnndm dataset is also available in tensorflow.datasets. I am going to implement this later (in progress).

Train the Model

$ chmod +x train.sh
$ ./train.sh

Evaluation - Validation Set

To run the evaluation job, you can run the model on the validation set and log the loss.

Beam Search - Find Best Model

$ chmod +x eval.sh
$ ./eval.sh

Generate

$ chmod +x decode.sh
$ ./decode.sh

About

Tensorflow 1.x implementation for the ACL 2017 paper "Get To The Point: Summarization with Pointer-Generator Networks"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • Python 99.4%
  • Shell 0.6%