Giter Club home page Giter Club logo

domain-attention's Introduction

Domain Attention

Domain Attention Model proposed in paper "Domain Attention Model for Multi-Domain Sentiment Classification" (link), which is accepted by Knowledge Based Systems.

Data

Multi-Domain Sentiment Dataset (version 2.0)

The dataset we used is unprocessed.tar.gz which contains the original data.

Train & Test

For example, you can use the following command to test the model in the MDSD dataset:

python model.py

The parameter settings are list in SharedData which is defined in model.py.

The run-log files of 3 repeated runs (using the default parameters in the scripts) can be found in /run-logs folder, which give the following accuracy results:

Domain Books DVD Electronics Kitchen
Run1 0.8762 0.8663 0.8663 0.8911
Run2 0.8861 0.8614 0.8713 0.8960
Run3 0.8960 0.8614 0.8713 0.8960

The results reported in the paper are averaged through ten runs (10-fold cross validation), which maybe slightly different from the above results.

Notice: you should first download the MDSD dataset and glove word vectors to run this code. The glove version we used is glove.6B.zip.

Code Description

  • data_helper.py data loader for the MDSD dataset
  • model.py the domain attention model, train and test
  • utils.py misc util functions

For any issues, you can contact me via [email protected]

domain-attention's People

Contributors

yuanzhigang10 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.