0% found this document useful (0 votes)
3 views

lecture-0214-semantic-relations (1)

The document outlines a lecture on semantics, focusing on roles and relations in statistical natural language processing. It covers topics such as structured perceptron, word senses, semantic roles, and various relationships between words, including homonymy, polysemy, and thematic roles. Additionally, it discusses frameworks like PropBank and FrameNet for semantic role labeling and the challenges in defining and classifying semantic roles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

lecture-0214-semantic-relations (1)

The document outlines a lecture on semantics, focusing on roles and relations in statistical natural language processing. It covers topics such as structured perceptron, word senses, semantic roles, and various relationships between words, including homonymy, polysemy, and thematic roles. Additionally, it discusses frameworks like PropBank and FrameNet for semantic role labeling and the challenges in defining and classifying semantic roles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Semantics: Roles and Relations

Prof. Sameer Singh


CS 295: STATISTICAL NLP
WINTER 2017

February 14, 2017

Based on slides from Jan Jurafsky, Noah Smith, Nathan Schneider, and everyone else they copied from.
Outline
Structured Perceptron

Word Senses

Semantic Roles

CS 295: STATISTICAL NLP (WINTER 2017) 2


Outline
Structured Perceptron

Word Senses

Semantic Roles

CS 295: STATISTICAL NLP (WINTER 2017) 3


Structured Prediction

CS 295: STATISTICAL NLP (WINTER 2017) 4


Likelihood Learning

CS 295: STATISTICAL NLP (WINTER 2017) 5


Perceptron Algorithm

CS 295: STATISTICAL NLP (WINTER 2017) 6


Structured Perceptron

CS 295: STATISTICAL NLP (WINTER 2017) 7


Structured Hinge Loss

CS 295: STATISTICAL NLP (WINTER 2017) 8


Weight Averaging

CS 295: STATISTICAL NLP (WINTER 2017) 9


Outline
Structured Perceptron

Word Senses

Semantic Roles

CS 295: STATISTICAL NLP (WINTER 2017) 10


Words and Senses
Instead, a bank can hold the investments in a custodial account in the client’s name.

But as agriculture burgeons on the east bank, the river will shrink even more.

Senses

• bank1: financial institution Each word can have many senses..


• bank2: sloping mound Most non-rare words in English do.

CS 295: STATISTICAL NLP (WINTER 2017) 11


Homonymy
Same form, completely different meanings…

Homographs Homophones
bank2 right2
bank1 write1
bat2 piece2
bat1 peace1

Applications Information Retrieval Text to Speech


• “bat care” • “bass” (fish) or “bass” (guitar)

Machine Translation Speech to Text


• Bat: murcielago or bate? • “piece” or “peace”

CS 295: STATISTICAL NLP (WINTER 2017) 12


Polysemy
The bank was constructed in 1875 out of local brick.
I withdrew the money from the bank.
bank3
bank2
Same form, but very related meanings…

Metronymy Systemic relationship between senses.

Building Organization school, university, hospital


Jane Austen wrote Emma
Author Works of the Author I love Jane Austen!
Plums have beautiful blossoms
Tree Fruit
I ate a preserved plum

CS 295: STATISTICAL NLP (WINTER 2017) 13


Multiple senses or not?
Which flights serve breakfast?
Does Lufthansa serve Philadelphia?

“Zeugma” Test

Does Lufthansa serve breakfast and San Jose?


Sounds weird, so there are multiple senses of “serve”.

You are free to execute your laws,


and your citizens, as you see fit.
Riker, Star Trek: The Next Generation

CS 295: STATISTICAL NLP (WINTER 2017) 14


How do we define the sense?
Dictionary

Define senses in relation to other senses!

CS 295: STATISTICAL NLP (WINTER 2017) 15


Synonyms
Substitute one for the other in any sentence.
Perfect synonymy, doesn’t exist
Many things define acceptability: politeness, slang, register, genre

Substitute one for the other in most sentence.

couch / sofa
big / large
automobile / car Synonymy is between sense, not words
vomit / throw up
water / H20

CS 295: STATISTICAL NLP (WINTER 2017) 16


