中文

AugmentedCode:考察自然语言资源在代码检索模型中的作用

软件工程 2021-10-19 v1 人工智能

摘要

代码检索使软件工程师能够通过自然语言查询搜索代码,其依赖于自然语言处理与软件工程技术。从搜索代码片段到函数代码,已有若干代码检索的尝试。在本文中,我们提出增强代码(Augmented Code, AugmentedCode)检索,其利用代码内已有信息并构建增强编程语言以提升代码检索模型的性能。我们整理了一个大型 Python 语料库,并展示了增强编程语言的框架与结果,其在 CodeSearchNet 与 CodeBERT 上分别以 0.73 和 0.96 的平均倒数排名(Mean Reciprocal Rank, MRR)优于原有方法。表现更优的微调增强代码检索模型发布于 HuggingFace:https://huggingface.co/Fujitsu/AugCode,演示视频见:https://youtu.be/mnZrUTANjGs。

关键词

引用

@article{arxiv.2110.08512,
  title  = {AugmentedCode: Examining the Effects of Natural Language Resources in Code Retrieval Models},
  author = {Mehdi Bahrami and N. C. Shrikanth and Yuji Mizobuchi and Lei Liu and Masahiro Fukuyori and Wei-Peng Chen and Kazuki Munakata},
  journal= {arXiv preprint arXiv:2110.08512},
  year   = {2021}
}

备注

7 pages, 2 figures, 5 tables, 1 video