Building a Semantic Parser Overnight

Slides:



Advertisements
Similar presentations
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Advertisements

COGEX at the Second RTE Marta Tatu, Brandon Iles, John Slavick, Adrian Novischi, Dan Moldovan Language Computer Corporation April 10 th, 2006.
CSA2050: DCG I1 CSA2050 Introduction to Computational Linguistics Lecture 8 Definite Clause Grammars.
COGEX at the Second RTE Marta Tatu, Brandon Iles, John Slavick, Adrian Novischi, Dan Moldovan Language Computer Corporation April 10 th, 2006.
Chapter 4 Syntax.
Statistical NLP: Lecture 3
Playing the Telephone Game: Determining the Hierarchical Structure of Perspective and Speech Expressions Eric Breck and Claire Cardie Department of Computer.
Robust Textual Inference via Graph Matching Aria Haghighi Andrew Ng Christopher Manning.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
1 Words and the Lexicon September 10th 2009 Lecture #3.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
NLP and Speech 2004 Feature Structures Feature Structures and Unification.
Artificial Intelligence 2005/06 From Syntax to Semantics.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Learning syntactic patterns for automatic hypernym discovery Rion Snow, Daniel Jurafsky and Andrew Y. Ng Prepared by Ang Sun
October 2004csa4050: Semantics II1 CSA4050: Advanced Topics in NLP Semantics II The Lambda Calculus Semantic Representation Encoding in Prolog.
1.Syntax: the rules of sentence formation; the component of the mental grammar that represent speakers’ knowledge of the structure of phrase and sentence.
Experiments on Building Language Resources for Multi-Modal Dialogue Systems Goals identification of a methodology for adapting linguistic resources for.
IV. SYNTAX. 1.1 What is syntax? Syntax is the study of how sentences are structured, or in other words, it tries to state what words can be combined with.
Open Information Extraction using Wikipedia
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
Chapter 4 Syntax 4.1 What is syntax?What is syntax? 4.2 CategoriesCategories 4.3 Phrase structure rulePhrase structure rule 4.4 Phrase elementsPhrase.
Natural Language Processing Artificial Intelligence CMSC February 28, 2002.
NLP. Introduction to NLP Is language more than just a “bag of words”? Grammatical rules apply to categories and groups of words, not individual words.
CS774. Markov Random Field : Theory and Application Lecture 19 Kyomin Jung KAIST Nov
A Cascaded Finite-State Parser for German Michael Schiehlen Institut für Maschinelle Sprachverarbeitung Universität Stuttgart
Linguistic Essentials
Building a Semantic Parser Overnight
Parts of Speech Major source: Wikipedia. Adjectives An adjective is a word that modifies a noun or a pronoun, usually by describing it or making its meaning.
Multilingual Opinion Holder Identification Using Author and Authority Viewpoints Yohei Seki, Noriko Kando,Masaki Aono Toyohashi University of Technology.
Making it stick together…
Artificial Intelligence 2004
1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)
Natural Language Processing Slides adapted from Pedro Domingos
Lexical Semantics Fall Lexicon Collection of Words Collection of Words Mental store of information about words and morphemes Mental store of information.
NLP. Introduction to NLP (U)nderstanding and (G)eneration Language Computer (U) Language (G)
Exploiting Named Entity Taggers in a Second Language Thamar Solorio Computer Science Department National Institute of Astrophysics, Optics and Electronics.
April 2010Semantic Grammar1 A short guide to Blackburn’s Grammar of English.
3.3 A More Detailed Look At Transformations Inversion (revised): Move Infl to C. Do Insertion: Insert interrogative do into an empty.
Lec. 10.  In this section we explain which constituents of a sentence are minimally required, and why. We first provide an informal discussion and then.
Chapter 4 Syntax a branch of linguistics that studies how words are combined to form sentences and the rules that govern the formation of sentences.
Natural Language Processing Vasile Rus
Structure, Constituency & Movement
Lecture – VIII Monojit Choudhury RS, CSE, IIT Kharagpur
A Brief Introduction to Distant Supervision
Lecture 3 Krisztina Szécsényi
Statistical NLP: Lecture 3
Authorship Attribution Using Probabilistic Context-Free Grammars
Semantic Parsing for Question Answering
Kenneth Baclawski et. al. PSB /11/7 Sa-Im Shin
Reading Report Semantic Parsing (续)
Natural Language Processing
Reading Report: Open QA Systems
Reading Report Semantic Parsing: Sempre (自始至终)
Syntax.
Learning to Transform Natural to Formal Languages
Data Recombination for Neural Semantic Parsing
Probabilistic and Lexicalized Parsing
CSC 594 Topics in AI – Applied Natural Language Processing
Language Variations: Japanese and English
Compilers B V Sai Aravind (11CS10008).
Learning to Parse Database Queries Using Inductive Logic Programming
Relations & Functions Unit 2, Lesson 1.
The Distributive Property
Linguistic Essentials
Ling 566 Oct 14, 2008 How the Grammar Works.
Template-based Question Answering over RDF Data
Artificial Intelligence 2004 Speech & Natural Language Processing
Progress report on Semantic Role Labeling
NLP.
Presentation transcript:

Building a Semantic Parser Overnight

Overnight framework

Which country has the highest CO2 emissions? Which had the highest increase since last year? What fraction is from the five countries with highest GDP?

Training data

The data problem: The main database is 600 samples (GEO880) To compare: Labeled photos: millions מאיפה הדאטא הקיים מגיע?

Not only quantity: The data can lack critical functionality

The process Domain Seed lexicon Logical forms and canonical utterances Paraphrases Semantic parser

The data base: Triples (e1, p, e2) e1 and e2 are entities (e.g., article1, 2015) p is a property (e.g., publicationDate)

Seed lexicon For every property, a lexical entry of the form <t → s[p]> t is a natural language phrase and s is a syntactic category < “publication date” → RELNP[publicationDate]>

Seed lexicon In addition, L contains two typical entities for each semantic type in the database <alice → NP[alice]>

Unary TYPENP ENTITYNP Verb phrases VP ( “has a private bath”) Binaries: RELNP functional properties (e.g., “publication date”) VP/NP transitive verbs (“cites”, “is the president of”)

Grammar <α1 . . . αn → s[z]> α1 . . . αn tokens or categories, s is a syntactic category z is the logical form constructed

Grammar <RELNP[r] of NP[x] → NP[R(r).x]> Z: R(publicationDate).article1 C: “publication date of article 1”

Crowdsourcing X: “when was article 1 published?” D = {(x, c, z)} for each (z, c) ∈ GEN(G ∪ L) and x ∈ P(c)

Training log-linear distribution pθ(z, c | x, w)

Under the hood

Lambda DCS Entity: singleton set {e} Property: set of pairs (e1, e2)

Lambda DCS binary b and unary u join b.u 𝑒 2 ∈ 𝑢 𝑤 𝑒 1 , 𝑒 2 ∈ 𝑏 𝑤

Lambda DCS ¬u 𝑢 1 ∪ 𝑢 2 𝑢 1 ∩ 𝑢 2

Lambda DCS R(b) (e1, e2) ∈ [b] -> (e2, e1) ∈ [R(b)]

Lambda DCS count(u) sum(u) average(u, b) argmax(u, b)

Lambda DCS λx.u is a set of (e1, e2): e1 ∈ [u[x/e2]]w R(λx.count(R(cites).x)) (e1, e2), where e2 is the number of entities that e1 cites.

Seed lexicon for the SOCIAL domain

Seed lexicon article publication date cites won an award

Grammar Assumption 1 (Canonical compositionality): Using a small grammar, all logical forms expressible in natural language can be realized compositionally based on the logical form.

Grammar Functionality-driven Generate superlatives, comparatives, negation, and coordination

Grammar

Grammar From seed: types, entities, and properties noun phrases (NP) verbs phrases (VP) complementizer phrase (CP) “that cites Building a Semantic Parser Overnight” “that cites more than three article”

Grammar

Grammar

Grammar

Paraphrasing “meeting whose attendee is alice” ⇒ “meeting with alice” “author of article 1” ⇒ “who wrote article 1” “player whose number of points is 15” ⇒ “player who scored 15 points”

Paraphrasing “article that has the largest publication date ⇒ newest article”. “housing unit whose housing type is apartment ⇒ apartment” “university of student alice whose field of study is music” ⇒ “At which university did Alice study music?”, “Which university did Alice attend?”

Sublexical compositionality “parent of alice whose gender is female ⇒ mother of alice”. “person that is author of paper whose author is X ⇒ co-author of X” “person whose birthdate is birthdate of X ⇒ person born on the same day as X”. “meeting whose start time is 3pm and whose end time is 5pm ⇒ meetings between 3pm and 5pm” “that allows cats and that allows dogs ⇒ that allows pets” “author of article that article whose author is X cites ⇒ who does X cite”.

Crowdsourcing in numbers Each turker paraphrased 4 utterances 28 seconds on average per paraphrase 38,360 responses 26,098 examples remained

Paraphrasing noise in the data 17% noise in the data 17% (“player that has the least number of team ⇒ player with the lowest jersey number”) (“restaurant whose star rating is 3 stars ⇒ hotel which has a 3 star rating”).

Model and Learning numbers, dates, and database entities first

Model and Learning (z, c) ∈ GEN(G ∪ Lx) 𝑝 𝜃 ( z, c | x, w) ∝ exp(φ(c, z, x, w) >θ)

Floating parser

Floating parser

Floating parser

Floating parser

Model and Learning Features

Model and Learning 𝑥,𝑐,𝑧∈𝐷 𝑙𝑜𝑔 𝑝 θ 𝑧,𝑐 𝑥,𝑤 −𝜆 𝜃 1 𝑥,𝑐,𝑧∈𝐷 𝑙𝑜𝑔 𝑝 θ 𝑧,𝑐 𝑥,𝑤 −𝜆 𝜃 1 AdaGrad (Duchi et al., 2010)

Experimental Evaluation