TensorFlow implementation of Tang et al.'s EMNLP 2016 work.
Given a sentence and an aspect occurring in the sentence, this task aims at inferring the sentiment polarity (e.g. positive, negative, neutral) of the aspect.
For example, in sentence ''great food but the service was dreadful!'', the sentiment polarity of aspect ''food'' is positive while the polarity of aspect ''service'' is negative.
Install this quick GLOVE embeddings loading tool
Runs on python3 and tensorflow 1.4.1
Train a model with 3 hops on the Restaurant dataset.
python main.py --show True
Achieved accuracy of 72% for Laptop and 79% for Restaurant.
- More than 80% of the code is borrowed from ganeshjawahar.
- Using this code means you have read and accepted the copyrights set by the dataset providers.
Tian Tian
MIT