This is the source code of our paper "Zheng S, Xia R. Left-Center-Right Separated Neural Network for Aspect-based Sentiment Analysis with Rotatory Attention. arXiv preprint arXiv:1802.00892, 2018.". Meanwhile, we provide the codes of other papers' models which we implement by Tensorflow.
-
Effective LSTMs for Target-Dependent Sentiment Classification with Long Short Term Memory
Duyu Tang, Bing Qin, Xiaocheng Feng, Ting Liu (COLING 2016, full paper)
-
Attention-based LSTM for Aspect-level Sentiment Classification
Yequan Wang, Minlie Huang, Li Zhao, Xiaoyan Zhu (EMNLP 2016, full paper)
-
Aspect Level Sentiment Classification with Deep Memory Network
Duyu Tang, Bing Qin, Ting Liu (EMNLP 2016, full paper)
-
Gated Neural Networks for Targeted Sentiment Analysis
Meishan Zhang, Yue Zhang, Duy-Tin Vo (AAAI 2016)
-
Interactive Attention Networks for Aspect-Level Sentiment Classification
Dehong Ma, Sujian Li, Xiaodong Zhang, Houfeng Wang (IJCAI 2017, full paper)
-
Recurrent Attention Network on Memory for Aspect Sentiment Analysis
Peng Chen, Zhongqian Sun, Lidong Bing, Wei Yang (EMNLP 2017, full paper)
-
Left-Center-Right Separated Neural Network for Aspect-based Sentiment Analysis with Rotatory Attention Shiliang Zheng, Rui Xia (Our Paper)
.
├── README.md
├── model
│ ├── lstm.py Paper 1
│ ├── tc_lstm.py Paper 1
│ ├── td_lstm.py Paper 1
│ ├── at_lstm.py Paper 2
│ ├── dmn_lstm.py Paper 3
│ ├── ian.py Paper 5
│ ├── ram.py Paper 6
│ ├── lcr.py Paper 7
Usage of codes:
Usage: python model/lcr.py [options] [parameters]
Options:
--train_file_path
--test_file_path
--embedding_file_path
--learning_rate
--batch_size
--n_iter
--random_base
--l2_reg
--keep_prob1
--keep_prob2
Give the usage of lcr.py for example:
python model/lcr.py --train_file_path data/absa/laptop/laptop_2014_train.txt
--test_file_path data/absa/laptop/laptop_2014_test.txt
--embedding_file_path data/absa/laptop/laptop_word_embedding_42b.txt
--learning_rate 0.1
--batch_size 25
--n_iter 50
--random_base 0.1
--l2_reg 0.00001
--keep_prob1 0.5
--keep_prob2 0.5