xử lý ngôn ngữ tự nhiên,kai wei chang,www cs virginia edu Lecture 18 Semantic Role Labeling & Semantic Parsing Kai Wei Chang CS @ University of Virginia kw@kwchang net Couse webpage http //kwchang net[.]
Lecture 18: Semantic Role Labeling & Semantic Parsing Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/NLP16 CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Computational Semantics v Many high-level applications v Question answering v Information extraction v Internet bots v Siri/Cortana/Alexa/Google Now v Translation v Shallow vs deep semantics v Cheap, fast, low-level techniques v.s computational expensive, high-level techniques CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Semantic Roles v Predicates: some words represent events v Arguments: specific roles that involves in the event v PropBank Several other alternative role lexicons CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt http://cogcomp.cs.illinois.edu/page/demo_view/srl Semantic Roles His father would come upstairs and stand self-consciously At the foot of the bed and look at his son CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Semantic Role Labelling v Give a sentence, identify predicate frames and annotate semantic roles CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Role Identification We can model it as multi-class classification CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Role labeling Conduct constrained inference CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Semantic parsing v Motivation: programming language v What is the meaning of 3+5*6 Examples from Chris Manning’s NLP course CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Semantic parsing v More complex meaning v 3+5*x: we don’t know x at the compile time v “Meaning” at a node is a piece of code v Form is “rule-to-rule” translation We provide a way to form the semantics from bottom-up CS6501-NLP CuuDuongThanCong.com https://fb.com/tailieudientucntt Semantic Parsing v Parse a natural language narrative to a machine readable format v Logic form: John smokes.” “Everyone who smokes snores.” ⇒ ∀x.smoke(x)→snore(x) smoke(John) ⇒ snore(John) v Equations: Maria is now four times as old as Kate Four years ago, Maria was six times as old as Kate Find their ages now m=4×n m − = × (n − 4) CS6501-NLP CuuDuongThanCong.com 10 https://fb.com/tailieudientucntt Logic v Boolean: semantic values of sentences v Entities: e.g., objects, times, etc v Function of various types A function returning a boolean called “predicate” e.g., green (x) Function can return other functions or take functions as arguments CS6501-NLP CuuDuongThanCong.com 11 https://fb.com/tailieudientucntt Logic: 𝜆 terms v𝜆 terms: square = 𝜆x x*x, square(3) = 3*3 even = 𝜆x (x mod == 0) a predicate v Can take multiple arguments: 𝜆 x.[𝜆 y.times(x,y)] CS6501-NLP CuuDuongThanCong.com 12 https://fb.com/tailieudientucntt Parse tree with associated semantics CS6501-NLP CuuDuongThanCong.com 13 https://fb.com/tailieudientucntt CS6501-NLP CuuDuongThanCong.com 14 https://fb.com/tailieudientucntt Paper presentations v We will learn recent NLP research v Techniques and applications v Peer review v Go to Collab → Select peer grading CS6501-NLP CuuDuongThanCong.com 15 https://fb.com/tailieudientucntt ...