Skip to content

Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks. Knowledge-Based Systems (KBS)

Notifications You must be signed in to change notification settings

SenticNet/Sentic-GCN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Sentic GCN

Introduction

This repository was used in our paper:

Aspect-Based Sentiment Analysis via Affective Knowledge Enhanced Graph Convolutional Networks
Bin Liang, Hang Su, Lin Gui, Erik Cambria, Ruifeng Xu. Knowledge-Based Systems, 2021: 107643.

Please cite our paper and kindly give a star for this repository if you use this code.

Requirements

  • Python 3.6
  • PyTorch 1.0.0
  • SpaCy 2.0.18
  • numpy 1.15.4

Usage

pip install spacy

and

python -m spacy download en
  • Generate dependency graph with
python generate_dependency_graph.py
  • Generate sentic graph with
python generate_sentic_graph.py

Training

  • Train with command, optional arguments could be found in train.py & train_bert.py

  • Run senticgcn: ./run_senticgcn.sh

  • Run senticgcn_bert: ./run_senticgcn_bert.sh

Citation

The BibTex of the citation is as follow:

@article{liang2021aspect,
  title={Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks},
  author={Liang, Bin and Su, Hang and Gui, Lin and Cambria, Erik and Xu, Ruifeng},
  journal={Knowledge-Based Systems},
  pages={107643},
  year={2021},
  publisher={Elsevier}
}

Credits

  • The affective knowledge used in this work is from SenticNet, I would like to express my heartfelt thanks to all the authors of SenticNet.
  • The code of this repository partly relies on ASGCN & ABSA-PyTorch.
  • Here, I would like to express my gratitude to the authors of the ASGCN & ABSA-PyTorch repositories.

About

Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks. Knowledge-Based Systems (KBS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%