ABSA-PyTorch
Aspect Based Sentiment Analysis, PyTorch Implementations.
基于方面的情感分析,使用PyTorch实现。
Requirement
- PyTorch 0.4.0
- NumPy 1.13.3
- tensorboardX 1.2
- Python 3.6
- GloVe pre-trained word vectors (See
data_utils.py
for more detail)- Download pre-trained word vectors here,
- extract the glove.twitter.27B.zip and glove.42B.300d.zip to the root directory
Usage
Training
python train.py --model_name ian --dataset twitter --logdir ian_logs
See the training process (needs to install TensorFlow)
tensorboard --logdir=./ian_logs
Implemented models
cabasc.py))
Cabasc (Qiao Liu, Haibin Zhang, Yifu Zeng, Ziqi Huang, and Zufeng Wu. 2018. Content Attention Model for Aspect Based Sentiment Analysis. In Proceedings of the 2018 World Wide Web Conference (WWW '18). International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva, Switzerland, 1023-1032.[pdf]
ram.py)
RAM (Chen, Peng, et al. "Recurrent Attention Network on Memory for Aspect Sentiment Analysis." Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. 2017. [pdf]
memnet.py)
MemNet (Tang, Duyu, B. Qin, and T. Liu. "Aspect Level Sentiment Classification with Deep Memory Network." Conference on Empirical Methods in Natural Language Processing 2016:214-224. [pdf]
ian.py)
IAN (Ma, Dehong, et al. "Interactive Attention Networks for Aspect-Level Sentiment Classification." arXiv preprint arXiv:1709.00893 (2017). [pdf]
td_lstm.py)
TD-LSTM (Tang, Duyu, et al. "Effective LSTMs for Target-Dependent Sentiment Classification." Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers. 2016. [pdf]
lstm.py)
LSTM (Reviews / Surveys
Zhang, Lei, Shuai Wang, and Bing Liu. "Deep Learning for Sentiment Analysis: A Survey." arXiv preprint arXiv:1801.07883 (2018). [pdf]
Young, Tom, et al. "Recent trends in deep learning based natural language processing." arXiv preprint arXiv:1708.02709 (2017). [pdf]
Contributions
Feel free to contribute!
You can raise an issue or submit a pull request, whichever is more convenient for you.
Licence
MIT License