Code annotation generation method based on structural perception
An annotation and code technology, applied in the field of code annotation generation based on structure awareness, which can solve problems such as tediousness and time-consuming
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0068] The specific training process of the comment generator and the specific implementation of the comment generation of Python code will be given below.
[0069] 1. The training of the annotation generator, the specific steps are:
[0070] (1) Prepare a large number of codes and comments corresponding to each sentence of code as training data. Here we take the Python code as an example. For example, a sentence of code in the training data set is "for cache in caches.all():", and the corresponding comment is "for every cache in return value of the function caches.all.". Next, we will mainly focus on the adjustment of the model parameters during the training process of this code.
[0071] (2) For each code sequence x s Generate its corresponding abstract syntax tree. For Python code, you can use the built-in ast package to complete the process. At this time, the words represented by each node in the abstract syntax tree form the abstract syntax tree sequence x t ; Label ...
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, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com