All Projects β†’ yuanzhigang10 β†’ domain-attention

yuanzhigang10 / domain-attention

Licence: other
codes for paper "Domain Attention Model for Multi-Domain Sentiment Classification"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to domain-attention

Absa keras
Keras Implementation of Aspect based Sentiment Analysis
Stars: ✭ 126 (+472.73%)
Mutual labels:  attention-mechanism, sentiment-classification
NTUA-slp-nlp
πŸ’»Speech and Natural Language Processing (SLP & NLP) Lab Assignments for ECE NTUA
Stars: ✭ 19 (-13.64%)
Mutual labels:  attention-mechanism, sentiment-classification
Multimodal Sentiment Analysis
Attention-based multimodal fusion for sentiment analysis
Stars: ✭ 172 (+681.82%)
Mutual labels:  attention-mechanism, sentiment-classification
SentimentAnalysis
Sentiment Analysis: Deep Bi-LSTM+attention model
Stars: ✭ 32 (+45.45%)
Mutual labels:  attention-mechanism, sentiment-classification
Attention Mechanisms
Implementations for a family of attention mechanisms, suitable for all kinds of natural language processing tasks and compatible with TensorFlow 2.0 and Keras.
Stars: ✭ 203 (+822.73%)
Mutual labels:  attention-mechanism, sentiment-classification
Multi-task-Conditional-Attention-Networks
A prototype version of our submitted paper: Conversion Prediction Using Multi-task Conditional Attention Networks to Support the Creation of Effective Ad Creatives.
Stars: ✭ 21 (-4.55%)
Mutual labels:  attention-mechanism
minimal-nmt
A minimal nmt example to serve as an seq2seq+attention reference.
Stars: ✭ 36 (+63.64%)
Mutual labels:  attention-mechanism
HierarchicalAttentionNetworks
Hierarchical Attention Networks for Document Classification in Keras
Stars: ✭ 70 (+218.18%)
Mutual labels:  sentiment-classification
ACAN
Code for NAACL 2019 paper: Adversarial Category Alignment Network for Cross-domain Sentiment Classification
Stars: ✭ 23 (+4.55%)
Mutual labels:  sentiment-classification
abcnn pytorch
Implementation of ABCNN(Attention-Based Convolutional Neural Network) on Pytorch
Stars: ✭ 35 (+59.09%)
Mutual labels:  attention-mechanism
bert-movie-reviews-sentiment-classifier
Build a Movie Reviews Sentiment Classifier with Google's BERT Language Model
Stars: ✭ 12 (-45.45%)
Mutual labels:  sentiment-classification
hamnet
PyTorch implementation of AAAI 2021 paper: A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization
Stars: ✭ 30 (+36.36%)
Mutual labels:  attention-mechanism
dodrio
Exploring attention weights in transformer-based models with linguistic knowledge.
Stars: ✭ 233 (+959.09%)
Mutual labels:  attention-mechanism
extkeras
Playground for implementing custom layers and other components compatible with keras, with the purpose to learn the framework better and perhaps in future offer some utils for others.
Stars: ✭ 18 (-18.18%)
Mutual labels:  attention-mechanism
stanford-cs231n-assignments-2020
This repository contains my solutions to the assignments for Stanford's CS231n "Convolutional Neural Networks for Visual Recognition" (Spring 2020).
Stars: ✭ 84 (+281.82%)
Mutual labels:  attention-mechanism
A-Persona-Based-Neural-Conversation-Model
No description or website provided.
Stars: ✭ 22 (+0%)
Mutual labels:  attention-mechanism
long-short-transformer
Implementation of Long-Short Transformer, combining local and global inductive biases for attention over long sequences, in Pytorch
Stars: ✭ 103 (+368.18%)
Mutual labels:  attention-mechanism
datastories-semeval2017-task6
Deep-learning model presented in "DataStories at SemEval-2017 Task 6: Siamese LSTM with Attention for Humorous Text Comparison".
Stars: ✭ 20 (-9.09%)
Mutual labels:  attention-mechanism
AttentionGatedVNet3D
Attention Gated VNet3D Model for KiTS19β€”β€”2019 Kidney Tumor Segmentation Challenge
Stars: ✭ 35 (+59.09%)
Mutual labels:  attention-mechanism
LMFD-PAD
Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection
Stars: ✭ 27 (+22.73%)
Mutual labels:  attention-mechanism

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]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].