36
Lecture 19 Word Meanings II Topics Topics Description Logic III Overview of Meaning Readings: Readings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural Language Processing

Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

Embed Size (px)

Citation preview

Page 1: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

Lecture 19Word Meanings II

Lecture 19Word Meanings II

Topics Topics Description Logic III Overview of Meaning

Readings:Readings: Text Chapter 189NLTK book Chapter 10

March 27, 2013

CSCE 771 Natural Language Processing

Page 2: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 2 – CSCE 771 Spring 2013

OverviewOverviewLast Time (Programming)Last Time (Programming)

Wordnet overview

TodayToday Computational Semantics Feature based grammars

Readings: Readings: Text 19 NLTK Book: Chapters 9 and 10

Next Time: Computational Lexical SemanticsNext Time: Computational Lexical Semantics

Page 3: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 3 – CSCE 771 Spring 2013

HW reviewHW review

DropboxesDropboxes

Soon to exist:Soon to exist:

NER for handbookNER for handbook

1. frequency distribution - Handbook Assignment2. Regular Expression /urllib2 - Identify prerequisites Assignment3. Extend backoff tagger to include trigram Assignment4. Test1

Page 4: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 4 – CSCE 771 Spring 2013

WordnetWordnet

Most synsets are connected to other synsets via a number of Most synsets are connected to other synsets via a number of semantic relations. These relations vary based on the type of semantic relations. These relations vary based on the type of word, and include:word, and include:

Nouns Nouns hypernyms: Y is a hypernym of X if every X is a (kind of) Y (canine

is a hypernym of dog) “superordinate” “superclass” hyponyms: Y is a hyponym of X if every Y is a (kind of) X (dog is a

hyponym of canine) “IS-A” coordinate terms: Y is a coordinate term of X if X and Y share a

hypernym (wolf is a coordinate term of dog, and dog is a coordinate term of wolf) “sibling”

holonym: Y is a holonym of X if X is a part of Y (building is a holonym of window) “HAS-PART”

meronym: Y is a meronym of X if Y is a part of X (window is a meronym of building) “IS-PART” “IS-MEMBER”

http://en.wikipedia.org/wiki/WordNet

Page 5: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 5 – CSCE 771 Spring 2013

Verbs Verbs hypernym: the verb Y is a hypernym of the verb X if the activity X is

a (kind of) Y (to perceive is an hypernym of to listen) troponym: the verb Y is a troponym of the verb X if the activity Y is

doing X in some manner (to lisp is a troponym of to talk) entailment: the verb Y is entailed by X if by doing X you must be

doing Y (to sleep is entailed by to snore) coordinate terms: those verbs sharing a common hypernym (to lisp

and to yell)

Adjectives Adjectives related nouns similar to participle of verb

Adverbs Adverbs root adjectives

http://en.wikipedia.org/wiki/WordNet

Page 6: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 6 – CSCE 771 Spring 2013

http://wordnet.princeton.edu/http://wordnet.princeton.edu/

x

Page 7: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 7 – CSCE 771 Spring 2013

WordnetonlineFig 19-1

WordnetonlineFig 19-1

Page 8: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 8 – CSCE 771 Spring 2013

Word sensesWord senses

A word sense is a distinct meaningA word sense is a distinct meaning

Synonym sets are relations among word sensesSynonym sets are relations among word senses

• couch/sofa, car/automobilecouch/sofa, car/automobile

antonyms alsoantonyms also

• long/short, big/large, rise/falllong/short, big/large, rise/fall

• extremes; or opposite in directionextremes; or opposite in direction

Page 9: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 9 – CSCE 771 Spring 2013

Fig 19-2 Noun relations in wordnetFig 19-2 Noun relations in wordnet

Page 10: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 10 – CSCE 771 Spring 2013

Fig 19-3 Verb relations in wordnetFig 19-3 Verb relations in wordnet

Page 11: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 11 – CSCE 771 Spring 2013

Fig19-4-like IS-A (hyponym) Chain for lemma bass#7Fig19-4-like IS-A (hyponym) Chain for lemma bass#7

