Lecture 18: Semantic Role Labeling & Semantic...

Preview:

Citation preview

Lecture 18: Semantic Role Labeling &

Semantic Parsing

Kai-Wei ChangCS @ University of Virginia

kw@kwchang.net

Couse webpage: http://kwchang.net/teaching/NLP16

1CS6501-NLP

Computational Semantics

vMany high-level applicationsvQuestion answeringv Information extractionv Internet botsvSiri/Cortana/Alexa/Google NowvTranslation

vShallow vs. deep semanticsvCheap, fast, low-level techniques v.s.

computational expensive, high-level techniques

CS6501-NLP 2

Semantic Roles

vPredicates: some words represent eventsvArguments: specific roles that involves in

the eventvPropBank

CS6501-NLP 3

Severalotheralternativerolelexicons

Semantic Roles

CS6501-NLP 4

Hisfatherwouldcomeupstairsandstandself-consciouslyAtthefootofthebedandlookathisson.

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

Semantic Role Labelling

vGive a sentence, identify predicate frames and annotate semantic roles

CS6501-NLP 5

Role Identification

CS6501-NLP 6

Wecanmodelitasmulti-classclassification

Role labeling

CS6501-NLP 7

Conductconstrainedinference

Semantic parsing

vMotivation: programming language vWhat is the meaning of 3+5*6

CS6501-NLP 8

ExamplesfromChrisManning’sNLPcourse

Semantic parsing

vMore complex meaningv3+5*x: we don’t know x at the compile time

v “Meaning” at a nodeis a piece of code

vForm is “rule-to-rule”translation

CS6501-NLP 9

Weprovideawaytoformthesemanticsfrombottom-up

Semantic Parsing

vParse a natural language narrative to a machine readable formatvLogic 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

Logic

vBoolean: semantic values of sentencesvEntities: e.g., objects, times, etc.vFunction 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

Logic: 𝜆 terms

v𝜆 terms:square = 𝜆x x*x, square(3) = 3*3even = 𝜆x (x mod 2 == 0) a predicate

v Can take multiple arguments:𝜆x.[𝜆y.times(x,y)]

CS6501-NLP 12

Parse tree with associated semantics

CS6501-NLP 13

CS6501-NLP 14

Paper presentations

vWe will learn recent NLP researchvTechniques and applications

vPeer reviewvGo to Collab →Select peer grading

CS6501-NLP 15

Recommended