SPARQLing Database Queries from Intermediate Question Decompositions

Irina Saparina, Anton Osokin


Abstract
To translate natural language questions into executable database queries, most approaches rely on a fully annotated training set. Annotating a large dataset with queries is difficult as it requires query-language expertise. We reduce this burden using grounded in databases intermediate question representations. These representations are simpler to collect and were originally crowdsourced within the Break dataset (Wolfson et al., 2020). Our pipeline consists of two parts: a neural semantic parser that converts natural language questions into the intermediate representations and a non-trainable transpiler to the SPARQL query language (a standard language for accessing knowledge graphs and semantic web). We chose SPARQL because its queries are structurally closer to our intermediate representations (compared to SQL). We observe that the execution accuracy of queries constructed by our model on the challenging Spider dataset is comparable with the state-of-the-art text-to-SQL methods trained with annotated SQL queries. Our code and data are publicly available (https://github.com/yandex-research/sparqling-queries).
Anthology ID:
2021.emnlp-main.708
Volume:
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2021
Address:
Online and Punta Cana, Dominican Republic
Editors:
Marie-Francine Moens, Xuanjing Huang, Lucia Specia, Scott Wen-tau Yih
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
8984–8998
Language:
URL:
https://aclanthology.org/2021.emnlp-main.708
DOI:
10.18653/v1/2021.emnlp-main.708
Bibkey:
Cite (ACL):
Irina Saparina and Anton Osokin. 2021. SPARQLing Database Queries from Intermediate Question Decompositions. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 8984–8998, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Cite (Informal):
SPARQLing Database Queries from Intermediate Question Decompositions (Saparina & Osokin, EMNLP 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.emnlp-main.708.pdf
Software:
 2021.emnlp-main.708.Software.zip
Video:
 https://aclanthology.org/2021.emnlp-main.708.mp4
Code
 yandex-research/sparqling-queries
Data
BREAKSpider-Realistic