Page 12: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 12 – CSCE 771 Spring 2013

Sister terms (= coordinate terms)Sister terms (= coordinate terms)

Page 13: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 13 – CSCE 771 Spring 2013

Thematic RolesThematic Roles

19.19 “Sasha broke the window.”19.19 “Sasha broke the window.”

exists e,x,y breaking(e) & breaker(e, Sasha) & exists e,x,y breaking(e) & breaker(e, Sasha) & brokenThing(e, y) & window(y)brokenThing(e, y) & window(y)

19.20 Pat opened the door.19.20 Pat opened the door.

Deep or thematic rolesDeep or thematic roles

• Panini (Indian grammarian) circa 7Panini (Indian grammarian) circa 7thth-4-4thth century BC century BC

• Fillmore 1968, Gruber 1965Fillmore 1968, Gruber 1965

Page 14: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 14 – CSCE 771 Spring 2013

Fig 19.5 Common Thematic RolesFig 19.5 Common Thematic Roles

Page 15: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 15 – CSCE 771 Spring 2013

19.6 Examples of Thematic Roles19.6 Examples of Thematic Roles

Page 16: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 16 – CSCE 771 Spring 2013

Variations of expressionVariations of expression

• John broke the window.John broke the window.

• John broke the window with a rock.John broke the window with a rock.

• The rock broke the window.The rock broke the window.

• The window broke.The window broke.

• The window was broken by John.The window was broken by John.

Page 17: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 17 – CSCE 771 Spring 2013

Case Frames for verbsCase Frames for verbs

BreakBreak

• Agent: Subject, Theme:ObjectAgent: Subject, Theme:Object

• Agent: Subject, Theme:Object, Instrument: PP-withAgent: Subject, Theme:Object, Instrument: PP-with

• Instrument:Subject, Theme:ObjectInstrument:Subject, Theme:Object

• Theme: SubjectTheme: Subject

Page 18: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 18 – CSCE 771 Spring 2013

19.4.3 Problems with Thematic Roles19.4.3 Problems with Thematic Roles

Example 19.27Example 19.27

a.a. the cook opened the jar with the new gadget.the cook opened the jar with the new gadget.

b.b. the new gadget opened the jar.the new gadget opened the jar.

Example 19.28Example 19.28

a.a. Shelly ate the banana with a fork.Shelly ate the banana with a fork.

b.b. *The fork ate the banana.*The fork ate the banana.

Page 19: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 19 – CSCE 771 Spring 2013

Prop BankProp Bank

PropBank is a corpus that is annotated with verbal PropBank is a corpus that is annotated with verbal propositions and their arguments—a "proposition propositions and their arguments—a "proposition bank". bank".

• http://verbs.colorado.edu/~mpalmer/projects/ace.htmlhttp://verbs.colorado.edu/~mpalmer/projects/ace.html

http://en.wikipedia.org/wiki/PropBank

Page 20: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 20 – CSCE 771 Spring 2013

PropBank OnlinePropBank Online

http://verbs.colorado.edu/~mpalmer/projects/ace.htmlhttp://verbs.colorado.edu/~mpalmer/projects/ace.html

Page 21: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 21 – CSCE 771 Spring 2013

FrameNetFrameNet

Page 22: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 22 – CSCE 771 Spring 2013

Framenet Core RolesFramenet Core Roles

Page 23: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 23 – CSCE 771 Spring 2013

FrameNet ExamplesFrameNet Examples

... [... [Cook Cook the boys] ... GRILL [the boys] ... GRILL [Food Food their catches] [their catches] [Heating_instrument Heating_instrument

on an open fire]. on an open fire].

[[Avenger Avenger I] 'll GET EVEN [I] 'll GET EVEN [Offender Offender with you] [with you] [Injury Injury for this]! for this]!

