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

StaQC:一个从堆栈溢出中系统地挖掘的伪码数据集

StaQC: A Systematically Mined Question-Code Dataset from Stack Overflow

The Ohio State University(俄亥俄州立大学);University of Washington(华盛顿大学);Fujitsu Labs of America(富士通美国实验室)

Ziyu Yao, Daniel S. Weld, Wei-Peng Chen, Huan Sun

摘要:

Stack Overflow(SO)是自然语言问题及其代码解决方案的重要来源(即,问题-代码对),这对于包括代码检索和注释在内的许多任务都是至关重要的。在大多数现有的研究中,问题代码对收集的经验教训,往往有低质量。在本文中,我们研究了一个新的问题,系统地挖掘问题代码对从堆栈溢出(相对于收集他们)。它被公式化为预测代码片段是否是问题的独立解决方案。我们提出了一种新的双视图层次神经网络,它可以捕获代码片段的编程内容和文本上下文(即,两种观点)来进行预测。在Python和SQL领域的两个手动注释数据集上,我们的框架大大优于探试法,F1和准确率至少高出15%。此外,我们还介绍了StaQC(Stack Overflow Question-Code pairs),这是迄今为止最大的数据集,包含约148 K Python和约120 K SQL问题代码对,使用我们的框架自动从SO中挖掘出来。在各种案例研究中,我们证明了StaQC可以极大地帮助开发数据饥饿的模型,将自然语言与程序设计语言相关联。

英文摘要:

Stack Overflow (SO) has been a great source of natural language questions and their code solutions (i.e., question-code pairs), which are critical for many tasks including code retrieval and annotation. In most existing research, question-code pairs were collected heuristically and tend to have low quality. In this paper, we investigate a new problem of systematically mining question-code pairs from Stack Overflow (in contrast to heuristically collecting them). It is formulated as predicting whether or not a code snippet is a standalone solution to a question. We propose a novel Bi-View Hierarchical Neural Network which can capture both the programming content and the textual context of a code snippet (i.e., two views) to make a prediction. On two manually annotated datasets in Python and SQL domain, our framework substantially outperforms heuristic methods with at least 15% higher F1 and accuracy. Furthermore, we present StaQC (Stack Overflow Question-Code pairs), the largest dataset to date of ~148K Python and ~120K SQL question-code pairs, automatically mined from SO using our framework. Under various case studies, we demonstrate that StaQC can greatly help develop data-hungry models for associating natural language with programming language.

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

↑