cedias / NSCUPA-pytorch

(Deprecated) Pytorch implementation of Neural Sentiment Classification with User & Product Attention

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Deprecated code

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


NSCUPA-pytorch

a Pytorch implementation of Neural Sentiment Classification with User & Product Attention paper:

Requirements

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

Scripts:

  • minimal_ex(_cuda).sh quick start scripts that does everything and starts learning (just chmod +x them).
  • 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) Pytorch implementation of Neural Sentiment Classification with User & Product Attention


Languages

Language:Python 98.0%Language:Shell 2.0%