语言模型的Source Code注释预处理
Preprocessing Source Code Comments for Linguistic Models
摘要:
注释是源代码的重要组成部分,也是文档的主要来源。这使得人们对使用大量注释来训练或评估使用或产生它们的工具产生了兴趣--例如从注释生成预言机甚至代码,或者自动生成代码摘要。大部分的研究都对评论的结构和质量做出了很强的假设,比如假设它们主要由正确的英语句子组成。然而,我们对这些用例的现有注释的实际质量知之甚少。注释通常包含在其他类型的文本中看不到的独特结构和元素,从它们中过滤或提取信息需要额外的注意。本文探讨了来自GitHub的840个最受欢迎的开源项目和来自SriLab数据集的8422个项目的Python评论的内容和质量,以及朴素与深入过滤对使用现有评论进行训练和评估生成评论的系统的影响。
英文摘要:
Comments are an important part of the source code and are a primary source of documentation. This has driven interest in using large bodies of comments to train or evaluate tools that consume or produce them -- such as generating oracles or even code from comments, or automatically generating code summaries. Most of this work makes strong assumptions about the structure and quality of comments, such as assuming they consist mostly of proper English sentences. However, we know little about the actual quality of existing comments for these use cases. Comments often contain unique structures and elements that are not seen in other types of text, and filtering or extracting information from them requires some extra care. This paper explores the contents and quality of Python comments drawn from 840 most popular open source projects from GitHub and 8422 projects from SriLab dataset, and the impact of naïve vs. in-depth filtering can have on the use of existing comments for training and evaluation of systems that generate comments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。