Lecture 18: Semantic Role Labeling & Semantic Parsing Kai-Wei - - PowerPoint PPT Presentation

lecture 18 semantic role labeling semantic parsing
SMART_READER_LITE
LIVE PREVIEW

Lecture 18: Semantic Role Labeling & Semantic Parsing Kai-Wei - - PowerPoint PPT Presentation

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 1 Computational Semantics v Many high-level applications v


slide-1
SLIDE 1

Lecture 18: Semantic Role Labeling & Semantic Parsing

Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/NLP16

1 CS6501-NLP

slide-2
SLIDE 2

Computational Semantics

v Many high-level applications

vQuestion answering vInformation extraction vInternet bots vSiri/Cortana/Alexa/Google Now vTranslation

v Shallow vs. deep semantics

vCheap, fast, low-level techniques v.s. computational expensive, high-level techniques

CS6501-NLP 2

slide-3
SLIDE 3

Semantic Roles

v Predicates: some words represent events v Arguments: specific roles that involves in the event v PropBank

CS6501-NLP 3

Several other alternative role lexicons

slide-4
SLIDE 4

Semantic Roles

CS6501-NLP 4

His father would come upstairs and stand self-consciously At the foot of the bed and look at his son.

http://cogcomp.cs.illinois.edu/page/demo_view/srl

slide-5
SLIDE 5

Semantic Role Labelling

v Give a sentence, identify predicate frames and annotate semantic roles

CS6501-NLP 5

slide-6
SLIDE 6

Role Identification

CS6501-NLP 6

We can model it as multi-class classification

slide-7
SLIDE 7

Role labeling

CS6501-NLP 7

Conduct constrained inference

slide-8
SLIDE 8

Semantic parsing

v Motivation: programming language

vWhat is the meaning of 3+5*6

CS6501-NLP 8

Examples from Chris Manning’s NLP course

slide-9
SLIDE 9

Semantic parsing

v More complex meaning

v3+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

CS6501-NLP 9

We provide a way to form the semantics from bottom-up

slide-10
SLIDE 10

Semantic Parsing

v Parse a natural language narrative to a machine readable format

vLogic form: John smokes.” “Everyone who smokes snores.” ⇒ ∀x.smoke(x)→snore(x) smoke(John) ⇒ snore(John) vEquations:

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 − 4 = 6 × (n − 4)

CS6501-NLP 10

slide-11
SLIDE 11

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 11

slide-12
SLIDE 12

Logic: 𝜇 terms v𝜇 terms:

square = 𝜇x x*x, square(3) = 3*3 even = 𝜇x (x mod 2 == 0) a predicate v Can take multiple arguments:

𝜇 x.[𝜇 y.times(x,y)]

CS6501-NLP 12

slide-13
SLIDE 13

Parse tree with associated semantics

CS6501-NLP 13

slide-14
SLIDE 14

CS6501-NLP 14

slide-15
SLIDE 15

Paper presentations

v We will learn recent NLP research

vTechniques and applications

v Peer review

vGo to Collab → Select peer grading

CS6501-NLP 15