arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2008.12193cs.IRcs.LGcs.SE
收藏

重新审视神经代码搜索:通过自然语言意图增强代码嗅探器检索

Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intent

Nokia Bell Labs(诺基亚贝尔实验室)

Geert Heyman, Tom Van Cutsem

摘要:

在这项工作中,我们提出并研究注释代码搜索:检索的代码片段配对的简要说明,他们的意图使用自然语言查询。在三个基准数据集上,我们研究了如何通过利用描述来更好地捕获代码片段的意图来改进代码检索系统。基于迁移学习和自然语言处理的最新进展,我们为用自然语言描述注释的代码创建了一个特定于域的检索模型。我们发现,与不使用描述但试图仅从未注释的代码计算片段意图的最先进的代码检索方法相比,我们的模型产生了更相关的搜索结果(平均倒数排名的绝对增益高达20.6%)。

英文摘要:

In this work, we propose and study annotated code search: the retrieval of code snippets paired with brief descriptions of their intent using natural language queries. On three benchmark datasets, we investigate how code retrieval systems can be improved by leveraging descriptions to better capture the intents of code snippets. Building on recent progress in transfer learning and natural language processing, we create a domain-specific retrieval model for code annotated with a natural language description. We find that our model yields significantly more relevant search results (with absolute gains up to 20.6% in mean reciprocal rank) compared to state-of-the-art code retrieval methods that do not use descriptions but attempt to compute the intent of snippets solely from unannotated code.

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

↑