clairett / Deep-Memory-Network

Implement deep memory network used for Aspect Level Sentiment Classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aspect Level Sentiment Classification with Deep Memory Network

TensorFlow implementation of Tang et al.'s EMNLP 2016 work.

Problem Statement

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.

Example

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.

Quick Start

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

Performance

Achieved accuracy of 72% for Laptop and 79% for Restaurant.

Acknowledgements

  • 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.

Author

Tian Tian

Licence

MIT

About

Implement deep memory network used for Aspect Level Sentiment Classification


Languages

Language:Python 100.0%