Antonyms
Sense that are opposite with respect to one feature of meaning..
otherwise very similar!

dark/light short/long fast/slow rise/fall


hot/cold up/down in/out big/little

Binary Opposition Reversives

Or at opposite ends of a scale Opposite directions or change

dark/light short/long fast/slow


rise/fall up/down in/out
hot/cold big/little

CS 295: STATISTICAL NLP (WINTER 2017) 17


Hyponymy and Hypernymy
Hyponyms / Subordinate

One sense is a hyponym of another if the first sense is more specific,


denoting a subclass of the other
car is a hyponym of vehicle
mango is a hyponym of fruit

Hypernyms / Superordinate

Conversely hypernym denotes one is a superclass of the other


vehicle is a hypernym of car
fruit is a hypernym of mango

CS 295: STATISTICAL NLP (WINTER 2017) 18


WordNet

Category Unique Strings


Noun 117,798
Verb 11,529
Adjective 22,479
Adverb 4,481

CS 295: STATISTICAL NLP (WINTER 2017) 19


WordNet Hierarchy

CS 295: STATISTICAL NLP (WINTER 2017) 20


Noun Relations

CS 295: STATISTICAL NLP (WINTER 2017) 21


Verb Relations

CS 295: STATISTICAL NLP (WINTER 2017) 22


Word Sense Disambiguation
The bass line of the song is too weak.

CS 295: STATISTICAL NLP (WINTER 2017) 23


Outline
Structured Perceptron

Word Senses

Semantic Roles

CS 295: STATISTICAL NLP (WINTER 2017) 24


Meaning is Subtle
I’m thrilled to visit sunny California.
I’m thrilled to visit California, where the weather is sunny.
I’m thrilled to visit California, where it’s sunny.
I’m excited to visit California, where it’s sunny.
I’m excited to visit California, where it’s sunny out.
I’m excited to spend time in California, where it’s sunny out.
I’m not excited to visit sunny California.
I’m thrilled to visit sunny Florida.
I’m thrilled to visit sunny Mountain View.
I’m thrilled to visit California because it’s sunny.
I’m sort of happy about the California visit.

CS 295: STATISTICAL NLP (WINTER 2017) 25


Verbs are key!

CS 295: STATISTICAL NLP (WINTER 2017) 26


Syntax ≠ Semantics

CS 295: STATISTICAL NLP (WINTER 2017) 27


Need for “Roles”
The police officer detained the subject at the scene of the crime.

Who? The police officer


Did what? detained
To whom? The subject
Where? at the scene of the crime
When? -

CS 295: STATISTICAL NLP (WINTER 2017) 28


Thematic Roles
Agent The waiter spilled the soup.
Experiencer John has a headache.
Content The wind blows debris into our yard.
Force Jesse broke the window.
Instrument The city built a regulation-sized baseball diamond.
Theme Mona asked, “You met Mary Ann at the supermarket?”
Result He poached catfish, stunning them with a shocking device.
Source I flew in from Boston.
Beneficiary Ann Callahan makes hotel reservations for her boss.
Goal I drove to Portland.

CS 295: STATISTICAL NLP (WINTER 2017) 29


Problem with Thematic Roles
Difficult to have a good set of roles that works all the time,
where each role can have a small, concrete definition

47 high-level classes, divided into 193 more specific classes


- Levin (1993), VerbNet

Fewer Roles More Roles

PropBank FrameNet
“Proto”-arguments, shared across verbs Each verb sense is part of a “frame”
Exact definition depends on verb sense Each frame has its own arguments

CS 295: STATISTICAL NLP (WINTER 2017) 30


Prop Bank
• “Frames” are verb senses
• Arguments of each verb are mapped onto Arg0, Arg1, Arg2
• Arguments are always constituents (annotated over syntax)

fall.08 (fall back on)


fall.01 (move downward)

fall.10 (fall for a trick)

CS 295: STATISTICAL NLP (WINTER 2017) 31


FrameNet
• “Frames” can be any content word (~1000 frames)
• Each frame has its own argument roles, everything is hierarchical
• Annotated without syntax, arguments can be anything

Relations between
Frames Frame

Verb Roles /
Senses Arguments

