资源算法Hierarchical Attention Network for Document Classification

Hierarchical Attention Network for Document Classification

2019-09-10 | |  85 |   0 |   0

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.


上一篇:chainer-Variational-AutoEncoder

下一篇:Simple Generative Adversarial Networks

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...