lexicon_rnn is the code for my EMNLP 2016 paper Context-Sensitive Lexicon Features for Neural Sentiment Analysis.
It contains a context-sensitive lexicon-based method based on a simple weighted-sum model, using a recurrent neural network to learn the sentiments strength, intensification and negation of lexicon sentiments in composing the sentiment value of sentences.
Using this toolkits, you probably can:
- Integrate sentiment lexicons into recurrent neural network models.
- Obtain competitive performance on standard sentiment classification benchmarks for both in-domain and cross-domain datasets. More specifically, we use the Stanford Sentiment Treebank, the SemEval 2013 Twitter sentiment classification dataset and the mixed domain dataset of product reviews (T{"a}ckstr{"o}m, Oscar and McDonald, Ryan, 2011) in our paper.
- Produce potentially interpretable sentiment composition details, such as intensification and negation.
- Use filtered embeddings and processed lexicons invovled in our paper.
The twitter dataset is available by sending an email to the first author.
Our implementation is based on clab/cnn-v1.
Please see README.md in every task directory.
We provide four preprocessed sentiment lexicons used in our paper, including TS-Lex, S140-Lex, SD-Lex and SWN-Lex.
We construct our pretrained embedding tables from glove.840B.300d.
glove.sentiment.conj.pretrained.vec and glove.semeval.conj.pretrained.vec are embedding tables for the SST and SemEval dataset, respectively.
If you found our codes and preprocessed data are useful for your research, please cite
@InProceedings{teng-vo-zhang:2016:EMNLP2016,
author = {Teng, Zhiyang and Vo, Duy Tin and Zhang, Yue},
title = {Context-Sensitive Lexicon Features for Neural Sentiment Analysis},
booktitle = {Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing},
month = {November},
year = {2016},
address = {Austin, Texas},
publisher = {Association for Computational Linguistics},
pages = {1629--1638},
url = {https://aclweb.org/anthology/D16-1169}
}