Skip to content

Code for "Global and Local Hierarchy-aware Contrastive Framework for Hierarchical Implicit Discourse Relation Recognition (ACL 2023)"

License

Notifications You must be signed in to change notification settings

YJiangcm/GOLF_for_IDRR

Repository files navigation

GOLF

Global and Local Hierarchy-aware Contrastive Framework for Hierarchical Implicit Discourse Relation Recognition (ACL 2023)

Requirements

Firstly, install PyTorch by following the instructions from the official website. To faithfully reproduce our results, please use the correct 1.10.1 version corresponding to your platforms/CUDA versions. PyTorch version higher than 1.10.1 should also work.

Secondly, install torch_geometric by following the instructions from the official website.

Then run the following script to install the remaining dependencies,

pip install -r requirements.txt

Data Preparation before Training

  1. Download the PDTB 2.0 dataset, put it under /raw/
  2. Run the following script for data preprocessing,
python3 preprocess.py

(P.S. PDTB 3.0 can be downloaded from https://catalog.ldc.upenn.edu/LDC2019T05. You can easily modify preprocess.py and adapt it to PDTB 3.0.)

Train, Evaluate, and Test

Run the following script for training, evaludating, and testing,

python3 run.py

Ciation

Please cite our paper by:

@misc{jiang2022global,
      title={Global and Local Hierarchy-aware Contrastive Framework for Implicit Discourse Relation Recognition}, 
      author={Yuxin Jiang and Linhan Zhang and Wei Wang},
      year={2022},
      eprint={2211.13873},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

About

Code for "Global and Local Hierarchy-aware Contrastive Framework for Hierarchical Implicit Discourse Relation Recognition (ACL 2023)"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages