This is the code of the paper Modeling Document Causal Structure with A Hypergraph for Event Causality Identification.
A Neural Causal Hypergraph Model (NCHM) to encode both document causal structureand pairwise event semantics for the ECI task.
Illustration of our NCHM framework.
- python==3.7.13
- transformers==4.15.0
- matplotlib==3.5.3
- numpy==1.21.5
- scikit-learn==1.0.2
- scipy==1.7.3
- torch==1.11.0
- torch_scatter==2.0.9
- torch_geometric==2.1.0.post1
- tqdm==4.64.1
All training commands are listed in parameter.py. For example, you can run the following commands to train NCHM on the EventStoryLine v0.9 datasets.
# the EventStoryLine v0.9
python train.py --fold 1
python train.py --fold 2
python train.py --fold 3
python train.py --fold 4
python train.py --fold 5
We refer to the code of Hyper-Conv. Thanks for their contributions.