Code Monkey home page Code Monkey logo

mpad's Introduction

Message Passing Attention Networks for Document Understanding

Code for the paper Message Passing Attention Networks for Document Understanding.

Requirements

Code is written in Python 3.6 and requires:

  • PyTorch 1.1
  • gensim 3.8
  • scikit-learn 0.21

Word embeddings

Download and unzip the pre-trained word2vec vectors from the following link: https://code.google.com/p/word2vec/

Run the model

For the simple model, run:

python mpad/main.py --path-to-embeddings path

where path points to the word2vec binary file (i.e., GoogleNews-vectors-negative300.bin file).

For the hierarchical models, run:

python hierarchical_mpad/main.py --path-to-embeddings path --graph-of-sentences type

where type can take the values 'clique', 'path' or 'sentence_att', and each value corresponds to one of the three hierarchical models described in the paper.

Cite

Please cite our paper if you use this code:

@inproceedings{nikolentzos2020message,
  title={Message Passing Attention Networks for Document Understanding},
  author={Nikolentzos, Giannis and Tixier, Antoine Jean-Pierre and Vazirgiannis, Michalis},
  booktitle={Proceedings of the 34th AAAI Conference on Artificial Intelligence},
  year={2020}
}

Provided for academic use only

mpad's People

Contributors

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