Language to Code: Learning Semantic Parsers for If-This-Then-That Recipes

11924

Authors

nan

Abstract

Using natural language to write programs is a touchstone problem for computational linguistics. We present an approach that learns to map natural-language descrip- tions of simple “if-then” rules to executable code. By training and testing on a large cor- pus of naturally-occurring programs (called “recipes”) and their natural language de- scriptions, we demonstrate the ability to effectively map language to code. We compare a number of semantic parsing ap- proaches on the highly noisy training data collected from ordinary users, and find that loosely synchronous systems perform best. 1

Keywords

nan

Full Content

Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing, pages 878–888, Beijing, China, July 26-31, 2015. c⃝2015 Association for Computational Linguistics Language to Code: Learning Semantic Parsers for If-This-Then-That Recipes Chris Quirk Microsoft Research Redmond, WA, USA chrisq@microsoft.com Raymond Mooney∗ UT Austin Austin TX, USA mooney@cs.utexas.edu Michel Galley Microsoft Research Redmond, WA, USA mgalley@microsoft.com Abstract Using natural language to write programs is a touchstone problem for computational linguistics. We present an approach that learns to map natural-language descrip- tions of simple “if-then” rules to executable code. By training and testing on a large cor- pus of naturally-occurring programs (called “recipes”) and their natural language de- scriptions, we demonstrate the ability to effectively map language to code. We compare a number of semantic parsing ap- proaches on the highly noisy training data collected from ordinary users, and find that loosely synchronous systems perform best. 1 Introduction The ability to program computers using natural lan- guage would clearly allow novice users to more effectively utilize modern information technology. Work in semantic parsing has explored mapping natural language to some formal domain-specific programming languages such as database queries (Woods, 1977; Zelle and Mooney, 1996; Berant et al., 2013), commands to robots (Kate et al., 2005), operating systems (Branavan et al., 2009), smart- phones (Le et al., 2013), and spreadsheets (Gulwani and Marron, 2014). Developing such language- to-code translators has generally required specific dedicated efforts to manually construct parsers or large corpora of suitable training examples. An interesting subset of the possible program space is if-then “recipes,” simple rules that allow users to control many aspects of their digital life including smart devices. Automatically parsing ∗Work performed while visiting Microsoft Research. these recipes represents a step toward complex nat- ural language programming, moving beyond single commands toward compositional statements with control flow. Several services, such as Tasker and IFTTT, al- low users to create simple programs with “triggers” and “actions.” For example, one can program their Phillips Hue light bulbs to flash red and blue when the Cubs hit a home run. A somewhat complicated GUI allows users to construct these recipes based on a set of information “channels.” These chan- nels represent many types of information. Weather, news, and financial services have provided constant updates through web services. Home automation sensors and controllers such as motion detectors, thermostats, location sensors, garage door openers, etc. are also available. Users can then describe the recipes they have constructed in natural language and publish them. Our goal is to build semantic parsers that al- low users to describe recipes in natural language and have them automatically mapped to exe- cutable code. We have collected 114,408 recipe- description pairs from the http://ifttt.com website. Because users often provided short or incomplete English descriptions, the resulting data is extremely noisy for the task of training a semantic parser. Therefore, we have constructed semantic-parser learners that utilize and adapt ideas from several previous approaches (Kate and Mooney, …

Content truncated to 500 words

Labeled Text

Using natural language to write programs is a touchstone problem for computational linguistics. We present an approach that learns to map natural-language descriptions of simple “if-then” rules to executable code. By training and testing on a large corpus of naturally-occurring programs (called “recipes”) and their natural language descriptions, we demonstrate the ability to effectively map language to code. We compare a number of semantic parsing approaches on the highly noisy training data collected from ordinary users, and find that loosely synchronous systems perform best. 1

Publication Details

Paper ID:
11924
Year:
2015
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan