The invention relates to an automatic
source code annotation generation method based on
data mining. The method includes the steps that texts containing needed annotations are extracted from three kinds of data sources; three
filtering rules are formed by combining respective characteristics of the data sources to reject irrelevant
noise information, and a
text processing technology is used for character format preprocessing; two extraction rules of
describing function annotation key characteristics are formed through summarization, and function general
annotation is automatically generated according to the two extraction rules combined with the characteristics of the three data sources. The extracted annotation can enrich traditional function annotation, provide multi-dimensional information and support version alternation. Customization is carried out on
linux kernel annotation and is easy to implement, and function annotation information which is high in
readability and reliable can be provided with small cost; the blank of automatic
linux kernel function annotation is effectively filled up, richer reference information is provided for learning and development, and development
workload and difficulty are effectively reduced.