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

在代码注释中识别算法名称

Identifying Algorithm Names in Code Comments

Jakapong Klainongsuang, Yusuf Sulistyo Nugroho, Hideaki Hata, Bundit Manaskasemsak, Arnon Rungsawang, Pattara Leelaprute, Kenichi Matsumoto

摘要:

对于最近基于机器学习的任务,如API序列生成,注释生成和文档生成,需要大量数据。当软件开发人员在代码中实现算法时,我们发现他们经常在代码注释中提到算法名称。用这样的算法名称注释的代码可以是有价值的数据源。本文提出了一种算法名自动识别的方法。其关键思想是在最后提取包含“algorithm”一词的重要N-gram词。我们还考虑部分语音模式,以获得适当的算法名称识别的规则。我们的规则评估的结果产生了较高的精度和召回值(超过0.70)。我们应用我们的规则提取大量的注释中的算法名称,从活跃的FLOSS项目写在七种程序设计语言,C,C++,Java,JavaScript,Python,PHP和Ruby,并报告在代码注释中经常提到的算法名称。

英文摘要:

For recent machine-learning-based tasks like API sequence generation, comment generation, and document generation, large amount of data is needed. When software developers implement algorithms in code, we find that they often mention algorithm names in code comments. Code annotated with such algorithm names can be valuable data sources. In this paper, we propose an automatic method of algorithm name identification. The key idea is extracting important N-gram words containing the word `algorithm' in the last. We also consider part of speech patterns to derive rules for appropriate algorithm name identification. The result of our rule evaluation produced high precision and recall values (more than 0.70). We apply our rules to extract algorithm names in a large amount of comments from active FLOSS projects written in seven programming languages, C, C++, Java, JavaScript, Python, PHP, and Ruby, and report commonly mentioned algorithm names in code comments.

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

↑