Skip to content

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。

License

Notifications You must be signed in to change notification settings

WilliamTambellini/ABSA-PyTorch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations.

基于方面的情感分析,使用PyTorch实现。

Packagist PRsWelcome

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)

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

Inference

Please refer to infer_example.py.

Implemented models

MGAN (mgan.py)

Fan, Feifan, et al. "Multi-grained Attention Network for Aspect-Level Sentiment Classification." Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. 2018. [pdf]

mgan

AOA (aoa.py)

Huang, Binxuan, et al. "Aspect Level Sentiment Classification with Attention-over-Attention Neural Networks." arXiv preprint arXiv:1804.06536 (2018). [pdf]

aoa

TNet (tnet_lf.py)

Li, Xin, et al. "Transformation Networks for Target-Oriented Sentiment Classification." arXiv preprint arXiv:1805.01086 (2018). [pdf]

tnet_lf

Cabasc (cabasc.py)

Liu, Qiao, et al. "Content Attention Model for Aspect Based Sentiment Analysis." Proceedings of the 2018 World Wide Web Conference on World Wide Web. International World Wide Web Conferences Steering Committee, 2018.

cabasc

RAM (ram.py)

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]

ram

MemNet (memnet.py)

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]

memnet

IAN (ian.py)

Ma, Dehong, et al. "Interactive Attention Networks for Aspect-Level Sentiment Classification." arXiv preprint arXiv:1709.00893 (2017). [pdf]

han

ATAE-LSTM (atae_lstm.py)

Wang, Yequan, Minlie Huang, and Li Zhao. "Attention-based lstm for aspect-level sentiment classification." Proceedings of the 2016 conference on empirical methods in natural language processing. 2016.

han

TD-LSTM (td_lstm.py)

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]

td-lstm

LSTM (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

About

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%