This is the repository of the factuality prediction project. This repository currently has only one folder containing code of re-implementing Rudinger et al. (2018)’s 2-layer stacked bidirectional linear LSTM model using dynet 2.0.3 instead of pytorch 0.2.0.
The folder L-biLSTM_2\
has the following files:
- Dockerfile: a docker file to install dependencies and directly run on test data with pre-trained model.
- factuality_test.py: directly run pre-trained model on test data
- factuality.py: train the model
python 3, dynet 2.0.3, numpy 1.13.3
-
Download this repository and unzip it.
-
Before running code file factuality_test.py, download data files en-ud-test.conllu (to train the model with factuality.py, also download en-ud-train.conllu and en-ud-dev.conllu) and UDS-IH2 and unzip them into the same directory where the Docker file locates.
-
Download the trained model, including trained.model and tables.txt, to the same directory.
-
Open terminal and change to the directory where all the files downloaded, then run the following script:
docker build -t luo-cs585-hw3 -f ./Dockerfile .