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
期刊:
影响因子:
--
通讯作者:
Kenta Terada;Y. Watanobe
中科院分区:
文献类型:
--
作者:
Kenta Terada;Y. Watanobe
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.