In plain words: The system turns plain-English instructions into Python by building code step by step along the language's grammar rules, instead of writing it out like ordinary text. This handled complex programs better than earlier code-generation and sentence-to-code systems.
Abstract
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.
Pengcheng Yin, Graham Neubig
arXiv:1704.01696 · cs.CL, cs.PL, cs.SE · submitted Apr 6, 2017
abstract · pdf · html · To appear in ACL 2017