{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/code-completion-with-neural-attention-and","title":"Code Completion with Neural Attention and Pointer Networks","arxiv_id":"1711.09573","date":"2017-11-27","proceeding":null,"authors":["Jian Li","Yue Wang","Michael R. Lyu","Irwin King"],"abstract":"Intelligent code completion has become an essential research task to\naccelerate modern software development. To facilitate effective code completion\nfor dynamically-typed programming languages, we apply neural language models by\nlearning from large codebases, and develop a tailored attention mechanism for\ncode completion. However, standard neural language models even with attention\nmechanism cannot correctly predict the out-of-vocabulary (OoV) words that\nrestrict the code completion performance. In this paper, inspired by the\nprevalence of locally repeated terms in program source code, and the recently\nproposed pointer copy mechanism, we propose a pointer mixture network for\nbetter predicting OoV words in code completion. Based on the context, the\npointer mixture network learns to either generate a within-vocabulary word\nthrough an RNN component, or regenerate an OoV word from local context through\na pointer component. Experiments on two benchmarked datasets demonstrate the\neffectiveness of our attention mechanism and pointer mixture network on the\ncode completion task.","url_abs":"http://arxiv.org/abs/1711.09573v2","url_pdf":"http://arxiv.org/pdf/1711.09573v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"code-completion-with-neural-attention-and","repo_url":"https://github.com/oleges1/code-completion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"code-completion","task_name":"Code Completion"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1711.09573","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}