资源论文Code Completion with Neural Attention and Pointer Networks

Code Completion with Neural Attention and Pointer Networks

2019-11-07 | |  67 |   54 |   0
Abstract Intelligent code completion has become an essential research task to accelerate modern software development. To facilitate effective code completion for dynamically-typed programming languages, we apply neural language models by learning from large codebases, and develop a tailored attention mechanism for code completion. However, standard neural language models even with attention mechanism cannot correctly predict the outof-vocabulary (OoV) words that restrict the code completion performance. In this paper, inspired by the prevalence of locally repeated terms in program source code, and the recently proposed pointer copy mechanism, we propose a pointer mixture network for better predicting OoV words in code completion. Based on the context, the pointer mixture network learns to either generate a withinvocabulary word through an RNN component, or regenerate an OoV word from local context through a pointer component. Experiments on two benchmarked datasets demonstrate the effectiveness of our attention mechanism and pointer mixture network on the code completion task.

上一篇:Topic-to-Essay Generation with Neural Networks

下一篇:S EG B OT: A Generic Neural Text Segmentation Model with Pointer Network

用户评价
全部评价

热门资源

  • A Mathematical Mo...

    Direct democracy, where each voter casts one vo...

  • Learning to Predi...

    Much of model-based reinforcement learning invo...

  • The Variational S...

    Unlike traditional images which do not offer in...

  • Hierarchical Task...

    We extend hierarchical task network planning wi...

  • Shape-based Autom...

    We present an algorithm for automatic detection...