Skip to main content

Semantic Mapping between Natural Language Questions and SQL Queries via Syntactic Pairing

  • Conference paper
Natural Language Processing and Information Systems (NLDB 2009)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 5723))

Abstract

Automatically mapping natural language semantics into programming languages has always been a major and interesting challenge in Computer Science. In this paper, we approach such problem by carrying out mapping at syntactic level and then applying machine learning algorithms to derive an automatic translator of natural language questions into their associated SQL queries. To build the required training and test sets, we designed an algorithm, which, given an initial corpus of questions and their answers, semi-automatically generates the set of possible incorrect and correct pairs.

We encode such relational pairs in Support Vector Machines by means of kernel functions applied to the syntactic trees of questions and queries. The accurate results on automatic classification of the above pairs above, suggest that our approach captures the shared semantics between the two languages.

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

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Basili, R., Moschitti, A., Pazienza, M.: A text classifier based on linguistic processing. In: Proceedings of IJCAI 1999, Machine Learning for Information Filtering (1999)

    Google Scholar 

  2. Charniak, E.: A maximum-entropy-inspired parser. In: Proceedings of NAACL 2000 (2000)

    Google Scholar 

  3. Shawe-Taylor, J., Cristianini, N.: Kernel Methods for Pattern Analysis. Cambridge University Press, Cambridge (2004)

    Google Scholar 

  4. Collins, M., Duffy, N.: New ranking algorithms for parsing and tagging: Kernels over discrete structures, and the voted perceptron. In: Proceedings of ACL 2002 (2002)

    Google Scholar 

  5. Zhang, D., Lee, W.S.: Question classification using support vector machines. In: Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, pp. 26–32. ACM Press, New York (2003)

    Chapter  Google Scholar 

  6. Moschitti, A., Bejan, C.: A semantic kernel for predicate argument classification. In: CoNLL 2004, Boston, MA, USA (2004)

    Google Scholar 

  7. Moschitti, A., Coppola, B., Pighin, D., Basili, R.: Engineering of syntactic features for shallow semantic parsing. In: Proceedings of ACL 2005 Workshop on Feature Engineering for Machine Learning in NLP, USA (2005)

    Google Scholar 

  8. Moschitti, A., Pighin, D., Basili, R.: Tree kernels for semantic role labeling. Computational Linguistics 34(2), 193–224 (2008)

    Article  MathSciNet  Google Scholar 

  9. Moschitti, A., Quarteroni, S., Basili, R., Manandhar, S.: Exploiting syntactic and shallow semantic kernels for question/answer classification. In: Proceedings of ACL 2007, Prague, Czech Republic (2007)

    Google Scholar 

  10. Moschitti, A.: Kernel methods, syntax and semantics for relational text categorization. In: CIKM 2008: Proceeding of the 17th ACM conference on Information and knowledge management, pp. 253–262. ACM, New York (2008)

    Chapter  Google Scholar 

  11. Moschitti, A., Zanzotto, F.: Fast and effective kernels for relational learning from texts. In: Ghahramani, Z. (ed.) Proceedings of the 24th Annual International Conference on Machine Learning, ICML 2007 (2007)

    Google Scholar 

  12. Popescu, A.M., Etzioni, O., Kautz, H.: Towards a theory of natural language interfaces to databases. In: Proceedings of the 2003 International Conference on Intelligent User Interfaces, Miami, pp. 149–157. Association for Computational Linguistics (2003)

    Google Scholar 

  13. Moschitti, A., Pighin, D., Basili, R.: Semantic role labeling via tree kernel joint inference. In: Proceedings of CoNLL-X, New York City (2006)

    Google Scholar 

  14. Joachims, T.: Making large-scale SVM learning practical. In: Schölkopf, B., Burges, C., Smola, A. (eds.) Advances in Kernel Methods (1999)

    Google Scholar 

  15. Chandra, Y., Mihalcea, R.: Natural language interfaces to databases, University of North Texas, Thesis, M.S. (2006)

    Google Scholar 

  16. Minock, M., Olofsson, P., Näslund, A.: Towards building robust natural language interfaces to databases. In: Kapetanios, E., Sugumaran, V., Spiliopoulou, M. (eds.) NLDB 2008. LNCS, vol. 5039, pp. 187–198. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  17. Kate, R.J., Mooney, R.J.: Using string-kernels for learning semantic parsers. In: Proceedings of the 21st ICCL and 44th Annual Meeting of the ACL, Sydney, Australia, July 2006, pp. 913–920. Association for Computational Linguistics (2006)

    Google Scholar 

  18. Zettlemoyer, L.S., Collins, M.: Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In: UAI, pp. 658–666 (2005)

    Google Scholar 

  19. Kudo, T., Matsumoto, Y.: Fast Methods for Kernel-Based Text Analysis. In: Hinrichs, E., Roth, D. (eds.) Proceedings of ACL, pp. 24–31 (2003)

    Google Scholar 

  20. Cumby, C., Roth, D.: Kernel Methods for Relational Learning. In: Proceedings of ICML 2003, Washington, DC, USA, pp. 107–114 (2003)

    Google Scholar 

  21. Culotta, A., Sorensen, J.: Dependency Tree Kernels for Relation Extraction. In: ACL 2004, Barcelona, Spain, pp. 423–429 (2004)

    Google Scholar 

  22. Kudo, T., Suzuki, J., Isozaki, H.: Boosting-based parse reranking with subtree features. In: Proceedings of ACL 2005, US (2005)

    Google Scholar 

  23. Toutanova, K., Markova, P., Manning, C.: The Leaf Path Projection View of Parse Trees: Exploring String Kernels for HPSG Parse Selection. In: Proceedings of EMNLP 2004, Barcelona, Spain (2004)

    Google Scholar 

  24. Kazama, J., Torisawa, K.: Speeding up Training with Tree Kernels for Node Relation Labeling. In: Proceedings of EMNLP 2005, Toronto, Canada, pp. 137–144 (2005)

    Google Scholar 

  25. Shen, L., Sarkar, A., Joshi, A.k.: Using LTAG Based Features in Parse Reranking. In: EMNLP, Sapporo, Japan (2003)

    Google Scholar 

  26. Zhang, M., Zhang, J., Su, J.: Exploring Syntactic Features for Relation Extraction using a Convolution tree kernel. In: Proceedings of NAACL, New York City, USA, pp. 288–295 (2006)

    Google Scholar 

  27. Zhang, D., Lee, W.: Question classification using support vector machines. In: Proceedings of SIGIR 2003, Toronto, Canada. ACM, New York (2003)

    Google Scholar 

  28. Giuglea, A.M., Moschitti, A.: Knowledge discovery using framenet, verbnet and propbank. In: Meyers, A. (ed.) Workshop on Ontology and Knowledge Discovering at ECML 2004, Pisa, Italy (2004)

    Google Scholar 

  29. Giuglea, A.M., Moschitti, A.: Semantic Role Labeling via Framenet, Verbnet and Propbank. In: Proceedings of ACL 2006, Sydney, Australia (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Giordani, A., Moschitti, A. (2010). Semantic Mapping between Natural Language Questions and SQL Queries via Syntactic Pairing. In: Horacek, H., Métais, E., Muñoz, R., Wolska, M. (eds) Natural Language Processing and Information Systems. NLDB 2009. Lecture Notes in Computer Science, vol 5723. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12550-8_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12550-8_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12549-2

  • Online ISBN: 978-3-642-12550-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics