Graph Algebraic Combinatory Categorial Grammar
Total Page:16
File Type:pdf, Size:1020Kb
Graph Algebraic Combinatory Categorial Grammar Sebastian Beschke Wolfgang Menzel Department of Informatics University of Hamburg Vogt-Kölln-Straße 30, 22527 Hamburg, Germany {beschke,menzel}@informatik.uni-hamburg.de Abstract large amounts of computational resources during parsing. One central contribution of this paper is This paper describes CCG/AMR, a novel a lexicon induction algorithm that produces a rel- grammar for semantic parsing of Abstract Meaning Representations. CCG/AMR equips atively compact lexicon. Combinatory Categorial Grammar derivations Combinatory Categorial Grammar (CCG) uses with graph semantics by assigning each CCG a transparent syntax-semantic interface that con- combinator an interpretation in terms of a structs meaning representations using λ-calculus. graph algebra. This makes lexicon induction challenging, as in- We provide an algorithm that induces a ducing λ-calculus terms essentially requires solv- CCG/AMR from a corpus and show that it cre- ing higher-order unification (Kwiatkowski et al., ates a compact lexicon with low ambiguity and 2010). In practice, heuristics are employed to achieves a robust coverage of 78% of the ex- manage the search space, but it would be prefer- amined sentences under ideal conditions. able to make use of a less powerful mechanism We also identify several phenomena that affect which better fits the problem domain. Graph alge- any approach relying either on CCG or graph bras such as the HR algebra (Courcelle and Engel- algebraic approaches for AMR parsing. This friet, 2012) constitute such a constrained mecha- includes differences of representation between CCG and AMR, as well as non-compositional nism. By combining CCG with the HR algebra, constructions that are not expressible through we are able to leverage the availability of syntac- a monotonic construction process. To our tic parsers for CCG while making use of tailored knowledge, this paper provides the first anal- semantic construction operations. ysis of these corpus issues. 1.1 Related Work 1 Introduction There is an extensive body of work on seman- With the release of the Abstract Meaning Rep- tic parsing of AMRs, using a range of techniques resentation (AMR) corpus (Knight et al., 2014), including maximum spanning tree-based parsing graph representations of meaning have taken cen- (Flanigan et al., 2014), transition-based parsing tre stage in research on semantic parsing. Se- (Wang et al., 2015; Ballesteros and Al-Onaizan, mantic parsing systems have to address the prob- 2017; Peng et al., 2018), machine translation (van lem of lexicon induction: extracting reusable lexi- Noord and Bos, 2017), graph grammars (Peng cal items from the sentential meaning representa- et al., 2015; Groschwitz et al., 2017), and CCG tions annotated in the AMR corpus. Since the cor- parsing (Artzi et al., 2015; Misra and Artzi, 2016). pus contains sentential meaning representations, The system of Artzi et al.(2015) is most sim- but no indication of their compositional structure, ilar to the present work. They induce a semantic derivations of the meaning representation cannot CCG using a translation of AMR into λ-calculus. be observed. Common approaches enumerate A key difference is that their training algorithm all conceivable lexical items that may have con- combines lexicon induction and parameter train- tributed to the derivation of the meaning represen- ing into a single phase. New lexical items are tation at hand (Artzi et al., 2015; Groschwitz et al., generated during each training step and then fil- 2017). This may produce very large lexicons with tered based upon the model’s current parameters. high degrees of ambiguity, and therefore require In contrast, in this work we focus on lexicon in- 54 Proceedings of the 7th Joint Conference on Lexical and Computational Semantics (*SEM), pages 54–64 New Orleans, June 5-6, 2018. c 2018 Association for Computational Linguistics duction, with parameter training to be performed 2.1 Combinatory Categorial Grammar in a subsequent step. CCG is a grammar formalism centered around a Another related system is presented in Lewis transparent syntax-semantics interface (Steedman, et al.(2015), where a CCG parser is adapted to 2000). A CCG consists of a small set of combina- produce shallow semantic dependency graphs. In tory rules, along with a lexicon of entries defining contrast, the meaning representations employed each word’s syntactic and semantic interpretation. here are abstract and do not directly refer to the A CCG lexical item, as used in this paper, con- sentence under analysis. tains one or several tokens, a syntactic category, Word-to-node alignments on the AMR corpus and a semantic category. The syntactic category is play an important role in this work. We exper- a functional type defining the types of arguments iment with JAMR’s rule-based aligner (Flanigan expected by the words and whether they are ex- et al., 2014) and the statistical ISI aligner (Pour- pected to the left or right. E.g., NP/N expects a damghani et al., 2014). noun (N) to the right (because of the rightward- Graph algebras have recently been applied to facing slash) and returns an NP – it is the type of AMR parsing (Koller, 2015; Groschwitz et al., determiners. (S NP) / NP is the category of tran- \ 2017), but not in combination with CCG. In con- sitive verbs, consuming first an NP from the right trast, we use syntactic CCG derivations to con- and then from the left, and returning a sentence. strain the space of possible derivations. However, See Figure 1a for an example. the idea of using a constrained version of the HR CCG derivations are created by recursively ap- algebra, introduced by Groschwitz et al.(2017), plying combinators to the lexical syntactic cate- is also used here, and our Application operator ef- gories, thus combining them into constituents. Be- fectively subsumes their Apply and Modify opera- sides Application, implementations of CCG also tions. use other combinators such as Composition, as well as specialized combinators for conjunctions 1.2 Tools and punctuation. Syntax parser We use EasyCCG (Lewis and Semantic categories are represented as λ- Steedman, 2014) to obtain syntax derivations. For calculus terms. A combinator is always applied robustness, we extract the ten best derivations to two constituents’ syntactic and semantic cate- produced by EasyCCG based on the CCGBank- gories at the same time, allowing semantic con- rebanked model (Honnibal et al., 2010). struction to be fully syntax-driven. Word-to-node alignments During lexicon induction, we make use of alignments between to- 2.2 Abstract Meaning Representation kens in the sentence and nodes in the meaning rep- The Abstract Meaning Representation (AMR) is resentation. We experiment with JAMR’s aligner a semantic meaning representation language that (Flanigan et al., 2014) and the ISI aligner (Pour- is purposefully syntax-agnostic (Banarescu et al., damghani et al., 2014). 2013). The data set used in this paper, the AMR We use Stanford CoreNLP (Man- Other tools 1.0 release (Knight et al., 2014), consists of En- ning et al., 2014) for tokenisation. glish sentences which have been directly anno- tated with meaning representations by human an- 2 Background notators. The task of semantic parsing is concerned with AMR represents meaning as labeled, directed building formal meaning representations for natu- graphs. Nodes are labeled with concepts, while ral language text. While meaning representations edges represent roles. Predicates and core roles can be elements of any formal language, in this pa- are drawn from PropBank (Kingsbury and Palmer, per we are concerned with Abstract Meaning Rep- 2002). In addition, a set of non-core roles has been resentations (AMRs). We use Combinatory Cat- defined, such as mod, poss, time, etc. egorial Grammar (CCG) as an underlying frame- Whether it was wise to define AMR indepen- work to explain how AMRs may be derived from dently of any derivational process has been de- the surface form words. To do so, we equip CCG bated (Bender et al., 2015), and in Section5 we with graph construction operators drawn from the will show some of the issues that arise when at- HR algebra. These concepts are introduced below. tempting to construct derivations for AMRs. 55 met and married (S NP)/NP conj (S NP)/NP The boy wants to sleep \ root root \ root meeth i andh i marryh i NP (S NP)/(S NP) S NP ARG0 ARG1 op1 op2 ARG0 ARG1 \ root\ \ root h i h i 0 1 0 1 0 1 want sleep h i h i h i h i h i h i ARG0 ARG1 ARG0 conj root boyh i 0 1 0 ((S NP)/NP) ((S NP)/NP) h i h i h i \ root \ \ > op1 h i S NP and op2 \ 2 marry root h i wanth i ARG0 ARG1 0 1 ARG0 ARG1 h i h i ARG0 0 sleep < h i (S NP)/NP) < \ S root op1 andh i op2 root wanth i meet ARG1 marry ARG0 ARG1 ARG0 ARG1 ARG0 boy sleep 0 ARG0 1 h i h i (a) Example for a derivation making use of two (b) Example for a derivation containing one Conjunction Application operations. and one Application operation. Step 1: Application. Insert sleep node into Step 1: Conjunction. Insert marry node into placeholder placeholder 1 ; merge 0 placeholders. 1 of and; shift placeholder 0 of and to 2 . Step 2: Application.h i Inserth i boy into placeholder Steph i 2: Application of the phraseh i and marriedh i to met; the 0 . operands’ same-numbered placeholders are merged. h i Figure 1: Examples for the semantic operations Application and Conjunction. 2.3 The HR Algebra 3 Graph Semantics for CCG During semantic parsing, a complete meaning rep- In CCG, semantic construction is syntax-driven in resentation needs to be built out of smaller compo- that the construction operations that are applied nents.