arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.06599cs.SE
收藏

使用CCG从Source Code生成注释

Generating Comments From Source Code with CCGs

Sergey Matskevich, Colin S. Gordon

摘要:

好的注释可以帮助开发人员更快地理解软件,并提供更好的维护。然而,评论往往是失踪,一般不准确,或过时。这些问题中的许多可以通过自动注释生成来避免。本文提出了一种使用自然语言处理的通用技术直接从源代码生成信息性注释的方法。我们使用现有的自然语言模型,夫妇的话,他们的个人逻辑意义和语法规则,使评论生成进行搜索从声明性描述的程序文本的意见。我们评估我们的算法在Python中实现的几个经典算法。

英文摘要:

Good comments help developers understand software faster and provide better maintenance. However, comments are often missing, generally inaccurate, or out of date. Many of these problems can be avoided by automatic comment generation. This paper presents a method to generate informative comments directly from the source code using general-purpose techniques from natural language processing. We generate comments using an existing natural language model that couples words with their individual logical meaning and grammar rules, allowing comment generation to proceed by search from declarative descriptions of program text. We evaluate our algorithm on several classic algorithms implemented in Python.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