Giter VIP home page Giter VIP logo

dialsummar's Introduction

README

The code is a full implementation of SPNet in my paper Abstractive Dialog Summarization with Semantic Scaffolds(https://arxiv.org/abs/1910.00825), which is my first trial in independent research.

Environment

Our model is built in AllenNLP, which is an open-source NLP research library built on PyTorch. You can install it following its GitHub repo.

Data

We adapt MultiWOZ-2.0 to our abstractive dialog summarization task. We release the delexicalized data with domain annotation in ./data folder. And./reqt_dict.json is the requests in test set, used for evaluation.

Train

We use default setting of SPNet in ./models/mtModel and ./train.py, run python3 train.py to start training. Note that you may need to specify the GPU in the code. Logs and models will be saved in ./models_saved/SPNet. We also provide pretrained weights in ./models_saved/model_weights.th.

Inference

Run python3 inference.py and the predictor will generate ./predictions.txt with 1,000 lines of summaries. They are the prediction of 1,000 test samples and the reference summaries are saved in ./references.txt. Note that it will use our pre-trained model as a default choice.

Evaluate

We have two automatic evaluation metrics: ROUGE and CIC. To separate the inference and evaluation, we use file2rouge tools to measure the ROUGE scores. You can follow the instructions in files2rouge GitHub page.

CIC evaluation method is shown in ./evaluate.py.

dialsummar's People

Contributors

voidforall 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.