A Compiler-based Approach for Natural Language to Code Conversion

S. Sridhar, Sowmya Sanagavarapu
{"title":"A Compiler-based Approach for Natural Language to Code Conversion","authors":"S. Sridhar, Sowmya Sanagavarapu","doi":"10.1109/IC2IE50715.2020.9274674","DOIUrl":null,"url":null,"abstract":"There is a gap observed between the natural language (NL) of speech and writing a program to generate code. Programmers should know the syntax of the programming language in order to code. The aim of the proposed model is to do away with the syntactic structure of a programming language and the user can specify the instructions in human interactive form, using either text or speech. The designed solution is an application based on speech recognition and user interaction to make coding faster and efficient. Lexical, syntax and semantic analysis is performed on the user’s instructions and then the code is generated. C is used as the programming language in the proposed model. The code editor is a web page and the user instructions are sent to a Flask server for processing. Using Python libraries NLTK and ply libraries, conversion of human language data to programmable C codes is done and the code is returned to the client. Lex is used for tokenization and the LALR parser of Yacc processes the syntax specifications to generate an output procedure. The results are recorded and analyzed for time taken to convert the NL commands to code and the efficiency of the implementation is measured with accuracy, precision and recall.","PeriodicalId":211983,"journal":{"name":"2020 3rd International Conference on Computer and Informatics Engineering (IC2IE)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2020-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 3rd International Conference on Computer and Informatics Engineering (IC2IE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/IC2IE50715.2020.9274674","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

There is a gap observed between the natural language (NL) of speech and writing a program to generate code. Programmers should know the syntax of the programming language in order to code. The aim of the proposed model is to do away with the syntactic structure of a programming language and the user can specify the instructions in human interactive form, using either text or speech. The designed solution is an application based on speech recognition and user interaction to make coding faster and efficient. Lexical, syntax and semantic analysis is performed on the user’s instructions and then the code is generated. C is used as the programming language in the proposed model. The code editor is a web page and the user instructions are sent to a Flask server for processing. Using Python libraries NLTK and ply libraries, conversion of human language data to programmable C codes is done and the code is returned to the client. Lex is used for tokenization and the LALR parser of Yacc processes the syntax specifications to generate an output procedure. The results are recorded and analyzed for time taken to convert the NL commands to code and the efficiency of the implementation is measured with accuracy, precision and recall.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于编译器的自然语言到代码转换方法
在语音的自然语言(NL)和编写程序生成代码之间存在着差距。程序员应该了解编程语言的语法,以便编写代码。提出的模型的目的是消除编程语言的语法结构,用户可以使用文本或语音以人类交互的形式指定指令。设计的解决方案是一个基于语音识别和用户交互的应用程序,使编码更快、更高效。根据用户的指令进行词法、语法和语义分析,然后生成代码。在提出的模型中使用C作为编程语言。代码编辑器是一个网页,用户指令被发送到Flask服务器进行处理。使用Python库NLTK和ply库,将人类语言数据转换为可编程的C代码,并将代码返回给客户端。Lex用于标记化,Yacc的LALR解析器处理语法规范以生成输出过程。记录并分析将NL命令转换为代码所需的时间,并通过准确性、精密度和召回率来衡量执行效率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Agile-Based Requirement Challenges of Government Outsourcing Project: A Case Study Investigation of Job Satisfaction and Worker Performance on Digital Business Company IC2IE 2020 Index Wind Speed Forecasting toward El Nino Factors Using Recurrent Neural Networks Thyroid Nodules Stratification Based on Orientation Characteristics Using Machine Learning Approach
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1