This is the code for paper:
Deep Enhanced Representation for Implicit Discourse Relation Recognition
Hongxiao Bai, Hai Zhao (COLING 2018)
We use the processed data from https://github.com/cgpotts/pdtb2.
Edit the paths of pre-trained word embedding file and ELMo files in
Then prepare the data:
For training and evaluating:
python main.py func splitting
func can be
splitting is 1 or 2 or 3,
1 for PDTB-Lin 11-way classification, 2 for PDTB-Ji 11-way classification and 3 for 4-way classification.
python main.py train 1
means training for PDTB-Lin 11-way classification.
python main.py eval 2
means evaluating with pre-trained parameters for PDTB-Ji 11-way classification.
The pre-trained parameter weights can be downloaded at
Unzip it and put the
weights directory to
The results are higher than the reported results in the paper since the reported results are averaged.
python == 3.6.4 nltk == 3.2.5 numpy == 1.14.2 gensim == 3.1.0 scikit-learn == 0.19.1 pytorch == 0.3.1 allennlp == 0.4.1 tensorboardX == 1.0