arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1704.01696cs.CLcs.PLcs.SE
收藏

一种用于通用代码生成的句法神经模型

A Syntactic Neural Model for General-Purpose Code Generation

Carnegie Mellon University(卡内基梅隆大学)

Pengcheng Yin, Graham Neubig

摘要:

我们考虑将自然语言描述解析成用通用程序设计语言(如Python)编写的源代码的问题。现有的数据驱动方法将此问题视为语言生成任务,而不考虑目标程序设计语言的底层语法。在语义解析的工作通知,在本文中,我们提出了一种新的神经架构的语法模型,明确地捕捉目标语法作为先验知识。实验发现,这是一种有效的方法,以扩大到从自然语言描述的复杂程序的生成,实现国家的最先进的结果,以及优于以前的代码生成和语义解析方法。

英文摘要:

We consider the problem of parsing natural language descriptions into source code written in a general-purpose programming language like Python. Existing data-driven methods treat this problem as a language generation task without considering the underlying syntax of the target programming language. Informed by previous work in semantic parsing, in this paper we propose a novel neural architecture powered by a grammar model to explicitly capture the target syntax as prior knowledge. Experiments find this an effective way to scale up to generation of complex programs from natural language descriptions, achieving state-of-the-art results that well outperform previous code generation and semantic parsing approaches.

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

↑