This is the implementation of Syntax-driven Approach for Semantic Role Labeling at LREC2022.
Please contact us at [email protected]
if you have any questions.
If you use or extend our work, please cite our paper at LREC2022.
@InProceedings{tian-EtAl:2022:LREC2,
author = {Tian, Yuanhe and Qin, Han and Xia, Fei and Song, Yan},
title = {Syntax-driven Approach for Semantic Role Labeling},
booktitle = {Proceedings of the Language Resources and Evaluation Conference},
month = {June},
year = {2022},
address = {Marseille, France},
pages = {7129--7139},
}
Our code works with the following environment.
python=3.7
pytorch=1.7
In our paper, we use BERT and XLNet as the encoder. We follow the instructions to convert the TensorFlow checkpoints to the PyTorch version.
Note: for XLNet, it is possible that the resulting config.json
misses the hyper-parameter n_token
. You can manually add it and set its value to 32000
(which is identical to vocab_size
).
We use CoNLL 2005 and CoNLL 2012 in our paper.
To obtain and pre-process the data, please go to data_processing
directory for more information.
All processed data will appear in data
directory.
You can find the command lines to train and test models on a small sample data in run_sample.sh
.
Here are some important parameters:
--do_train
: train the model.--do_test
: test the model.--use_bert
: use BERT as encoder.--use_xlnet
: use XLNet as encoder.--bert_model
: the directory of pre-trained BERT/XLNet model.--knowledge
: the knowledge type to be used. It should be one ofpos
,syn
, anddep
.--use_crf
: use CRF after the bi-affine attentions.--model_name
: the name of model to save.