Coder Social home page Coder Social logo

graphaugmentedsum's Introduction

Knowledge Graph-Augmented Abstractive Summarization with Semantic-Driven Cloze Reward

Code for ACL2020 paper: Knowledge Graph-Augmented Abstractive Summarization with Semantic-Driven Cloze Reward

We are not allowed to share data/outputs on New York Times Dataset. If you need data/outputs on New York Times Dataset, please email me with your license and we're glad to share our processed data/outputs on NYT dataset for research purpose.

My permenant email address: [email protected]

How to train our model

I. our processed data with constructed graphs can be found here:

https://drive.google.com/open?id=1ccja3oyWIJIm91EiG-NJPFNb4Eg1pOmO

our processed cloze questions can be found here:

https://drive.google.com/open?id=16aPmfT9Gurjhg1uLeVAUTL7fTc6TO42W

our best model can be found here:

https://drive.google.com/open?id=19HeT3rr2mzvEx82arrvpSVOBM_JNeRzo

our trained cloze model can be found here:

https://drive.google.com/open?id=1SxIitGBuPmOfKPHQ21LIX_OJ1RUpHpsk

our best system results/reference can be found here:

https://drive.google.com/open?id=1SRLCVb-YtCzL5NgI76CXby_Oc_MczYjk
https://drive.google.com/open?id=1uXn-dyN4KH4LYzKsCDCVnvRDbbR-lAAV

II. To train our best model:

  1. specify data path
    export DATA=[path/to/decompressed/data]

  2. train our model with ML objective

python train_abstractor.py --batch 32 --max_input 512 --bert --docgraph(--paragraph for SegGraph extension) --path [path/to/ml/model]
  1. train our model with our cloze reward
python train_abstractor_rl.py --abs_dir [path/to/ml/model] --docgraph(--paragraph for SegGraph extension) --batch 32 --max_art 512 --reward_model_dir [/path/to/cloze/model] --reward_data_dir [/path/to/cloze/data/questions] --path [/path/to/best/model]
  1. decode
python decode_abs.py --abs_dir [/path/to/best/model] --test --reverse --docgraph(--paragraph)  --gpu_id 0 --path [/path/to/results]
  1. evaluate ROUGE
export ROUGE=[/path/to/ROUGE 1.5.5]
python evaluate_full_model.py --decode_dir [/path/to/results] --rouge
  1. evaluate QA
python eval_cloze_model.py --system_path [/path/to/results] --data_path [/path/to/cloze/data/questions]  --model_dir [/path/to/cloze/model]

III. To train our multiple choice QA model

python train_roberta_multiple_choice.py --path [/path/to/cloze/data/training] --save_path [/path/to/cloze/model]

Dependencies

graphaugmentedsum's People

Contributors

luyang-huang96 avatar huangluyang001 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.