KirillKrasikov / Attention-And-Capsule-Based-Aspect-Extraction

Based on ABAE [implementation](https://github.com/alexeyev/abae-pytorch) by [Anton Alekseev](https://github.com/alexeyev), but attention mechanism replaced by a capsule network cell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TopicModelingWithCapsNet

Based on Attention Based Aspect Extraction implementation by Anton Alekseev.

Include

  • Attention-Based Aspect Extraction model (ABAE) described in paper ‘‘An unsupervised neural attention model for aspect extraction’’. (pdf)

  • Capsule-Based Aspect Extraction model (CBAE) in which the attention mechanism is replaced by a capsule network with dynamic routing. Alt text

Data

You can find the pre-processed datasets and the pre-trained word embeddings in [Download]. The zip file should be decompressed and put in the main folder.

Requirements

  • python 3.8
  • nvidia GPU with cuda capability 3.5 and 6gb memory size

Get started

$ pip install -r requirements.txt
$ jupyter notebook

Cite

If you use the code, please consider citing original paper:

@InProceedings{he-EtAl:2017:Long2,
  author    = {He, Ruidan  and  Lee, Wee Sun  and  Ng, Hwee Tou  and  Dahlmeier, Daniel},
  title     = {An Unsupervised Neural Attention Model for Aspect Extraction},
  booktitle = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  month     = {July},
  year      = {2017},
  address   = {Vancouver, Canada},
  publisher = {Association for Computational Linguistics}
}

About

Based on ABAE [implementation](https://github.com/alexeyev/abae-pytorch) by [Anton Alekseev](https://github.com/alexeyev), but attention mechanism replaced by a capsule network cell

License:MIT License


Languages

Language:Jupyter Notebook 84.9%Language:TeX 15.1%