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

A Code Search Method Based on Annotation Semantic Information

A search method and semantic information technology, applied in the field of code search, to achieve the effect of large-scale data generation

Active Publication Date: 2022-07-12
UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art, provide a code search method based on annotation semantic information, use the existing code warehouse data to construct natural language description and code samples, and use the neural network model to complete the code with semantic information Search task, which solves the shortcomings of existing code search methods

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
  • A Code Search Method Based on Annotation Semantic Information
  • A Code Search Method Based on Annotation Semantic Information
  • A Code Search Method Based on Annotation Semantic Information

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] In order to make the purposes, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, all oth...

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 relates to a code search method based on annotation semantic information. The search method includes obtaining code samples stored in the form of "natural language description, function code" from a collected code warehouse, and after data processing the code samples, through neural The network model encoder encodes and trains the neural network model; through the neural network model encoder, all the code functions in the code warehouse and the user's input are converted into vector form, and the code vector warehouse is constructed. Enter multiple code vectors that are closest to the converted vector, and return the corresponding code as the retrieval result. The advantage of the present invention is that the annotation information contained in the code itself is used as the natural language annotation, the workload of manual annotation is reduced, and large-scale data generation can be realized. Secondly, the Transformer neural network is used to extract semantic features, which solves the disadvantage that traditional keyword matching requires one-to-one correspondence.

Description

technical field [0001] The invention relates to the technical field of code search, in particular to a code search method based on annotation semantic information. Background technique [0002] In the software development process, developers need to spend a lot of time retrieving code from the code repository for code reuse or as a reference. Improving the search function of the code repository can improve the development efficiency of developers, so as to improve the efficiency of software development. [0003] Early and current code search techniques are still based on traditional information retrieval techniques, such as the use of search tools such as Luence. The method adopted by these existing tools is to perform keyword matching on search sentences and code snippets. The main method is to use inverted search: firstly, the code snippets are word-segmented, the code snippets corresponding to these words are recorded, and then the query entered by the user is analyzed. ...

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 Patents(China)
IPC IPC(8): G06F16/33G06F16/338G06F40/126G06K9/62G06N3/08
CPCG06F16/3344G06F16/338G06F40/126G06N3/084G06F18/22Y02D10/00
Inventor 银正强周尔强曹黛罗纪杰
Owner UNIV OF ELECTRONICS SCI & TECH OF CHINA