Git Product home page Git Product logo

nats's Introduction

Distraction-Based Neural Networks for Modeling Documents

Source code for "Distraction-Based Neural Networks for Modeling Documents" runnable on GPU and CPU. If you use this code as part of any published research, please acknowledge the following paper.

"Distraction-Based Neural Networks for Modeling Documents"
Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang. IJCAI (2016)

@InProceedings{Chen-Qian:2016:IJCAI,
  author    = {Chen, Qian and Zhu, Xiaodan and Ling, Zhenhua and Wei, Si and Jiang, Hui},
  title     = {Distraction-Based Neural Networks for Modeling Documents},
  booktitle = {Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI 2015)},
  month     = {July},
  year      = {2016},
  address   = {New York, NY},
  publisher = {AAAI}
}

Homepage of the Qian Chen, http://home.ustc.edu.cn/~cq1231/

Dependencies

This code is written in python. To use it you will need:

Running the Script

Build dictionary

cd data
python build_dictionary.py toy_train_input.txt

Train model

Some important path is needed to set in train_nats.py.

  • datasets: training file of input and output
  • valid_datasets: validation file of input and output
  • dictionary: dictionary file
  • model: saved model

If you don't have cuDNN, please comment the cuDNN configuation in train.sh.

cd scripts
bash train.sh

Test model

Some variable is needed to set in test.sh.

  • KL: $\lambda_1$, the parameter of Kullback-Leibler (KL) divergence of attention weight vector
  • CTX: $\lambda_2$, the parameter of Cosine distance of content vector
  • STATE: $\lambda_3$, the parameter of Cosine distance of hidden state vector
  • ROOT: root directory of directory
  • MODEL: saved model
  • DIC: dictionary file
  • INPUT: test file of input
  • TEMP: intermediate file of generated summary in testing set
  • GEN: final file of generated summary in testing set
  • REF: test file of reference summary
cd scripts
bash test.sh

Actual Corpus Download

  • LCSTS: A Large-Scale Chinese Short Text Summarization Dataset
  • CNN/DailyMail: This repository contains a script to download CNN and Daily Mail articles from the Wayback Machine.

nats's People

Contributors

lukecq1231 avatar

Stargazers

lazy bear avatar  avatar Ramsey avatar Emily Alsentzer avatar BinaryStar avatar Gao Yichen avatar Dan Rubins avatar Emre Şafak avatar Ricky Han avatar  avatar  avatar Lili Yao avatar yuanke avatar JourneyLiu avatar Sidd avatar Chris Dongjoo Kim avatar

Watchers

James Cloos avatar  avatar  avatar paper2code - bot avatar

nats's Issues

tuning about distraction factor in decoding

Dear researchers,

It was a funny idea that this paper introduces when removing redundancy by applying distraction in decoding but Could you please clarify the part of how to set the parameter value of factor of distraction of context, attention weight and hidden_state? The paper does not mention the tuning part for this parameters. Are all lamda value positive number? or positive float number?

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.