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

Code searching 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: 2021-03-16
UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF6 Cites 7 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
  • Code searching method based on annotation semantic information
  • Code searching method based on annotation semantic information
  • Code searching method based on annotation semantic information

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of this application, not all of them. The components of the embodiments of the application generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in...

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 searching method based on annotation semantic information, and the method comprises the steps: obtaining a code sample stored in a natural language description and function code form from a collected code warehouse, carrying out data processing of the code sample, and then carrying out encoding through a neural network model encoder; training the neural network model; converting all the code functions in the code warehouse and the input of the user into a vector form through a neural network model encoder, constructing a code vector warehouse, calculating a plurality of code vectors closest to the vector converted by the input of the user in the code vector warehouse, and returning corresponding codes as retrieval results. The invention has the advantages that annotation information carried in the codes is used as natural language annotation, the workload of manual annotation is reduced, and large-scale data generation can be achieved. Semantic feature extraction is carried out by adopting a Transformer neural network and the like, so that the defect that traditional keyword matching needs one-to-one correspondence is overcome;.

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] During the software development process, developers need to spend a lot of time to retrieve code from the code warehouse for code reuse or as a reference. Improving the search function of the code warehouse 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 using search tools such as Luence. The method used by these existing tools is to perform keyword matching on search sentences and code snippets, and the main method is to use inverted search: first, word segmentation is performed on code snippets, and the code snippets corresponding to these words are recorded, and then the query input by the user is ...

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