DuSQL: A Large-Scale and Pragmatic Chinese Text-to-SQL Dataset
29943Authors
nan
Abstract
AbstractDue to the lack of labeled data, previous research on text-to-SQL parsing mainly focuses on English. Representative English datasets include ATIS, WikiSQL, Spider, etc. This paper presents DuSQL, a larges-scale and pragmatic Chinese dataset for the cross-domain text-to-SQL task, containing 200 databases, 813 tables, and 23,797 question/SQL pairs. Our new dataset has three major characteristics. First, by manually analyzing questions from several representative applications, we try to figure out the true distribution of SQL queries in real-life needs. Second, DuSQL contains a considerable proportion of SQL queries involving row or column calculations, motivated by our analysis on the SQL query distributions. Finally, we adopt an effective data construction framework via human-computer collaboration. The basic idea is automatically generating SQL queries based on the SQL grammar and constrained by the given database. This paper describes in detail the construction process and data statistics of DuSQL. Moreover, we present and compare performance of several open-source text-to-SQL parsers with minor modification to accommodate Chinese, including a simple yet effective extension to IRNet for handling calculation SQL queries.
Keywords
Full Content
Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 6923–6935, November 16–20, 2020. c⃝2020 Association for Computational Linguistics 6923 DuSQL: A Large-Scale and Pragmatic Chinese Text-to-SQL Dataset Lijie Wang1, Ao Zhang1, Kun Wu2, Ke Sun1, Zhenghua Li2, Hua Wu1, Min Zhang2, Haifeng Wang1 1. Baidu Inc, Beijing, China 2. Institute of Artificial Intelligence, School of Computer Science and Technology, Soochow University, Suzhou, China {wanglijie,zhangao,sunke,wu_hua,wanghaifeng}@baidu.com kwu@stu.suda.edu.cn; {zhli13,minzhang}@suda.edu.cn Abstract Due to the lack of labeled data, previous re- search on text-to-SQL parsing mainly focuses on English. Representative English datasets in- clude ATIS, WikiSQL, Spider, etc. This paper presents DuSQL, a larges-scale and pragmatic Chinese dataset for the cross-domain text-to- SQL task, containing 200 databases, 813 ta- bles, and 23,797 question/SQL pairs. Our new dataset has three major characteristics. First, by manually analyzing questions from several representative applications, we try to figure out the true distribution of SQL queries in real-life needs. Second, DuSQL contains a consider- able proportion of SQL queries involving row or column calculations, motivated by our analy- sis on the SQL query distributions. Finally, we adopt an effective data construction framework via human-computer collaboration. The basic idea is automatically generating SQL queries based on the SQL grammar and constrained by the given database. This paper describes in detail the construction process and data statis- tics of DuSQL. Moreover, we present and com- pare performance of several open-source text- to-SQL parsers with minor modification to ac- commodate Chinese, including a simple yet ef- fective extension to IRNet for handling calcula- tion SQL queries. 1 Introduction In the past few decades, a large amount of research has focused on searching answers from unstruc- tured texts given natural questions, which is also known as the question answering (QA) task (Burke et al., 1997; Kwok et al., 2001; Allam and Hag- gag, 2012; Nguyen et al., 2016). However, a lot of high-quality knowledge or data are actually stored in databases in the real world. It is thus extremely useful to allow ordinary users to directly inter- act with databases via natural questions. To meet this need, researchers have proposed the text-to- SQL task with released English datasets for model Figure 1: Illustration of the text-to-SQL task. training and evaluation, such as ATIS (Iyer et al., 2017), GeoQuery (Popescu et al., 2003), WikiSQL (Zhong et al., 2017), and Spider (Yu et al., 2018b). Formally, given a natural language (NL) ques- tion and a relational database, the text-to-SQL task aims to produce a legal and executable SQL query that leads directly to the correct answer, as depicted in Figure 1. A database is composed of multiple tables and denoted as DB = {T1, T2, ..., Tn}. A ta- ble is composed of multiple columns and denoted as Ti = {col1, col2, ..., colm}. Tables are usually linked with each other by foreign keys. The earliest datasets include ATIS (Iyer et al., 2017) , GeoQuery (Popescu et al., 2003), Restau- rants (Tang and Mooney, 2001), Academic (Li and Jagadish, 2014), etc. Each …
Content truncated to 500 words
Labeled Text
AbstractDue to the lack of labeled data, previous research on text-to-SQL parsing mainly focuses on English. Representative English datasets include ATIS, WikiSQL, Spider, etc. This paper presents DuSQL, a larges-scale and pragmatic Chinese dataset for the cross-domain text-to-SQL task, containing 200 databases, 813 tables, and 23,797 question/SQL pairs. Our new dataset has three major characteristics. First, by manually analyzing questions from several representative applications, we try to figure out the true distribution of SQL queries in real-life needs. Second, DuSQL contains a considerable proportion of SQL queries involving row or column calculations, motivated by our analysis on the SQL query distributions. Finally, we adopt an effective data construction framework via human-computer collaboration. The basic idea is automatically generating SQL queries based on the SQL grammar and constrained by the given database. This paper describes in detail the construction process and data statistics of DuSQL. Moreover, we present and compare performance of several open-source text-to-SQL parsers with minor modification to accommodate Chinese, including a simple yet effective extension to IRNet for handling calculation SQL queries.
Publication Details
- Paper ID:
- 29943
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan