Enhanced code annotation automatic generation method and system
An automatically generated and enhanced technology, which is applied to biological neural network models, software maintenance/management, program files, etc., can solve maintenance work that consumes energy and time of programmers, cannot adapt to software code, and cannot meet diversified programming methods and other issues to achieve the effect of improving accuracy
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] Such as figure 1 As shown, this embodiment provides an enhanced method for automatically generating code annotations, including:
[0037] S1: Extract functional keywords from the obtained code fragments, obtain the position vector of the code fragment according to the keyword vector composed of functional keywords, and use the pre-built function enhancer to obtain the function vector sequence of the code fragment according to the keyword vector and position vector ;
[0038] S2: Merge the obtained bidirectional representation vector and structure vector of the code fragment, and input the merged result and function vector sequence to the encoder to obtain an intermediate vector;
[0039] S3: Obtain the vector sequence of the target annotation and input it into the decoder, and perform multi-head attention mechanism calculation on the vector sequence of the target annotation and the intermediate vector and function vector sequence respectively, so as to construct a sequenc
Embodiment 2
[0114] This embodiment provides an enhanced code annotation automatic generation system, including:
[0115] The first preprocessing module is used to extract functional keywords from the obtained code fragments, obtain the position vector of the code fragment according to the keyword vector composed of the functional keywords, and use the pre-built function enhancer to obtain according to the keyword vector and the position vector A sequence of feature vectors for code snippets;
[0116] The second preprocessing module is used for merging the bidirectional representation vector and the structure vector of the obtained code fragment, and inputting the merging result and the function vector sequence to the encoder to obtain an intermediate vector;
[0117] The model building module is used to obtain the vector sequence of the target annotation and input it into the decoder. The vector sequence of the target annotation is calculated with the intermediate vector and the func
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap