Code for our NAACL'21 accepted paper: ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser
Python3.6
Install Python dependency via pip install -r requirements.txt
when the environment of Python and Pytorch is setup.
You could process the origin Spider Data by your own. Download and put train.json
, dev.json
and
tables.json
under ./data/
directory and follow the instruction on ./preprocess/
Run train.sh
to train ShadowGNN.
sh train.sh
Run eval.sh
to eval ShadowGNN.
sh eval.sh
You could follow the general evaluation process in Spider Page
If you use ShadowGNN, please cite the following work.
@inproceedings{chen2021shadowgnn,
title={ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser},
author={Chen, Zhi and Chen, Lu and Zhao, Yanbin and Cao, Ruisheng and Xu, Zihan and Zhu, Su and Yu, Kai},
booktitle={Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
pages={5567--5577},
year={2021}
}
We would like to thank Tao Yu and Bo Pang for running evaluations on our submitted models. We are also grateful to the flexible semantic parser TranX and IRNet for their released nl2sql decoding module.