An Improved Recurrent Neural Network Language Model for Programming Language

Liwei Wu,Youhua Wu,Fei Li,Tao Zheng
DOI: https://doi.org/10.1109/ijcnn.2019.8852433
2019-01-01
Abstract:Language models are applied to the programming language. However, the existing language models may be confused with different tokens with the same name in different scopes and can generate the syntax error code. In this paper, we proposed a grammar language model to solve these two problems. The model is an improved recurrent neural network language model. The improved recurrent neural network language model has the scope-awared input feature and the grammar output mask. We evaluated our model and existing language models on a C99 code dataset. Our model gets a perplexity value of 2.91 and a top-1 accuracy rate of 74.23% which is much better than other models.
What problem does this paper attempt to address?