Polyglot Semantic Parsing in APIs

22311

Authors

nan

Abstract

AbstractTraditional approaches to semantic parsing (SP) work by training individual models for each available parallel dataset of text-meaning pairs. In this paper, we explore the idea of polyglot semantic translation, or learning semantic parsing models that are trained on multiple datasets and natural languages. In particular, we focus on translating text to code signature representations using the software component datasets of Richardson and Kuhn (2017b,a). The advantage of such models is that they can be used for parsing a wide variety of input natural languages and output programming languages, or mixed input languages, using a single unified model. To facilitate modeling of this type, we develop a novel graph-based decoding framework that achieves state-of-the-art performance on the above datasets, and apply this method to two other benchmark SP tasks.

Keywords

nan

Full Content

Proceedings of NAACL-HLT 2018, pages 720–730 New Orleans, Louisiana, June 1 - 6, 2018. c⃝2018 Association for Computational Linguistics Polyglot Semantic Parsing in APIs Kyle Richardson†, Jonathan Berant‡, Jonas Kuhn† †Institute for Natural Language Processing, University of Stuttgart, Germany {kyle,jonas}@ims.uni-stuttgart.de ‡Tel-Aviv University, Israel joberant@cs.tau.ac.il Abstract Traditional approaches to semantic parsing (SP) work by training individual models for each available parallel dataset of text-meaning pairs. In this paper, we explore the idea of polyglot semantic translation, or learning se- mantic parsing models that are trained on mul- tiple datasets and natural languages. In par- ticular, we focus on translating text to code signature representations using the software component datasets of Richardson and Kuhn (2017a,b). The advantage of such models is that they can be used for parsing a wide va- riety of input natural languages and output programming languages, or mixed input lan- guages, using a single unified model. To fa- cilitate modeling of this type, we develop a novel graph-based decoding framework that achieves state-of-the-art performance on the above datasets, and apply this method to two other benchmark SP tasks. 1 Introduction Recent work by Richardson and Kuhn (2017a,b); Miceli Barone and Sennrich (2017) considers the problem of translating source code documentation to lower-level code template representations as part of an effort to model the meaning of such doc- umentation. Example documentation for a number of programming languages is shown in Figure 1, where each docstring description in red describes a given function (blue) in the library. While cap- turing the semantics of docstrings is in general a difficult task, learning the translation from de- scriptions to formal code representations (e.g., for- mal representations of functions) is proposed as a reasonable first step towards learning more gen- eral natural language understanding models in the software domain. Under this approach, one can view a software library, or API, as a kind of par- allel translation corpus for studying text → code or code → text translation. 1. (en, Java) Documentation *Returns the greater of two long values public static long max(long a, long b) 2. (en, Python) Documentation max(self, a, b): """Compares two values numerically and returns the maximum""" 3. (en, Haskell) Documentation --| "The largest element of a non-empty structure" maximum :: forall z. Ord a a => t a -> a 4. (de, PHP) Documentation *gibt den gr¨oßeren dieser Werte zur¨uck. max (mixed $value1, mixed $value2) Figure 1: Example source code documentation. Richardson and Kuhn (2017b) extracted the standard library documentation for 10 popular programming languages across a number of natu- ral languages to study the problem of text to func- tion signature translation. Initially, these datasets were proposed as a resource for studying semantic parser induction (Mooney, 2007), or for building models that learn to translate text to formal mean- ing representations from parallel data. In follow- up work (Richardson and Kuhn, 2017a), they pro- posed using the resulting models to do automated question-answering (QA) and code retrieval on target APIs, and experimented with an additional set of …

Content truncated to 500 words

Labeled Text

AbstractTraditional approaches to semantic parsing (SP) work by training individual models for each available parallel dataset of text-meaning pairs. In this paper, we explore the idea of polyglot semantic translation, or learning semantic parsing models that are trained on multiple datasets and natural languages. In particular, we focus on translating text to code signature representations using the software component datasets of Richardson and Kuhn (2017b,a). The advantage of such models is that they can be used for parsing a wide variety of input natural languages and output programming languages, or mixed input languages, using a single unified model. To facilitate modeling of this type, we develop a novel graph-based decoding framework that achieves state-of-the-art performance on the above datasets, and apply this method to two other benchmark SP tasks.

Publication Details

Paper ID:
22311
Year:
2018
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan