Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Keyang Ding db5d321ab0 | 2 years ago | |
---|---|---|
.. | ||
__pycache__ | 2 years ago | |
con_datasets | 2 years ago | |
layers | 2 years ago | |
log | 2 years ago | |
models | 2 years ago | |
poster | 2 years ago | |
state_dict | 2 years ago | |
.DS_Store | 2 years ago | |
README.md | 2 years ago | |
bucket_iterator.py | 2 years ago | |
data_utils.py | 2 years ago | |
data_utils_bert.py | 2 years ago | |
generate_graph_for_aspect.py | 2 years ago | |
generate_position_con_graph.py | 2 years ago | |
run_intergcn.sh | 2 years ago | |
run_intergcn_bert.sh | 2 years ago | |
train.py | 2 years ago | |
train_bert.py | 2 years ago |
This repository was used in our paper:
Jointly Learning Aspect-Focused and Inter-Aspect Relations with Graph Convolutional Networks for Aspect Sentiment Analysis
Bin Liang, Rongdi Yin, Lin Gui*, Jiachen Du, Ruifeng Xu*. Proceedings of COLING 2020
Please cite our paper and kindly give a star for this repository if you use this code.
This code for the main model InterGCN in our paper. If you need the Model AFGCN mentioned in our paper, please download this code.
Install SpaCy package and language models with
pip install spacy
and
python -m spacy download en
python generate_graph_for_aspect.py
python generate_position_con_graph.py
Train with command, optional arguments could be found in train.py & train_bert.py
Run intergcn: ./run_intergcn.sh
Run afgcn: ./run_afgcn.sh
Run intergcn_bert: ./run_intergcn_bert.sh
Run afgcn_bert: ./run_afgcn_bert.sh
The BibTex of the citation is as follow:
@inproceedings{liang-etal-2020-jointly,
title = "Jointly Learning Aspect-Focused and Inter-Aspect Relations with Graph Convolutional Networks for Aspect Sentiment Analysis",
author = "Liang, Bin and
Yin, Rongdi and
Gui, Lin and
Du, Jiachen and
Xu, Ruifeng",
booktitle = "Proceedings of the 28th International Conference on Computational Linguistics",
month = dec,
year = "2020",
address = "Barcelona, Spain (Online)",
publisher = "International Committee on Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.coling-main.13",
pages = "150--161",
abstract = "In this paper, we explore a novel solution of constructing a heterogeneous graph for each instance by leveraging aspect-focused and inter-aspect contextual dependencies for the specific aspect and propose an Interactive Graph Convolutional Networks (InterGCN) model for aspect sentiment analysis. Specifically, an ordinary dependency graph is first constructed for each sentence over the dependency tree. Then we refine the graph by considering the syntactical dependencies between contextual words and aspect-specific words to derive the aspect-focused graph. Subsequently, the aspect-focused graph and the corresponding embedding matrix are fed into the aspect-focused GCN to capture the key aspect and contextual words. Besides, to interactively extract the inter-aspect relations for the specific aspect, an inter-aspect GCN is adopted to model the representations learned by aspect-focused GCN based on the inter-aspect graph which is constructed by the relative dependencies between the aspect words and other aspects. Hence, the model can be aware of the significant contextual and aspect words when interactively learning the sentiment features for a specific aspect. Experimental results on four benchmark datasets illustrate that our proposed model outperforms state-of-the-art methods and substantially boosts the performance in comparison with BERT.",
}
A poster of our work is as follow:
Open Source Sentiment Analysis Algorithm inlcuding Aspect-Based Sentiment Analysis (-ABSA) and Emotion Cause Extraction (-ECE).
Pickle Raw token data Text CSV Python other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》