A higher-order semantic dependency parser using graph neural networks, implemented with graph convolutional networks and graph attention networks. HOSDP is a model extended biaffine parser.
We conduct experiment on SemEval 2015 Task 18 English dataset SemEval2015 Task 18.
Trial data has been provided in this repository, full dataset LDC2016T10 are available in LDC official site.
$ pip install -r requirements.txtAs a prerequisite, the following requirements should be satisfied:
python: >= 3.7pytorch: >= 1.7transformers: >= 4.0
To train a higher-order semantic dependency parser, you need to provide initial parsing result file (conll-u format),
because the initial adjacency matrix of semantic dependency graph is needed to build graph neural networks.
Put the initial result predicted by biaffine parser (or any other semantic dependency parser)
and specify the file path in hosdp.py.
Some hyperparameters is configured in the file hosdp.ini
$ python hosdp.py train -b -d 0 -p /HOSDP/output/trial/model -c /HOSDP/hosdp.iniTo evaluate trained model, you need to run the following command.
$ python hosdp.py evaluate -d 0 -p /HOSDP/output/trial/model -c /HOSDP/hosdp.iniTo write predicted result in a output file, you need to run the following command. The output file path can be specified in hosdp.py.
$ python hosdp.py test -b -d 0 -p /HOSDP/output/trial/model -c /HOSDP/hosdp.iniIf you use the code of this repository, please cite our paper:
@Article{app12084089,
AUTHOR = {Li, Bin and Fan, Yunlong and Sataer, Yikemaiti and Gao, Zhiqiang and Gui, Yaocheng},
TITLE = {Improving Semantic Dependency Parsing with Higher-Order Information Encoded by Graph Neural Networks},
JOURNAL = {Applied Sciences},
VOLUME = {12},
YEAR = {2022},
NUMBER = {8},
ARTICLE-NUMBER = {4089},
URL = {https://www.mdpi.com/2076-3417/12/8/4089},
ISSN = {2076-3417},
DOI = {10.3390/app12084089}
}