https://github.com/declare-lab/dialog-hgat
Dialogue Relation Extraction with Document-level Heterogeneous Graph Attention Networks
https://github.com/declare-lab/dialog-hgat
dialogue-relation-extraction graph-neural-networks relation-extraction
Last synced: about 1 year ago
JSON representation
Dialogue Relation Extraction with Document-level Heterogeneous Graph Attention Networks
- Host: GitHub
- URL: https://github.com/declare-lab/dialog-hgat
- Owner: declare-lab
- License: mit
- Created: 2020-09-14T07:50:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T23:54:06.000Z (over 3 years ago)
- Last Synced: 2025-03-27T18:21:38.980Z (about 1 year ago)
- Topics: dialogue-relation-extraction, graph-neural-networks, relation-extraction
- Language: Python
- Homepage:
- Size: 18.2 MB
- Stars: 56
- Watchers: 6
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dialog-HGAT
This repository contains the Pytorch implementation of [Dialogue Relation Extraction with Document-level Heterogeneous Graph Attention Networks](https://arxiv.org/pdf/2009.05092.pdf).
## Setup
Download GloVe vectors from [here](https://www.kaggle.com/thanakomsn/glove6b300dtxt/data) and put it into `dataset/` folder
Next Install the required libraries:
1. Assume you have installed Pytorch >= 1.5
2. Install dgl library according to your cuda version using the commands below
```sh
pip install --pre dgl-cu100 # For CUDA 10.0 Build
pip install --pre dgl-cu101 # For CUDA 10.1 Build
pip install --pre dgl-cu102 # For CUDA 10.2 Build
```
3. Install PytorchLightning [github](https://github.com/PyTorchLightning/pytorch-lightning)
4. Install from requirements.txt by `pip install -r requirements.txt` and run `python -m spacy download en_core_web_sm`
## Run code
### Training
```sh
python main.py
```
### Testing
```sh
python main.py --mode test --ckpt_path [your_ckpt_file_path]
```
## Citation
If you find the code helpful in your research, please cite:
```
@article{chen2020dialogue,
title={Dialogue relation extraction with document-level heterogeneous graph attention networks},
author={Chen, Hui and Hong, Pengfei and Han, Wei and Majumder, Navonil and Poria, Soujanya},
journal={Cognitive Computation},
year={2022}
}
```