/ConstructingNEEG_IJCAI_2018

Code for the script event prediction task in the EMNLP 2019 paper: Event Representation Learning Enhanced with External Commonsense Knowledge.

Primary LanguagePython

Script Event Prediction with Commonsense Event Representation

This repository contains code for the script event predition task in the EMNLP 2019 paper: Event Representation Learning Enhanced with External Commonsense Knowledge.

This work is based on the IJCAI 2018 paper: Constructing Narrative Event Evolutionary Graph for Script Event Prediction. We substitute the original event representation model in this work with our model.

To run this code, you need to download files described here first.

Then, run the following scripts to construct the dataset for training our event representation model:

  • preproc/chains_to_dataset.py Construct dataset for training event representation model from event chains.

  • preproc/deepwalk_to_glove_format.py Convert the deepwalk embedding to glove format.

You can download the preprocessed dataset here and the converted embeddings here.

Pretrain the event representation model on the constructed dataset with the converted embeddings. (See this repository)

Finally, run code/main_with_args.py to load the pretraiend event representation model and train the SGNN model.

Our best model (including SGNN) can be downloaded here.