This repository contains data and code for the AAAI 2024 paper: Harnessing Holistic Discourse Features and Triadic Interaction for Sentiment Quadruple Extraction in Dialogues
To clone the repository, please run the following command:
git clone https://github.com/whulacc/h2dt
In this paper, we propose a new model, named H2DT, to extract Target-Aspect-Opinion-Sentiment quadruples from the given dialogue. More details about the task can be found in our paper.
This project uses PyTorch for its implementation. Please ensure your system includes the following package versions:
- Python: 3.7+
- PyTorch: 1.13.1+
Additional required packages can be installed via pip:
pip install -r requirements.txt
You should install dgl with the following command:
pip install dgl -f https://data.dgl.ai/wheels/cu117/repo.html
Run the following script to train and evaluate:
bash scripts/train_zh.sh
Run the following script to train and evaluate:
bash scripts/train_en.sh
Below is a table detailing the GPU memory requirements based on dataset and batch size:
Dataset | Batch Size | GPU Memory Required |
---|---|---|
Chinese | 2 | 20GB |
English | 1 | 20GB |
Hyperparameter settings are flexible and can be adjusted within either main.py
or src/config.yaml
. Note that configurations in main.py
will override any settings in src/config.yaml
.
If you would like to cite our work, please use the following format:
@inproceedings{lih2dt-aaai-24,
author = {Bobo Li and Hao Fei and Lizi Liao and Yu Zhao and Fangfang Su and Fei Li and Donghong Ji},
title = {Harnessing Holistic Discourse Features and Triadic Interaction for
Sentiment Quadruple Extraction in Dialogues},
booktitle = {AAAI},
pages = {18462--18470},
year = {2024},
}