Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.34 KB

README.md

File metadata and controls

40 lines (33 loc) · 1.34 KB

Dialog-HGAT

This repository contains the Pytorch implementation of Dialogue Relation Extraction with Document-level Heterogeneous Graph Attention Networks.

Setup

Download GloVe vectors from here 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
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
  1. Install PytorchLightning github
  2. Install from requirements.txt by pip install -r requirements.txt and run python -m spacy download en_core_web_sm

Run code

Training

python main.py

Testing

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={arXiv preprint arXiv:2009.05092},
  year={2020}
}