Coder Social home page Coder Social logo

chz816 / pointer-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abisee/pointer-generator

0.0 1.0 0.0 88 KB

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

License: Other

Python 99.36% Shell 0.64%
nlp summarization tensorflow

pointer-generator's Introduction

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

pointer-generator's People

Contributors

abisee avatar chz816 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.