Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
/ HAN-pytorch Public archive

(Deprecated) Hierarchical Attention Networks for Document Classification (https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf) - in Pytorch

Notifications You must be signed in to change notification settings

cedias/HAN-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Deprecated code

A faster and up to date implementation is in my other repo


HAN-pytorch

Batched implementation of Hierarchical Attention Networks for Document Classification paper

Requirements

  • Pytorch (>= 0.2)
  • Spacy (for tokenizing)
  • Gensim (for building word vectors)
  • tqdm (for fancy graphics)

Scripts:

  • prepare_data.py transforms gzip files as found on Julian McAuley Amazon product data page to lists of (user,item,review,rating) tuples and builds word vectors if --create-emb option is specified.
  • main.py trains a Hierarchical Model.
  • Data.py holds data managing objects.
  • Nets.py holds networks.
  • beer2json.py is an helper script if you happen to have the ratebeer/beeradvocate datasets.

Note:

The whole dataset is used to create word embeddings which can be an issue.

About

(Deprecated) Hierarchical Attention Networks for Document Classification (https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf) - in Pytorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages