The dependency packages can be installed with the command:
pip install -r requirements.txt
-
Download the dataset (It is recommended to skip this step and proceed directly to Step[2] and Step[3])
EventStoryLine
Causal-TimeBank -
Download the data utilized by the authors of the paper
All data, Please contact with writer;
- Extract and overwrite
Step[1] - Extract the folder and copy the dataset to the datasets folder.
Step[2] - Extract the folder to the project directory, overwriting the existing datasets folder.
- Prepare data
Extract data from the ESL dataset: In the preprocessor.py file located at.\datasets\preprocessor.py
, setdataset = 'ESL'
.(Default)
Extract data from the Causal-TB dataset: In the preprocessor.py file located at.\datasets\preprocessor.py
, setdataset = 'Causal-TB'
.
and run:
python datasets/preprocessor/preprocessor.py
- Train model:
sh ESL_bash.sh
or Select training dataset: In the datasets.py file located at .\data_modules\datasets.py
, change "ESL" to "Causal-TB" in line 143.
sh CausalTB_bash.sh
Part of our code is borrowed from code, many thanks.