项目作者: SenticNet

项目描述 :
IARM: Inter-Aspect Relation Modeling with Memory Networks in Aspect-Based Sentiment Analysis, EMNLP 2018
高级语言: Python
项目地址: git://github.com/SenticNet/IARM.git
创建时间: 2018-08-11T06:03:40Z
项目社区:https://github.com/SenticNet/IARM

开源协议:MIT License

下载


IARM

This repo contains the source code of the paper —

IARM: Inter-Aspect Relation Modeling with Memory Networks in Aspect-Based Sentiment Analysis.
Navonil Majumder, Soujanya Poria, Alexander Gelbukh, Md. Shad Akhtar, Erik Cambria, Asif Ekbal. EMNLP 2018

This method attempts to model the relationship among the different aspect-terms in a sentence using memory networks to enable better sentiment classification of the aspects.

Requirements

  • Python 2.7
  • PyTorch 0.3
  • Keras 1.0

Execution

Execute the file ABSA-emb-gpu-final-newarch3.py for training and testing on SemEval 2014 ABSA dataset.
The following are the command-line arguments:

  • --no-cuda: GPU is not used
  • --lr: set learning rate
  • --l2: set L2-norm weight
  • --batch-size: set batch size
  • --epochs: set number of epochs
  • --hops: set number hops of memory network
  • --hidden-size: set hidden representation size
  • --output-size: set output representation size
  • --dropout-p: set dropout probability
  • --dropout-lstm: set recurrent dropout probability
  • --dataset: set which dataset to use - Restaurants or Laptop

Example:

  1. python ABSA-emb-gpu-final-newarch3.py --lr 0.001 --l2 0.0001 --dataset Laptop --hops 3 --epochs 30 --hidden-size 400 --output-size 300 --dropout-p 0.1 --dropout-lstm 0.2

Citation

If you find this code useful please cite the following in your work:

  1. @InProceedings{D18-1377,
  2. author = "Majumder, Navonil
  3. and Poria, Soujanya
  4. and Gelbukh, Alexander
  5. and Akhtar, Md Shad
  6. and Cambria, Erik
  7. and Ekbal, Asif",
  8. title = "IARM: Inter-Aspect Relation Modeling with Memory Networks in Aspect-Based Sentiment Analysis",
  9. booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
  10. year = "2018",
  11. publisher = "Association for Computational Linguistics",
  12. pages = "3402--3411",
  13. location = "Brussels, Belgium",
  14. url = "http://aclweb.org/anthology/D18-1377"
  15. }

Credits

Codes were written by Soujanya Poria and Navonil Majumder