Unlock instant, AI-driven research and patent intelligence for your innovation.

Code completion method and system, storage medium and computer program product

A computer program and computer equipment technology, applied in the field of software development, can solve problems such as inability to accommodate vocabulary, all vocabulary included in the calculation range, inability to effectively deal with rare vocabulary, etc., to achieve the effect of strong versatility and improved prediction accuracy

Pending Publication Date: 2021-12-21
CENT SOUTH UNIV
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the limitation of the size of the vocabulary, the global corpus cannot accommodate all the vocabulary, so new vocabulary cannot be predicted
For rare words, the global corpus can only consider global high-frequency words due to the limitation of calculation efficiency, and cannot include all words in the calculation range, but some rare words are local high-frequency words and global rare words. Therefore, the global corpus cannot effectively deal with rare words

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code completion method and system, storage medium and computer program product
  • Code completion method and system, storage medium and computer program product
  • Code completion method and system, storage medium and computer program product

Examples

Experimental program
Comparison scheme
Effect test

Embodiment A

[0104] The AOOV-POFA prediction process of the embodiment of the present invention is as follows:

[0105] 1. The existing code fragment Code_s is processed to obtain the input Code_in of the non-anonymized model and the input Code_ia of the anonymized model. The processing method is the same as the preprocessing method of each model;

[0106] 2. Use non-anonymized model Model non-anonymous Make a prediction and get the prediction result Identifier non-anonymous ;

[0107] 3. If the prediction result is not UNK, output Identifier non-anonymous ;

[0108] 4. Otherwise, use the anonymized model Model non-anonymous Make a prediction and output the prediction result Identifier anonymous .

[0109] The OOV problem is mainly caused by two reasons, rare vocabulary and new vocabulary. The problem of rare vocabulary is just as mentioned in the examples of the three documents. Anonymization shields the differences in vocabulary, so that low-frequency vocabulary at the expected li...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a code completion method and system, a storage medium and a computer program product, and the method comprises the steps:preprocessing a code fragment, taking the preprocessed code fragment as the input of a non-anonymization model, and obtaining a first prediction result; judging whether the first prediction result is an identifier UNK or not, and if not, ending; and otherwise, taking the anonymized code as the input of the anonymization model to obtain a second prediction result. According to the code completion method, rare words and new words in the OOV words can be efficiently processed through anonymization and establishment of the dynamic word list, and the code completion method can quickly follow up the latest achievements in the field of code completion without depending on the characteristics of a specific model.

Description

technical field [0001] The invention relates to the technical field of software development, in particular to a code completion method, system, storage medium and computer program product. Background technique [0002] Intelligent code completion is an essential component for the development of the next generation of intelligent IDE. In the IDE, the code completion component provides the next possible identifier option based on the code the developer has written and the current cursor position. Under the wave of intelligence, existing intelligent code completion methods have turned to methods based on neural language models. This method based on statistical learning, inspired by the research of Hindle et al., regards the programming language as a language, and then trains the language model through a large amount of code corpus. However, this language model-based method cannot deal with OOV (out of vocabulary) problems. In code, since the proportion of new and rare words ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/33G06K9/62
CPCG06F8/33G06F18/214
Inventor 杨浩邝砾
Owner CENT SOUTH UNIV