{"title":"基于编译器的自然语言到代码转换方法","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":"18 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"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\":\"18 1\",\"pages\":\"0\"},\"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}","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}
A Compiler-based Approach for Natural Language to Code Conversion
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.