Semantic Parsing for Question Answering

Slides:



Advertisements
Similar presentations
Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
Advertisements

University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Learning Semantic Parsers Using Statistical.
Proceedings of the Conference on Intelligent Text Processing and Computational Linguistics (CICLing-2007) Learning for Semantic Parsing Advisor: Hsin-His.
UNIT-III By Mr. M. V. Nikum (B.E.I.T). Programming Language Lexical and Syntactic features of a programming Language are specified by its grammar Language:-
1 Unsupervised Semantic Parsing Hoifung Poon and Pedro Domingos EMNLP 2009 Best Paper Award Speaker: Hao Xiong.
111 CS 388: Natural Language Processing: Semantic Parsing Raymond J. Mooney University of Texas at Austin.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Defining practical programming languages Carlos Varela RPI.
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Introduction to Computational Linguistics Lecture 2.
Retrieval Evaluation. Introduction Evaluation of implementations in computer science often is in terms of time and space complexity. With large document.
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
ANSWERING CONTROLLED NATURAL LANGUAGE QUERIES USING ANSWER SET PROGRAMMING Syeed Ibn Faiz.
1 Learning to Interpret Natural Language Navigation Instructions from Observation Ray Mooney Department of Computer Science University of Texas at Austin.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
Empirical Methods in Information Extraction Claire Cardie Appeared in AI Magazine, 18:4, Summarized by Seong-Bae Park.
Machine Learning Group Department of Computer Sciences University of Texas at Austin Learning Language Semantics from Ambiguous Supervision Rohit J. Kate.
Author: William Tunstall-Pedoe Presenter: Bahareh Sarrafzadeh CS 886 Spring 2015.
1 Learning for Semantic Parsing Using Statistical Syntactic Parsing Techniques Ruifang Ge Ph.D. Final Defense Supervisor: Raymond J. Mooney Machine Learning.
Learning to Transform Natural to Formal Language Presented by Ping Zhang Rohit J. Kate, Yuk Wah Wong, and Raymond J. Mooney.
David L. Chen Fast Online Lexicon Learning for Grounded Language Acquisition The 50th Annual Meeting of the Association for Computational Linguistics (ACL)
1 Semi-Supervised Approaches for Learning to Parse Natural Languages Rebecca Hwa
CSE314 Database Systems The Relational Algebra and Relational Calculus Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
David L. Chen and Raymond J. Mooney Department of Computer Science The University of Texas at Austin Learning to Interpret Natural Language Navigation.
Indirect Supervision Protocols for Learning in Natural Language Processing II. Learning by Inventing Binary Labels This work is supported by DARPA funding.
University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Learning for Semantic Parsing Raymond.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Learning a Compositional Semantic Parser.
Mining Dependency Relations for Query Expansion in Passage Retrieval Renxu Sun, Chai-Huat Ong, Tat-Seng Chua National University of Singapore SIGIR2006.
Natural Language Generation with Tree Conditional Random Fields Wei Lu, Hwee Tou Ng, Wee Sun Lee Singapore-MIT Alliance National University of Singapore.
Wei Lu, Hwee Tou Ng, Wee Sun Lee National University of Singapore
Instructor: Nick Cercone CSEB - 1 Parsing and Context Free Grammars Parsers, Top Down, Bottom Up, Left Corner, Earley.
University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Learning for Semantic Parsing of Natural.
GoRelations: an Intuitive Query System for DBPedia Lushan Han and Tim Finin 15 November 2011
Syntax Analysis Or Parsing. A.K.A. Syntax Analysis –Recognize sentences in a language. –Discover the structure of a document/program. –Construct (implicitly.
Language Identification and Part-of-Speech Tagging
Ensembling Diverse Approaches to Question Answering
A Kernel-based Approach to Learning Semantic Parsers
CSC 594 Topics in AI – Natural Language Processing
Parsing Recommended Reading: Ch th Jurafsky & Martin 2nd edition
Compiler Design (40-414) Main Text Book:
Approaches to Machine Translation
Raymond J. Mooney University of Texas at Austin
Overview of Compilation The Compiler Front End
Overview of Compilation The Compiler Front End
Authorship Attribution Using Probabilistic Context-Free Grammars
Kenneth Baclawski et. al. PSB /11/7 Sa-Im Shin
Compiler Construction
Using String-Kernels for Learning Semantic Parsers
CS416 Compiler Design lec00-outline September 19, 2018
Learning to Transform Natural to Formal Languages
Data Recombination for Neural Semantic Parsing
Integrating Learning of Dialog Strategies and Semantic Parsing
Lecture 2: General Structure of a Compiler
Ensembling Diverse Approaches to Question Answering
CS 388: Natural Language Processing: Syntactic Parsing
Donna M. Gates Carnegie Mellon University
Natural Language - General
CS 388: Natural Language Processing: Semantic Parsing
Parsing and More Parsing
Lecture 7: Introduction to Parsing (Syntax Analysis)
Lecture 8: Top-Down Parsing
Eiji Aramaki* Sadao Kurohashi* * University of Tokyo
Learning to Parse Database Queries Using Inductive Logic Programming
Learning to Sportscast: A Test of Grounded Language Acquisition
Approaches to Machine Translation
Question Answering & Linked Data
CS416 Compiler Design lec00-outline February 23, 2019
CS246: Information Retrieval
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
David Kauchak CS159 – Spring 2019
Presentation transcript:

Semantic Parsing for Question Answering Raymond J. Mooney University of Texas at Austin 1 1 1 1

Semantic Parsing Semantic Parsing: Transforming natural language (NL) sentences into completely formal logical forms or meaning representations (MRs). Sample application domains where MRs are directly executable by another computer system to perform some task. Database/knowledge-graph queries Robot command language

Geoquery: A Database Query Application Query application for U.S. geography database containing about 800 facts [Zelle & Mooney, 1996] Which rivers run through the states bordering Texas? Arkansas, Canadian, Cimarron,  Gila, Mississippi, Rio Grande … Answer Semantic Parsing Query answer(traverse(next_to(stateid(‘texas’)))) answer(traverse(next_to(stateid(‘texas’)))) answer(traverse(next_to(stateid(‘texas’))))

Predicate Logic Query Language Most existing work on computational semantics is based on predicate logic What is the smallest state by area? answer(x1,smallest(x2,(state(x1),area(x1,x2)))) x1 is a logical variable that denotes “the smallest state by area” 4 4

Functional Query Language (FunQL) Transform a logical language into a functional, variable-free language (Kate et al., 2005) What is the smallest state by area? answer(x1,smallest(x2,(state(x1),area(x1,x2)))) answer(smallest_one(area_1(state(all)))) 5 5

Learning Semantic Parsers Manually programming robust semantic parsers is difficult due to the complexity of the task. Semantic parsers can be learned automatically from sentences paired with their logical form. NLMR Training Exs Semantic-Parser Learner Semantic Parser Natural Language Meaning Rep

Compositional Semantics Approach to semantic analysis based on building up an MR compositionally based on the syntactic structure of a sentence. Build MR recursively bottom-up from the parse tree. BuildMR(parse-tree) If parse-tree is a terminal node (word) then return an atomic lexical meaning for the word. Else For each child, subtreei, of parse-tree Create its MR by calling BuildMR(subtreei) Return an MR by properly combining the resulting MRs for its children into an MR for the overall parse-tree.

Composing MRs from Parse Trees What is the capital of Ohio? S answer(capital(loc_2(stateid('ohio')))) VP NP answer() capital(loc_2(stateid('ohio'))) V NP  capital(loc_2(stateid('ohio'))) WP answer() VBZ DT N PP What   capital() loc_2(stateid('ohio')) answer() is the capital IN NP loc_2() stateid('ohio')   capital() of NNP stateid('ohio') loc_2() Ohio stateid('ohio')

Disambiguation with Compositional Semantics The composition function that combines the MRs of the children of a node, can return  if there is no sensible way to compose the children’s meanings. Could compute all parse trees up-front and then compute semantics for each, eliminating any that ever generate a  semantics for any constituent. More efficient method: When filling (CKY) chart of syntactic phrases, also compute all possible compositional semantics of each phrase as it is constructed and make an entry for each. If a given phrase only gives  semantics, then remove this phrase from the table, thereby eliminating any parse that includes this meaningless phrase.

Composing MRs from Parse Trees What is the capital of Ohio? S VP NP V NP WP VBZ DT N PP What  is the capital IN NP loc_2() riverid('ohio') of NNP riverid('ohio') loc_2() Ohio riverid('ohio')

Composing MRs from Parse Trees What is the capital of Ohio? S VP NP  V NP PP WP  capital() loc_2(stateid('ohio')) IN NP stateid('ohio') What VBZ DT N loc_2()   capital() of NNP stateid('ohio') is the capital loc_2()   capital() Ohio stateid('ohio')

Experimental Corpora GeoQuery [Zelle & Mooney, 1996] 250 queries for the given U.S. geography database 6.87 words on average in NL sentences 5.32 tokens on average in formal expressions Also translated into Spanish, Turkish, & Japanese. It’s test on Clang corpora. It’s also tested on an benchmark corpora of semantic parsing. - Geoquery example: how many cities are there in the US? 12 12

Experimental Methodology Evaluated using standard 10-fold cross validation Correctness CLang: output exactly matches the correct representation Geoquery: the resulting query retrieves the same answer as the correct representation Metrics Geoquery – using the same evaluation method in previous papers Why not using partial match: doesn’t make sense, player 2 instead of player 3, left instead of right Animation, first show correct, then wrong Explain what’s precision, what’s recall 13 13

Precision Learning Curve for GeoQuery 14 14

Recall Learning Curve for Geoquery 15 15

Precision Learning Curve for GeoQuery (WASP) 16 16

Recall Learning Curve for GeoQuery (WASP) 17 17

Conclusions Semantic parsing maps NL sentences to completely formal computer language. Semantic parsers can be effectively learned from supervised corpora consisting of only sentences paired with their formal representations. Can reduce supervision demands by training on questions and answers rather than formal representations. Results on FreeBase queries and queries to corpora of web tables. Full question answering is finally taking off as an application due to: Availability of large scale, open databases such as FreeBase, DBPedia, Google Knowledge Graph, Bing Satori Availability of speech interfaces that allow more natural entry of full NL questions.