Code annotation classification method based on neural network model

A technology of neural network model and classification method, which is applied in the direction of biological neural network model, neural learning method, code compilation, etc. It can solve the problems of not considering semantic information, new annotations are not strong in generalization ability, etc., and achieve the effect of accurate classification

Inactive Publication Date: 2018-09-04
SUN YAT SEN UNIV
View PDF6 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The existing code annotation classification method based on traditional machine learning only considers the text features of code annotations, but does not consider the semantic information of annotations, etc., and the accuracy of classification will be limited.
Moreover, based on traditional machine learning, such as random forest, the training set is generally relatively small, and it is too sensitive to the noise in the training set, which often leads to a certain degree of overfitting, and the generalization ability of new annotations is not strong.

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 annotation classification method based on neural network model
  • Code annotation classification method based on neural network model
  • Code annotation classification method based on neural network model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0046] figure 1 It is a schematic flowchart of a code comment classification method based on a neural network model in an embodiment of the present invention. like figure 1 As shown, the method includes:

[0047] S1, build an annotated corpus, and generate a word vector representation for each annotated word;

[0048] S2, classifying annotations and manually defining categories;

[0049] S3, preprocessing and embedding the annotations to obtain a 250-dimensiona...

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 embodiment of the invention discloses a code annotation classification method based on a neural network model. The method includes: constructing a corpus of annotations, and generating a word vector for representation of each annotation word; classifying the annotations, and manually defining classes; carrying out preprocessing and word embedding processing on the annotations to obtain a 250-dimensional word vector of each word; and entering the 250-dimensional word vector of each word into a classification model to carrying out classification processing to obtain a classification result.In the embodiment of the invention, the context features of the annotations are considered, semantic features of the annotations are also considered, attention is assigned according to word importanceweights, text can be better characterized, and classification is also more accurate. Compared with implementation of other technology, the method is suitable for use in classification of various annotations.

Description

technical field [0001] The invention relates to the field of program understanding and neural network technology, in particular to a code annotation classification method based on a neural network model. Background technique [0002] In recent years, with the development of the software industry, the scale and complexity of software are constantly increasing, and the life cycle of software is also getting longer. A large amount of source code in software systems contains comments, which document the programmer's implementation and help developers understand the code. Code comments play an important role in software maintenance and program understanding. Studies have shown that good-quality code comments can significantly improve the efficiency of developers and maintainers in understanding programs. Therefore, improving the quality of code comments will effectively improve the maintainability of software, and then improve the quality of software. [0003] The current metho...

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/41G06F17/27G06N3/08
CPCG06F8/437G06N3/08G06F40/284
Inventor 陈焕超陈湘萍刘志勇黄袁
Owner SUN YAT SEN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products