This is the code for used in the papers A Simple and Accurate Syntax-Agnostic Neural Model for Dependency-based Semantic Role Labeling and Encoding Sentences with Graph Convolutional Networks for Semantic Role Labeling.
- python 3
- theano 0.8.2
- lasagne 0.1
To run the model the first thing to do is create a dataset and all the files needed for the evaluation.
-
Place the CoNLL-2009 dataset files with the same format as in here in data/conll2009/
-
Place the embedding file sskip.100.vectors in data/
-
Run scripts/srl_preproc.sh in order to obtain the preprocessed data you need for training and testing the model.
-
Place the development, test, and ood files in /data/conll/eval/ and rename them respectively dev-set_for_eval_gold, test-set_for_eval_gold, ood-set_for_eval_gold.
-
Place the dev, test, and ood files in /data/conll/eval/ with only the first 12 columns and as 13th column put your predicted predicate sense, and rename the files respectively dev-set_for_eval_ppred, test-set_for_eval_ppred, ood-set_for_eval_ppred
6a. To train the sintax agnostic model run scripts/train.sh
6b. To train the model with the graph convolutional network over syntax run scripts/train_gcn.sh
- To test the trained model run scripts/test.sh
The hyper-parameters on the scripts are the ones with which we obtained the best results.
For any question, send us a mail at marcheggiani [at] uva [dot] nl or anton-fr [at] yandex-team [dot] ru .