arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.02275cs.CLcs.AI
收藏

Python函数和文档字符串的并行语料库,用于自动化代码文档和代码生成

A parallel corpus of Python functions and documentation strings for automated code documentation and code generation

The University of Edinburgh(爱丁堡大学)

Antonio Valerio Miceli Barone, Rico Sennrich

摘要:

编程源代码的自动文档化和从自然语言自动生成代码生成是具有实际和科学意义的挑战性任务。这些领域的进展一直受到代码和自然语言描述的并行语料库数量少的限制,这些语料库往往规模较小,局限于特定领域。在这项工作中,我们介绍了一个庞大而多样化的并行语料库,其中包含数十万个Python函数及其文档字符串(“docstrings”),这些字符串是通过抓取GitHub上的开源存储库生成的。我们描述了神经机器翻译获得的代码文档和代码生成任务的基线结果。我们还试验了数据增强技术,以进一步增加训练数据的量。我们发布我们的数据集和处理脚本,以刺激这些领域的研究。

英文摘要:

Automated documentation of programming source code and automated code generation from natural language are challenging tasks of both practical and scientific interest. Progress in these areas has been limited by the low availability of parallel corpora of code and natural language descriptions, which tend to be small and constrained to specific domains. In this work we introduce a large and diverse parallel corpus of a hundred thousands Python functions with their documentation strings ("docstrings") generated by scraping open source repositories on GitHub. We describe baseline results for the code documentation and code generation tasks obtained by neural machine translation. We also experiment with data augmentation techniques to further increase the amount of training data. We release our datasets and processing scripts in order to stimulate research in these areas.

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

↑