SQL ChatBot – using Context Free Grammar

Rajvardhan Patil, Sorio Boit, Nathaniel Bowman
{"title":"SQL ChatBot – using Context Free Grammar","authors":"Rajvardhan Patil, Sorio Boit, Nathaniel Bowman","doi":"10.1109/iemtronics55184.2022.9795814","DOIUrl":null,"url":null,"abstract":"In this work, we derive the semantics of a given English query and convert it into its equivalent SQL query. Instead of using neural networks for semantic analysis of English queries, we opt for a Context Free Grammar approach. Most neural-network-based systems can handle only one semantic at a time, whereas, because of the flexibility offered by our CFG approach, our system manages to handle simultaneous usage of conjunctive, disjunctive, and negative semantics. It also handles complex statements comprising of main as well as dependent clauses. In addition, the system also takes into account aggregate functions and constructs the required GROUP-BY and HAVING clauses. We describe how the system analyzes English queries by understanding the role that each part-of-speech has to play in constructing SQL queries. Numerous examples demonstrate the effectiveness of our approach where state-of-the-art techniques relying on deep learning algorithms fail to deliver.","PeriodicalId":442879,"journal":{"name":"2022 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS)","volume":"11 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/iemtronics55184.2022.9795814","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

In this work, we derive the semantics of a given English query and convert it into its equivalent SQL query. Instead of using neural networks for semantic analysis of English queries, we opt for a Context Free Grammar approach. Most neural-network-based systems can handle only one semantic at a time, whereas, because of the flexibility offered by our CFG approach, our system manages to handle simultaneous usage of conjunctive, disjunctive, and negative semantics. It also handles complex statements comprising of main as well as dependent clauses. In addition, the system also takes into account aggregate functions and constructs the required GROUP-BY and HAVING clauses. We describe how the system analyzes English queries by understanding the role that each part-of-speech has to play in constructing SQL queries. Numerous examples demonstrate the effectiveness of our approach where state-of-the-art techniques relying on deep learning algorithms fail to deliver.
SQL聊天机器人-使用上下文自由语法
在这项工作中,我们推导了给定英语查询的语义,并将其转换为等效的SQL查询。我们没有使用神经网络对英语查询进行语义分析,而是选择了上下文无关语法方法。大多数基于神经网络的系统一次只能处理一个语义,然而,由于我们的CFG方法提供的灵活性,我们的系统能够同时处理连接、析取和否定语义的使用。它还处理由主子句和从属子句组成的复杂语句。此外,系统还考虑了聚合函数,构造了所需的GROUP-BY和HAVING子句。我们描述了系统如何通过理解每个词性在构造SQL查询中所扮演的角色来分析英语查询。许多例子证明了我们的方法的有效性,而依赖于深度学习算法的最先进技术无法提供。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信