Skip to content
A two-stage RST discourse parser
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
data final version Apr 3, 2017
src remove pyc files and fix the paper link. Mar 18, 2019
LICENSE Create LICENSE Dec 6, 2017 remove pyc files and fix the paper link. Mar 18, 2019
requirements.txt final version Apr 3, 2017

Two-stage Discourse Parser

Here we implement the RST discourse parser described in A Two-stage Parsing Method for Text-level Discourse Analysis.

The best-trained models are put in the data/model folder. Due to the licence of RST data corpus, we can't include the data in our project folder. To reproduce the result in the paper, you need to download it from the LDC, preprocess the data as we state below and evaluate the model with python3 --eval --eval_dir EVAL_DIR.


  1. Preprocess the data:

    This project relies on Stanford CoreNLP toolkit to preprocess the data. You can download from here and put the file into the CoreNLP folder. Then use the following command to preprocess both the data in train_dir and in test_dir.

    python3 [-h] --data_dir DATA_DIR --corenlp_dir CORENLP_DIR
  2. Extract feature templates, action maps and relation maps:

    python3 --prepare --train_dir TRAIN_DIR --eval_dir EVAL_DIR
  3. Train model:

    python3 --train --train_dir TRAIN_DIR
  4. Evaluate model:

    python3 --eval --eval_dir EVAL_DIR


All the codes are tested under Python 3.5. And see requirements.txt for python library dependency and you can install them with pip.

You can’t perform that action at this time.