[[ Punishment Punishment This attack was conducted] [ This attack was conducted] [SupportSupport in] in] RETALIATION [RETALIATION [ Injury Injury for the U.S. bombing raid on for the U.S. bombing raid on Tripoli... Tripoli...

[[SleeperSleeper They] [ They] [CopulaCopula were] ASLEEP [ were] ASLEEP [DurationDuration for hours] for hours]

Page 24: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 24 – CSCE 771 Spring 2013

FrameNet Index of Lexical UnitsFrameNet Index of Lexical Units

Page 25: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 25 – CSCE 771 Spring 2013

Selectional restrictions of rolesfrom PropBankSelectional restrictions of rolesfrom PropBank

Page 26: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 26 – CSCE 771 Spring 2013

Fig 19-7 Hamburger Edible?Fig 19-7 Hamburger Edible?

Page 27: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 27 – CSCE 771 Spring 2013

Page 28: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 28 – CSCE 771 Spring 2013

Page 29: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 29 – CSCE 771 Spring 2013

Figure 19.8 Shank’s Conceptual DependenciesFigure 19.8 Shank’s Conceptual DependenciesRoger Schank 1969 Roger Schank 1969 Professor at Yale Professor at Yale

aclweb.org/anthology-new/C/C69/C69-0201.pdf

Page 30: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 30 – CSCE 771 Spring 2013

Conceptual DependencyConceptual Dependency

Governing CategoriesGoverning Categories

• PP – an actor or object corresponds to concrete PP – an actor or object corresponds to concrete nominal nounsnominal nouns

• ACT – an actionACT – an action

• LOC – a location of a conceptualizationLOC – a location of a conceptualization

• T – time of a conceptualizationT – time of a conceptualization

Assisting CategoriesAssisting Categories

• PA – attribute of a PPPA – attribute of a PP

• AA – attribute of an ACTAA – attribute of an ACT

Graphical representationGraphical representation

aclweb.org/anthology-new/C/C69/C69-0201.pdf

Page 31: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 31 – CSCE 771 Spring 2013

Conceptual syntax rulesConceptual syntax rules

Ref: ???Ref: ???

Elaine Rich’sElaine Rich’s

Text on AIText on AI

www.csc.csudh.edu/jhan/Fall2006/csc411/Notes/Chapter%207.ppt

Page 32: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 32 – CSCE 771 Spring 2013

CD ExamplesCD Examples1.1. John ran.John ran.

2.2. John is tall.John is tall.

3.3. John is a doctor.John is a doctor.

4.4. A nice boy.A nice boy.

5.5. John’s dogJohn’s dog

6.6. John pushed the John pushed the cartcart

7.7. John took the John took the book from Marybook from Mary

8.8. John drank milkJohn drank milk

9.9. john fertilized john fertilized the fieldthe field

10.10. the plants grewthe plants grew

11.11. Bill shot BobBill shot Bobwww.csc.csudh.edu/jhan/Fall2006/csc411/Notes/Chapter%207.ppt

Page 33: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 33 – CSCE 771 Spring 2013

CD for “John at the egg.”CD for “John at the egg.”

..

www.csc.csudh.edu/jhan/Fall2006/csc411/Notes/Chapter%207.ppt

Page 34: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 34 – CSCE 771 Spring 2013

CD “John prevented Mary from giving the book to Bill.”CD “John prevented Mary from giving the book to Bill.”.More tenses and modes.More tenses and modes

pp pastpastff futurefuturet t transitiontransitionk k continuingcontinuingcc conditionalconditional// negativenegative? ? InterrogativeInterrogativepilpil presentpresent

www.csc.csudh.edu/jhan/Fall2006/csc411/Notes/Chapter%207.ppt

Page 35: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 35 – CSCE 771 Spring 2013

RestaurantScriptRestaurantScriptRoger Schank again Roger Schank again

Collection of scenes Collection of scenes describing typical describing typical eventsevents

e.g. “visit a e.g. “visit a restaurant”restaurant”

1.1. EnteringEntering

2.2. OrderingOrdering

3.3. EatingEating

4.4. Paying/LeavingPaying/Leaving

www.csc.csudh.edu/jhan/Fall2006/csc411/Notes/Chapter%207.ppt

Page 36: Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural

– 36 – CSCE 771 Spring 2013

ModifiersModifiers