DAGCN: Dual-channel and Aspect-aware Graph Convolutional Network for Aspect-based Sentiment Analysis in Computational Social Systems
This repository contains the code for the paper "DAGCN: Dual-channel and Aspect-aware Graph Convolutional Network for Aspect-based Sentiment Analysis in Computational Social Systems", IEEE Transactions on Computational Social Systems.
- numpy==1.23.5
- pandas==2.0.3
- torch==2.1.2+cuda
- transformers==4.42.3
To install requirements, run pip install -r requirements.txt
.
-
Prepare data
-
Restaurants, Laptop, Twitter and MAMS datasets. (We provide the parsed data at directory
dataset
) -
Downloading Glove embeddings (glove.840B.300d.zip), and put it into
glove
directory after unzipping the file. -
Downloading pretrained BERT (bert-base-uncased) and put it into
bert-base-uncased
folder.
-
-
Build vocabulary
bash build_vocab.sh
Go to Corresponding directory and run scripts:
sh run.sh
The saved model and training logs will be stored at directory results
automatically.
Database | Acc | F1 | Log |
---|---|---|---|
Res14 | 84.90 | 78.34 | log |
Laptop | 79.59 | 76.60 | log |
76.96 | 75.92 | log | |
MAMS | 81.96 | 81.09 | log |
Database | Acc | F1 | Log |
---|---|---|---|
Res14 | 87.67 | 81.56 | log |
Laptop | 81.49 | 78.45 | log |
78.14 | 77.61 | log | |
MAMS | 85.03 | 84.63 | log |
If you find this work useful, please cite as following.
@ARTICLE{10588956,
author={Wanneng Shu and Cao Zhai and Ke Yu},
journal={IEEE Transactions on Computational Social Systems},
title={DAGCN: Dual-Channel and Aspect-Aware Graph Convolutional Network for Aspect-Based Sentiment Analysis in Computational Social Systems},
year={2024},
doi={10.1109/TCSS.2024.3418472}}
The code and datasets in this repository are based on DualGCN_ABSA and R-GAT, and we thank them.