This is a PyTorch implementation of the PG-GSQL in our COLING 2020 paper "PG-GSQL: Pointer-Generator Network with Guide Decoding for Cross-Domain Context-Dependent Text-to-SQL Generation".
You can refer to requirements.txt
.
You need download the pretrained BERT from here and put them in /model/bert/data/
.
- You can get dataset from
https://github.com/taoyds/sparc
and put them in the/data/
folder, then run thepython3 preprocess_data.py --dataset sparc
to preprocess the data. - You can use our preprocessed data and download the database from here.
Train sh ./run_sparc_pg_gsql.sh
Eval sh ./eva_att.sh
- You need download our trained model from here and put it in
/sparc_pg_gsql_paper_save/
. - change the
dir
inevaluate_g.py
and runsh ./eva_att.sh
. - You can get the performance on the dev set.
question matching | interaction matching | |
PG-GSQL | 53.1 | 34.7 |
https://github.com/taoyds/sparc
https://github.com/ryanzhumich/editsql
https://github.com/lil-lab/atis
@inproceedings{wang-etal-2020-pg, title = "{PG}-{GSQL}: Pointer-Generator Network with Guide Decoding for Cross-Domain Context-Dependent Text-to-{SQL} Generation", author = "Wang, Huajie and Li, Mei and Chen, Lei", booktitle = "Proceedings of the 28th International Conference on Computational Linguistics", month = dec, year = "2020", address = "Barcelona, Spain (Online)", publisher = "International Committee on Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.coling-main.33", doi = "10.18653/v1/2020.coling-main.33", pages = "370--380", }