https://github.com/scofield7419/lagcn-srl
Codes for the AAAI 2021 paper: Encoder-Decoder Based Unified Semantic Role Labeling with Label-Aware Syntax
https://github.com/scofield7419/lagcn-srl
nlp srl syntax
Last synced: 12 months ago
JSON representation
Codes for the AAAI 2021 paper: Encoder-Decoder Based Unified Semantic Role Labeling with Label-Aware Syntax
- Host: GitHub
- URL: https://github.com/scofield7419/lagcn-srl
- Owner: scofield7419
- License: gpl-3.0
- Created: 2023-06-11T12:57:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-11T13:47:51.000Z (about 3 years ago)
- Last Synced: 2025-04-22T22:54:04.032Z (over 1 year ago)
- Topics: nlp, srl, syntax
- Language: Python
- Homepage:
- Size: 150 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LAGCN SRL Pointer
This repository includes the code of the Semantic Role Labeling (SRL) Parser with label-aware graph convolutional network (LAGCN) based pointer networks
of the AAAI 2021 paper: [Encoder-Decoder Based Unified Semantic Role Labeling with Label-Aware Syntax](https://ojs.aaai.org/index.php/AAAI/article/view/17514).
-------------------
# Requirement Install
```bash
pip install -r requirements.txt
```
# Datasets
### Two popular dependency-based SRL datasets.
Download them and put at `./data` folds.
- [CoNLL09](https://ufal.mff.cuni.cz/conll2009-st/train-dev-data.html)
- [UPB](https://universalpropositions.github.io/)
### Syntax annotation parsing
To prepare the syntactic dependency features, deploy the CoreNLP:
```bash
wget https://nlp.stanford.edu/software/stanford-corenlp-latest.zip
nohup java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 8083 -timeout 15000 > 1.log 2>&1 &
```
See the example data in [./data/demo](data%2Fdemo).
# Experiments
Step 1. To train the parser, you need to include the pre-trained word embeddings in the ``embs`` folder and run the following script:
```bash
./scripts/run_parser.sh
```
To evaluate the best trained model on the test set, just use the official script to compute the F1 scores:
```bash
./scripts/eval.sh
```
# Citation
```
@inproceedings{FeiGraphSynAAAI21,
author = {Hao Fei and Fei Li and Bobo Li and Donghong Ji},
title = {Encoder-Decoder Based Unified Semantic Role Labeling with Label-Aware Syntax},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
pages = {12794--12802},
year = {2021},
}
```
# License
The code is released under Apache License 2.0 for Noncommercial use only.