This repository contains the data and scripts used for refined causality extraction from text.
The data directory contains the CausalSense datasets used in our experiments.
In this directory, it is contained the pipeline, the API and the demo. Please refer to the README inside the folder.
The end_to_end_models directory includes models used for training, specifically:
- REBEL
- RoBERTa_end_to_end
-
REBEL:
-
Train the REBEL model using:
python end_to_end_models/REBEL/train.py
-
Transform data into the format required for REBEL-based event relation extraction (ERE) using:
python end_to_end_models/REBEL/Data_transform.py
Ensure to adjust the script as needed for your dataset.
-
-
RoBERTa_end_to_end:
-
Train the RoBERTa model for end-to-end event relation extraction using:
python end_to_end_models/RoBERTa_end_to_end/end_to_end_train.py
-
For training each subtask in refined causality extraction, use the following scripts:
-
Relation Detection:
python separate_tasks/Relation_detection.py
-
Relation Classification:
python separate_tasks/relation_classification.py
-
Event Extraction:
python separate_tasks/EE.py