CS 295: STATISTICAL NLP (WINTER 2017) 32


rate of change of the VALUE.
G ROUP in which an I TEM changes the value of an
TRIBUTE in a specified way.
“Change position on a scale”
e elements in the change position on a scale frame from the FrameNet
l., 2006).

VERBS: dwindle move soar escalation shift


advance edge mushroom swell explosion tumble
climb explode plummet swing fall
decline fall reach triple fluctuation ADVERBS:
decrease fluctuate rise tumble gain increasingly
diminish gain rocket growth
dip grow shift NOUNS: hike
double increase skyrocket decline increase
drop jump slide decrease rise

ameNet also codes relationships between frames, allowing frames to


each other, or representing relations between frames like causation (a
ations among frame elements in different
CS 295: STATISTICAL NLP (WINTERframes
2017) can be representing
33 b
8 “Change position on a scale”
C HAPTER 22 • S EMANTIC ROLE L ABELING

Core Roles
ATTRIBUTE The ATTRIBUTE is a scalar property that the I TEM possesses.
D IFFERENCE The distance by which an I TEM changes its position on the scale.
F INAL STATE A description that presents the I TEM’s state after the change in the ATTRIBUTE’s
value as an independent predication.
F INAL VALUE The position on the scale where the I TEM ends up.
I NITIAL STATE A description that presents the I TEM’s state before the change in the AT-
TRIBUTE ’s value as an independent predication.
I NITIAL VALUE The initial position on the scale from which the I TEM moves away.
I TEM The entity that has a position on the scale.
VALUE RANGE A portion of the scale, typically identified by its end points, along which the
values of the ATTRIBUTE fluctuate.
Some Non-Core Roles
D URATION The length of time over which the change takes place.
S PEED The rate of change of the VALUE.
G ROUP The G ROUP in which an I TEM changes the value of an
ATTRIBUTE in a specified way.
Figure 22.3 The frame elements in the change position on a scale frame from the FrameNet Labelers
Guide (Ruppenhofer et al., 2006).
CS 295: STATISTICAL NLP (WINTER 2017) 34
tion on a scale (the Attribute) from a starting point (Initial value) to an
end point (Final value).
Some of the semantic roles (frame elements) in the frame are defined as in

“Change position on a scale”


Fig. 22.3. Note that these are separated into core roles, which are frame specific, and
non-core roles, which are more like the Arg-M arguments in PropBank, expressed
more general properties of time, location, and so on.
Here are some example sentences:
(22.20) [I TEM Oil] rose [ATTRIBUTE in price] [D IFFERENCE by 2%].
(22.21) [I TEM It] has increased [F INAL STATE to having them 1 day a month].
(22.22) [I TEM Microsoft shares] fell [F INAL VALUE to 7 5/8].
(22.23) [I TEM Colon cancer incidence] fell [D IFFERENCE by 50%] [G ROUP among
men].
(22.24) a steady increase [I NITIAL VALUE from 9.5] [F INAL VALUE to 14.3] [I TEM
in dividends]
(22.25) a [D IFFERENCE 5%] [I TEM dividend] increase...
Note from these example sentences that the frame includes target words like rise,
fall, and increase. In fact, the complete frame consists of the following words:

CS 295: STATISTICAL NLP (WINTER 2017) 35


Relations between Frames
Inherits from:
event Is Inherited by:
Perspective on:
Is Perspectivized in:
Uses:
Is Used by:
Subframe of:
change_position_on_scale
Has Subframe(s):
Precedes:
Is Preceded by:
change_of_temperature proliferating_in_number Is Inchoative of:
Is Causative of:

CS 295: STATISTICAL NLP (WINTER 2017) 36


Semantic Role Labeling
You can’t blame the program for being unable to identify it.

Cognizer Evaluee Reason FrameNet

The San Francisco Examiner issued a special edition yesterday.

PropBank Arg0 Arg1 ArgM-Tmp

CS 295: STATISTICAL NLP (WINTER 2017) 37


Approach to SRL Predictions

CS 295: STATISTICAL NLP (WINTER 2017) 38


Features for SRL 10 C HAPTER 22 • S EMANTIC ROLE L ABELING

Headword of constituent: Examiner NP-SBJ = ARG0 VP

DT NNP NNP NNP


Headword POS: NNP
The San Francisco Examiner
Voice of the clause: Active
Subcategorization of pred: VP -> VBD NP PP VBD = TARGET NP = ARG1

issued DT JJ NN
Named Entity type of constituent: ORGANIZATION
a special edition
First and last words of constituent: The, Examiner
Linear position,clause re: predicate:Figure
before
22.5 Parse tree for a PropBank sentence, showing the PropB
shows the path feature NP"S#VP#VBD for ARG0, the NP-SBJ constitu
Path features: NP↑S↓VP↓VBD
• The headword of the constituent, Examin
can be computed with standard head rules
in Fig. ??. Certain headwords (e.g., prono
CS 295: STATISTICAL NLP (WINTER 2017) 39
possible semantic roles they are likely to fi
Typical SRL Pipeline
Pruning Use rules to filter out unlikely constituents.

Identification Use a classifier to further filter constituents.

Classification Use a classifier predict multiple roles for each constituent.

Joint Inference Jointly predict a consistent set of roles.

CS 295: STATISTICAL NLP (WINTER 2017) 40


Selectional Restrictions
I want to eat someplace nearby.

Interpretation 1 someplace nearby is a location adjunct (intransitive)

Interpretation 2 someplace nearby is a direct object (transitive verb)

Why is Interpretation 2 unlikely?


Theme of “eat” is usually edible.
Introduce constraints based on WordNet
In this case, it should be “food, nutrient”

CS 295: STATISTICAL NLP (WINTER 2017) 41


Selectional Preferences!
Instead of restrictions, measure association scores for each role.
how often a class/noun appears as an argument.
eat food#n#1, aliment#n#1, entity#n#1, solid#n#1, food#n#2
drink fluid#n#1, liquid#n#1, entity#n#1, alcohol#n#1, beverage#n#1
appoint individual#n#1, entity#n#1, chief#n#1, being#n#2, expert#n#1
publish abstract entity#n#1, piece of writing#n#1, communication#n#2, publication#n#1
Table 2: Most probable cuts learned by Verb
Classes Plaus./Implaus.
WN-C UT for the object argument of Resnik
selected verbs Dagan et
see friend/method 5.79/-0.01 0.20/1.40
Verb-object read Noun-noun
article/fashion Adjective-noun
6.80/-0.20 3.00/0.11
Seen Unseen find Seen label/fever Unseen Seen
1.10/0.22 Unseen
1.50/2.20
r r hearr r
story/issue r 1.89/1.89* r 0.66/1.50
WN-C UT .593 .582 .514 Nouns .571 write .550 .584 letter/market
.564 .590 .5617.26/0.00
.618 .4532.50/-0.4
.439
WN-C UT-100 .500 .529 .575 .630 urge .619 .639 daughter/contrast
.662 .706 .5371.14/1.86*
.510 .4640.14/1.60
.431
WN-C UT-200 .538 .546 .557 .608 warn .595 .632 driver/engine
.639 .669 .5854.73/3.61
.587 .4351.20/0.05
.431
LDAWN-100 .497 .538 .558 .594 judge .605 .619 contest/climate
.635 .633 .5491.30/0.28
.545 .4591.50/1.90
.462
LDAWN-200
Resnik (1996)
.546 .562 .508 .548 teach .610 .654 language/distance
.526 .568 .5781.87/1.86
.583 .4532.50/1.30
.450
ÓResnik .384 .473 .469
Séaghdha and Korhonen (2012) CS 295:.470 .242
STATISTICAL
show .187 sample/travel
NLP (WINTER .152 .037 .3091.44/0.41
2017) .388 .311 .280
42 1.60/0.14
Upcoming…
• Homework 3 is due on February 27
Homework
• Write-up and data will be released very soon.

• Status report due in ~2 weeks: March 2, 2017


Project • Instructions coming soon
• Only 5 pages

• Paper summaries: February 17, February 28, March 14


Summaries
• Only 1 page each

CS 295: STATISTICAL NLP (WINTER 2017) 43

You might also like