Skip to content
/ SRL-MM Public

This is the implementation of Syntax-driven Approach for Semantic Role Labeling at LREC2022.

Notifications You must be signed in to change notification settings

synlp/SRL-MM

Repository files navigation

SRL-MM

This is the implementation of Syntax-driven Approach for Semantic Role Labeling at LREC2022.

Please contact us at yhtian@uw.edu if you have any questions.

Citation

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},
}

Requirements

Our code works with the following environment.

  • python=3.7
  • pytorch=1.7

Downloading BERT and XLNet

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).

Datasets

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.

Train and Test the model

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 of pos, syn, and dep.
  • --use_crf: use CRF after the bi-affine attentions.
  • --model_name: the name of model to save.

About

This is the implementation of Syntax-driven Approach for Semantic Role Labeling at LREC2022.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published