Code Completion for Programming Education based on Recurrent Neural Network

Code Completion for Programming Education based on Recurrent Neural Network
复制标题

DOI:
10.1109/iwcia47330.2019.8955090
复制
发表时间:
2019-11
期刊:
2019 IEEE 11th International Workshop on Computational Intelligence and Applications (IWCIA)
影响因子:
--
通讯作者:
Kenta Terada;Y. Watanobe
Kenta Terada;Y. Watanobe
中科院分区:
其他
文献类型:
--
作者:
Kenta Terada;Y. Watanobe

文献摘要

相似文献

在解决编程问题时,初学者很难从头开始编写程序代码。解决这个困难的一种方法是提供自动代码完成功能。在这项工作中,我们提出了一种方法来预测给定的不完整程序之后的下一个单词,该方法有两个关键组成部分,词汇内单词的预测和标识符的预测。在词汇内词预测方面,提出了一种基于长短期记忆(LSTM)网络的神经语言模型。针对标识符的预测,提出了一种基于指针网络的标识符预测模型。在此基础上,提出了在这两种模型之间切换的模型。为了对所提出的方法进行评估,使用了在线判断系统中积累的源代码。实验结果表明,该方法既能准确地预测下一个词,又能准确地预测下一个词。
In solving programming problems, it is difficult for beginners to create program code from scratch. One way to navigate this difficulty is to provide a function of automatic code completion. In this work, we propose a method to predict the next word following a given incomplete program that has two key constituents, prediction of within-vocabulary words and prediction of identifiers. In terms of predicting within-vocabulary words, a neural language model based on a Long Short-Term Memory (LSTM) network is proposed. Regarding the prediction of identifiers, a model based on a pointer network is proposed. Additionally, a model for switching between these two models is proposed. For evaluation of the proposed method, source code accumulated in an online judge system is used. The results of the experiment demonstrate that the proposed method can predict both the next within-vocabulary word and the next identifier to a high degree of accuracy.