Giter Club home page Giter Club logo

srl-mm's Introduction

SRL-MM

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.

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.

srl-mm's People

Contributors

yuanhetian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.