JavaScript Code Suggestion Based on Deep Learning

Chaoliang Zhong, Ming Yuan Yang, Jun Sun · 2019

Code suggestion system is widely used in integrated development environments (IDEs) for generating code recommendations while editing to improve program efficiency. Current most common systems focus on the settings that complete a single code unit or predict likely next single unit. In this paper, we describe a code suggestion prototype system for JavaScript based on Jupyter Notebook [1] (an IDE) to provide multiple successive code units completion. Our main work is as follows: 1. Provide a JavaScript pre-processing solution for feature extraction; 2. Apply several deep learning technologies, including LSTM [2], attention mechanism (AM) [3] and sparse point network (SPN) [4] to support system performance; 3. Design a solution for model deployment and provide post-processing methods to improve user experience. Offline model performance shows that the LSTM + SPN has achieved a 79.73% all-token accuracy rate and 44.34% identifier accuracy rate among top 5 predictions respectively. Online evaluation shows that the demo system fits practical application experience.

Read the paper · More papers on PaperTik