Code Monkey home page Code Monkey logo

diversity_based_attention's Introduction

Query Based Abstractive Summarization

Overview

Implementation of diversity based attention model for query based abstractive summarization task. The implementation is adapted from the seq2seq package in Tensorflow.

The implementation is based on this work.

Diversity based attention models for Query based abstractive summarization

Preksha Nema, Mitesh M. Khapra, Anirban Laha, Balaraman Ravindran

ACL, 2017

Requirements:

Data Download and Preprocessing

* cd src/dataextraction_scripts
* The model will extract the data for the categories mentioned in file debatepedia_categories
* sh extract_data.sh

### To use the existing extracted dataset in dataset folder:
* cd src/dataextraction_scripts
* python make_folds.py ../../data <number_of_folds> <new_dir_for_10_folds> 
* By default run : python make_folds.py ../../data 10 ../../data

Get the Glove embeddings:

mkdir Embedding
cd Embedding
wget http://nlp.stanford.edu/data/glove.840B.300d.zip
unzip glove.840B.300d.zip
echo 2196017 300 > temp_metadata
cat temp_metadata glove.840B.300d.txt > embeddings
rm temp_metadata

Configuration file:

 * The hyper parameters could be changed in the config.txt file.
 * The influence of eah hyperarameter have been explained in detail in the comments in config.txt

Train the model

  sh ./train.sh config.txt

Inference:

 test.sh will refer to the config.txt to initialize the graph that will be used for creating the graph for inference.
 sh ./test.sh config.txt output/test_final_results

diversity_based_attention's People

Contributors

riseiil avatar preksha25 avatar

Watchers

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