GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yzhangcs/crfsrl: [COLING'22] Code for "Semantic Role Labeling as Dependency Parsing: Exploring Latent Tree Structures Inside Arguments".

BranchesTags
Open more actions menu

Latest commit

 

History

87 Commits
87 Commits

Folders and files

NameName
Last commit message
Last commit date
3rdparty
3rdparty
 
 
configs
configs
 
 
crfsrl
crfsrl
 
 
scripts
scripts
 
 
.flake8
.flake8
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
crf.py
crf.py
 
 
crf2o.py
crf2o.py
 
 
finetuning.sh
finetuning.sh
 
 
finetuning2o.sh
finetuning2o.sh
 
 
supar
supar
 
 

Repository files navigation

Semantic Role Labeling as Dependency Parsing: Exploring Latent Tree Structures Inside Arguments

Yu Zhang1  Qingrong Xia1,2  Shilin Zhou1  Yong Jiang3  Guohong Fu1  Min Zhang1 
1Soochow University, Suzhou, China
2Huawei Cloud, China
3DAMO Academy, Alibaba Group, China

conf arxiv citation python

image

Citation

If you are interested in our work, please cite

@inproceedings{zhang-etal-2022-semantic,
  title     = {Semantic Role Labeling as Dependency Parsing: Exploring Latent Tree Structures inside Arguments},
  author    = {Zhang, Yu  and
               Xia, Qingrong  and
               Zhou, Shilin  and
               Jiang, Yong  and
               Fu, Guohong  and
               Zhang, Min},
  booktitle = {Proceedings of COLING},
  year      = {2022},
  url       = {https://aclanthology.org/2022.coling-1.370},
  address   = {Gyeongju, Republic of Korea},
  publisher = {International Committee on Computational Linguistics},
  pages     = {4212--4227}
}

Setup

The following packages should be installed:

  • PyTorch: >= 1.12.1
  • Transformers: >= 4.2

Clone this repo recursively:

git clone https://github.com/yzhangcs/crfsrl.git --recursive

Run the following scripts to obtain the training data. Please make sure PTB and OntoNotes are available:

bash scripts/conll05.sh PTB=<path-to-ptb>             SRL=data
bash scripts/conll12.sh ONTONOTES=<path-to-ontonotes> SRL=data

Run

Try the following commands to train first-order CRF and second-order CRF2o models:

# LSTM
# CRF
python -u crf.py   train -b -c configs/conll05.crf.srl.lstm.char-lemma.ini   -d 0 -f char lemma -p exp/conll05.crf.srl.lstm.char-lemma/model   --cache --binarize
# CRF2o
python -u crf2o.py train -b -c configs/conll05.crf2o.srl.lstm.char-lemma.ini -d 0 -f char lemma -p exp/conll05.crf2o.srl.lstm.char-lemma/model --cache --binarize
# BERT finetuning
# CRF
python -u crf.py   train -b -c configs/conll05.crf.srl.bert.ini   -d 0 -p exp/conll05.crf.srl.bert/model   --batch-size=2000 --encoder bert --bert bert-large-cased --cache --binarize
# CRF2o
python -u crf2o.py train -b -c configs/conll05.crf2o.srl.bert.ini -d 0 -p exp/conll05.crf2o.srl.bert/model --batch-size=2000 --encoder bert --bert bert-large-cased --cache --binarize

To do evaluation:

# end-to-end
python -u crf.py   evaluate -c configs/conll05.crf.srl.bert.ini   -d 0 -p exp/conll05.crf.srl.bert/model
# w/ gold predicates
python -u crf.py   evaluate -c configs/conll05.crf.srl.bert.ini   -d 0 -p exp/conll05.crf.srl.bert/model --prd

To make predictions:

python -u crf.py   predict  -c configs/conll05.crf.srl.bert.ini   -d 0 -p exp/conll05.crf.srl.bert/model
bash scripts/eval.sh pred=pred.conllu gold=data/conll05/test.conllu

Contact

If you have any questions, feel free to contact me via emails.

About

[COLING'22] Code for "Semantic Role Labeling as Dependency Parsing: Exploring Latent Tree Structures Inside Arguments".

aclanthology.org/2022.coling-1.370/

Topics

coling2022semantic-role-labelingspan-basedtreecrf

Resources

Readme
MIT license
Activity

Stars

61 stars

Watchers

3 watching

Forks

7 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.