跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:1805.08949 (cs)
[提交于 2018年5月23日]

标题:Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflow

作者:Pengcheng Yin, Bowen Deng, Edgar Chen, Bogdan Vasilescu, Graham Neubig
查看论文《Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflow》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:For tasks like code synthesis from natural language, code retrieval, and code summarization, data-driven models have shown great promise. However, creating these models require parallel data between natural language (NL) and code with fine-grained alignments. Stack Overflow (SO) is a promising source to create such a data set: the questions are diverse and most of them have corresponding answers with high-quality code snippets. However, existing heuristic methods (e.g., pairing the title of a post with the code in the accepted answer) are limited both in their coverage and the correctness of the NL-code pairs obtained. In this paper, we propose a novel method to mine high-quality aligned data from SO using two sets of features: hand-crafted features considering the structure of the extracted snippets, and correspondence features obtained by training a probabilistic model to capture the correlation between NL and code using neural networks. These features are fed into a classifier that determines the quality of mined NL-code pairs. Experiments using Python and Java as test beds show that the proposed method greatly expands coverage and accuracy over existing mining methods, even when using only a small number of labeled examples. Further, we find that reasonable results are achieved even when training the classifier on one language and testing on another, showing promise for scaling NL-code mining to a wide variety of programming languages beyond those for which we are able to annotate data.
评论: MSR '18
主题: 计算与语言 (cs.CL); 软件工程 (cs.SE)
引用方式: arXiv:1805.08949 [cs.CL]
  (或者 arXiv:1805.08949v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.1805.08949

提交历史

来自:Pengcheng Yin
[v1] 2018年5月23日 星期三 03:39:04 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CL
< 上一篇   |   下一篇 >
最新 | 近期 | 2018-05
切换浏览方式为:
cs
cs.SE

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站