Skip to main content

Text2SQLNet: Syntax Type-Aware Tree Networks for Text-to-SQL

  • Conference paper
  • First Online:
Innovation in Information Systems and Technologies to Support Learning Research (EMENA-ISTL 2019)

Abstract

Building natural language interfaces to relational databases is an important and challenging problem in natural language processing (NLP), it requires a system that is able to understand natural language questions and generate corresponding SQL queries. In this paper, we present our idea of using type information and database content to better understand rare entities and numbers in natural language questions, in order to improve the model SyntaxSQLNet as the state of the art in Text-to-SQL task. We also present the global architecture and techniques that can be used in the implementation of our Neural Network (NN) model Text2SQLNet, with the integration of our idea that consists of using type information to better understand rare entities and numbers in natural language questions. We can also use the database content to better understand the user query if it is not well-formed. The implementation of this idea can further improve performance in the Text-to-SQL task.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 229.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 299.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 299.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://developers.google.com/freebase/.

References

  1. Hillestad, R., Bigelow, J., Bower, A., Girosi, F., Meili, R., Scoville, R., Taylor, R.: Can electronic medical record systems transform health care? Potential health benefits, savings, and costs. Health Aff. 24(5), 1103–1117 (2005)

    Article  Google Scholar 

  2. Maxwell, C.: A Treatise on Electricity and Magnetism, vol. 2, 3rd edn, pp. 68–73. Clarendon, Oxford (1892)

    Google Scholar 

  3. Beck, T., Demirgüç-Kunt, A., Levine, R.: A new database on the structure and development of the financial sector. World Bank Econ. Rev. 14(3), 597–605 (2000)

    Article  Google Scholar 

  4. Ngai, E.W.T., Xiu, L., Chau, D.C.K.: Application of data mining techniques in customer relationship management: a literature review and classification. Expert Syst. Appl. 36(2), 2592–2602 (2009)

    Article  Google Scholar 

  5. Androutsopoulos, I., Ritchie, G.D., Thanisch, P.: Natural language interfaces to databases - an introduction. Natural language engineering 1(1), 29–81 (1995)

    Article  Google Scholar 

  6. Yu, T., Yasunaga, M., Yang, K., et al.: SyntaxSQLNet: syntax tree networks for complex and cross-domaintext-to-SQL task. arXiv preprint. arXiv:1810.05237 (2015)

  7. Zelle, J.M., Mooney, R.J.: Learning to parse database queries using inductive logic programming. In: AAAI/IAAI, pp. 1050–1055, Portland, OR. AAAI Press/MIT Press, Cambridge (1996)

    Google Scholar 

  8. Zettlemoyer, L.S., Collins, M.: Learning to map sentences to logical form: structured classification with probabilistic categorial grammars. UAI (2005)

    Google Scholar 

  9. Wong, Y.W., Mooney, R.J.: Learning synchronous grammars for semantic parsing with lambda calculus. In: Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics (ACL-2007), Prague, Czech Republic (2007)

    Google Scholar 

  10. Das, D., Schneider, N., Chen, D., Smith, N.A.: Probabilistic frame-semantic parsing. In: NAACL (2010)

    Google Scholar 

  11. Liang, P., Jordan, M.I., Klein, D.: Learning dependency-based compositional semantics. In: Association for Computational Linguistics (ACL), pp. 590–599 (2011)

    Google Scholar 

  12. Banarescu, L., Bonial, C., Cai, S., et al.: Abstract meaning representation for sembanking. In: Proceedings of the 7th Linguistic Annotation Workshop and Interoperability with Discourse, pp. 178–186 (2013)

    Google Scholar 

  13. Asian Federation of Natural Language Processing, ACL, July 26–31, 2015, Beijing, China, Long Papers, vol. 1, pp. 1470–1480 (2015)

    Google Scholar 

  14. Herzig, J., Berant, J.: Decoupling structure and lexicon for zero-shot semantic parsing. In: EMNLP (2018)

    Google Scholar 

  15. Warren, D.H., Pereira, F.C.: An efficient easily adaptable system for interpreting natural language queries. Comput. Linguist. 8(3–4), 110–122 (1982)

    Google Scholar 

  16. Popescu, A.-M., Etzioni, O., Kautz, H.: Towards a theory of natural language interfaces to databases. In: Proceedings of the 8th International Conference on Intelligent User Interfaces, pp. 149–157. ACM (2003)

    Google Scholar 

  17. Li, Y., Yang, H., Jagadish, H.V.: Constructing a generic natural language interface for an XML database. In: EDBT, vol. 3896, pp. 737–754. Springer, Berlin (2006)

    Google Scholar 

  18. Giordani, A., Moschitti, A.: Translating questions to SQL queries with generative parsers discriminatively reranked. In: COLING (Posters), pp. 401–410 (2012)

    Google Scholar 

  19. Wang, C., Cheung, A., Bodik, R.: Synthesizing highly expressive SQL queries from input-output examples. In: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 452–466 (2017)

    Article  Google Scholar 

  20. Li, F., Jagadish, H.V.: Constructing an interactive natural language interface for relational databases. VLDB 8(1), 73–84 (2014)

    Google Scholar 

  21. Yaghmazadeh, N., Wang, Y., Dillig, I., Dillig, T.: SQLizer: query synthesis from natural language. Proc. ACM Program. Lang. 1(OOPSLA), 63:1–63:26 (2017)

    Article  Google Scholar 

  22. Zhong, V., Xiong, C., Socher, R.: Seq2SQL: generating structured queries from natural language using reinforcement learning. CoRR. arXiv:1709.00103 (2017)

  23. Xu, X., Liu, C., Song, D.: SQLNet: generating structured queries from natural language without reinforcement learning. arXiv preprint. arXiv:1711.04436 (2017)

  24. Gur, I., Yavuz, S., Su, Y., Yan, X.: DialSQL: dialogue based structured query generation. In: Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, vol. 1 (Long Papers), pp. 1339–1349. Association for Computational Linguistics (2018)

    Google Scholar 

  25. Dong, L., Lapata, M.: Language to logical form with neural attention. In: Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7–12, 2016, Berlin, Germany, vol. 1, Long Papers (2016)

    Google Scholar 

  26. Yin, P., Neubig, G.: A syntactic neural model for general-purpose code generation. In: ACL, no. 1, pp. 440–450. Association for Computational Linguistics (2017)

    Google Scholar 

  27. Rabinovich, M., Stern, M., Klein, D.: Abstract syntax networks for code generation and semantic parsing. In: ACL, no. 1, pp. 1139–1149. Association for Computational Linguistics (2017)

    Google Scholar 

  28. Agrawal, R., Srikant, R.: Searching with numbers. IEEE Trans. Knowl. Data Eng. 15(4), 855–870 (2003)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Youssef Mellah , El Hassane Ettifouri , Toumi Bouchentouf or Mohammed Ghaouth Belkasmi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mellah, Y., Ettifouri, E.H., Bouchentouf, T., Belkasmi, M.G. (2020). Text2SQLNet: Syntax Type-Aware Tree Networks for Text-to-SQL. In: Serrhini, M., Silva, C., Aljahdali, S. (eds) Innovation in Information Systems and Technologies to Support Learning Research. EMENA-ISTL 2019. Learning and Analytics in Intelligent Systems, vol 7. Springer, Cham. https://doi.org/10.1007/978-3-030-36778-7_48

Download citation

Publish with us

Policies and ethics