CS 544: Lecture 3.3 Syntax and Compositional Semantics

27
CS 544: Lecture 3.3 Syntax and Compositional Semantics Jerry R. Hobbs USC/ISI Marina del Rey, CA

description

CS 544: Lecture 3.3 Syntax and Compositional Semantics. Jerry R. Hobbs USC/ISI Marina del Rey, CA. Lexicon and Syntax. S. Syntax tells us identity of arguments. x1=x2. NP. VP. John works. - PowerPoint PPT Presentation

Transcript of CS 544: Lecture 3.3 Syntax and Compositional Semantics

Page 1: CS 544: Lecture 3.3 Syntax and Compositional Semantics

CS 544: Lecture 3.3Syntax and Compositional

Semantics

Jerry R. Hobbs

USC/ISI

Marina del Rey, CA

Page 2: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Lexicon and Syntax

John works.

john’(e1,x1) work’(e2,x2) & Present’(e3,e2)

NP VP

S

The lexicon gives us the predicates, one

for each word/morpheme

Syntax tells us identity of argumentsx1=x2

e1 is the property of x1 being Johne2 is the event of x2 workinge3 is the property of e2 being in the present

Syntax is how weget predicate-argument

structure out ofconcatenation

Page 3: CS 544: Lecture 3.3 Syntax and Compositional Semantics

All the Syntax of English (almost)

Structure of the clause

Structure of the noun phrase

Adverbials

Relative clauses and other long-distance dependencies

Conjunctions (or Coordination)

Page 4: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Structure of the Clause

The basic clause consists of a Subject, a Verb, and zero, one or two Complements. Chris sleeps. Chris helps Pat. Chris gave Pat a book.

The Complements can be NPs, PPs, AdjPs or clauses, e.g., PP: Chris relies on Pat. AdjP: Chris is acting foolish. Infinitive: Chris wants to fly. Chris wants Pat to fly. Full declarative clause: Chris knows that he can’t fly. Gerunds: Chris likes seeing movies. Small clauses: Pat considers Chris foolish.

Sometimes the subject of the main clause becomes the subject of the complement as well. Chris wants to fly ==> want’(e1,C,e2) & fly’(e2,C) (Subject Control)

Subcategorization is the specification for each verb of the kinds of complements it can take: want: NP, Infinitive, NP Infinitive

Page 5: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Auxilliaries

It could have been fixed by now.

VP

VP

VP

VP

could

have

been

fixed

could’(e1,x,e2) & Perfect’(e2,e3) & fix’(e4,y,x)

Auxilliaries are subject control verbs,

subcategorizedfor the kind of VP

that can follow them.

Modal, subcategorizedfor tenseless VP

“have” conveys Perfect;subcat VP[vbn]

“be” + VP[vbn] conveys passive;subject moves to

object position

Page 6: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Prepositions and AdjectivesAlso Subcategorize

Prepositions: NP: in the room Declarative clause: Before the party was over, Chris left. Small clause: With the party dying down, Chris left. (subordinate conjunctions)

Adjectives: Infinitive: able to fly “that” clause: certain that he could fly

Page 7: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Predicate Complements

Complements of the verb “be”:

NP: Chris is a computer scientist. be’(e,x,y) PP: Chris is in this building. in’(e,x,y) AdjP: Chris is able to ski. able’(e,x,e1) & ski’(e1,x)

Present and past participles can appear anywhere adjectives can appear.Similarly, VP[vbg], VP[vbn] for AdjP

VP[vbn]: Chris was given a book. (passive) VP[vbg]: Chris is reading the book. (progressive)

Page 8: CS 544: Lecture 3.3 Syntax and Compositional Semantics

All the Syntax of English (almost)

Structure of the clause

Structure of the noun phrase

Adverbials

Relative clauses and other long-distance dependencies

Conjunctions (or Coordination)

Page 9: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Structure of NPs: Left Modifiers all the many tall educated Washington presidential foreign policy advisors

Head noun: advisor’(e0,x) & Plural’(e1,x,s)

Prenominal nouns: Washington’(e2,w) & nn’(e3,w,x) Also noun-like Adjs: president’(e3,y) & nn’(e4,y,x)

Adjectives: tall’(e5,x) Also vbn, vbg: educate’(e6,z,x)

Quantifiers, Numbers: many’(e7,s) (property of the set in plurals)

Determiner: the’(e8,x, ....&e1) (relation between entity x and description given by rest of NP) Possessive NPs are determiner phrases: Amy’s => pos’(e10,a,x)

Predeterminer: all’(e9, s, ...&e1) (relation between set and description)

IN THIS ORDER

Page 10: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Some Ambiguities

Often a word can be an adjective in the adjective position:

criminal lawyer: a lawyer who is a criminal

Or a noun in the prenominal noun position:

criminal lawyer: a lawyer who bears some relation to criminals, i.e., defends them

A present participle of a verb can appear in both places:

a skiing man vs. a skiing lesson

noun position: lesson w some relaion to skiing adjective position: a man who is skiing

Page 11: CS 544: Lecture 3.3 Syntax and Compositional Semantics

The Structure of NPs: Right Modifiers

Anything that can be a predicate complement can be the right modifier of a noun:

NP: the artist Michelangelo; George Bush, president of the U.S. (appositives)

PP: the man in the black coat, the party after Chris was elected

AdjP: the people responsible for the damage

VP[vbn]: the student given a present

VP[vbg]: the people seeing the movie

The head noun is the “subject” of the predicate.

Also relative clauses: the people that Chris saw () yesterday.

The head noun fills the gap.

be’(e1,a,m)

after’(e1,p,e2)responsible’(e1,p,d)

give’(e1,x,s,p)

see’(e1,p,m)

see’(e1,c,p)

Page 12: CS 544: Lecture 3.3 Syntax and Compositional Semantics

All the Syntax of English (almost)

Structure of the clause

Structure of the noun phrase

Adverbials

Relative clauses and other long-distance dependencies

Conjunctions (or Coordination)

Page 13: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Structure of Adverbials

Anything that can be a predicate complement can also be an adverbial: PP: Chris read the book in the library. AdjP: Chris read the book, enthusiastic about the subject. NP: Chris read the book, a real surprise to me. VP[vbn]: Chris read the book, based on what Pat told me. VP[vbg]: Chris read the book, wishing he didn’t have to.

Also adverbs: Chris read the book quickly.

Also relative clauses: Chris read the book, which surprised me.

in’(e1,e2,l)enthusiastic’(e1,c,s)

be’(e1,e2,s)

base’(e1,x,e2,e3)

wish’(e1,c,e3)

quick’(e1,e2)

surprise’(e1,e2,i)

read’(e2,c,b)

Page 14: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Placement and Logical Formof Adverbials

Adverbials can appear before, after or between any of the constituents of the structure it modifies.

Quickly Chris read the book. Chris quickly read the book. Chris read quickly every book that was required. Chris read the book quickly.

The “subject” of the adverbial is the eventuality associated with the S or VP it modifies:

Chris read the book in the library. read’(e1,c,b) & in’(e2,e1,l) Chris read the book quickly. read’(e1,c,b) & quick’(e2,e1)

Page 15: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Argument or Adverbial?

For PPs especially, it is often unclear whether it is and argument or adverbial:

Pat will go from California to Japan. ==> go’(e,p,c,j) OR go’(e,p) & from’(e1,e,c) & to’(e2,e,j)

In an inference system with the right rules, this distinction doesn’t matter:

go3’(e,x,y,z) <--> go1’(e,x) & from’(e1,e,y) & to’(e2,e,z)

Page 16: CS 544: Lecture 3.3 Syntax and Compositional Semantics

All the Syntax of English (almost)

Structure of the clause

Structure of the noun phrase

Adverbials

Relative clauses and other long-distance dependencies

Conjunctions (or Coordination)

Page 17: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Long-Distance Dependencies(including wh-Constructions)

Relative clauses, used as right modifiers of nouns (and Ss): Don’t bite the hand that () feeds you. Chris visited the town where he was born. Chris left early, which () surprised us.

Wh-Questions: What did Chris see ()? Where did Chris say Pat went?

Wh-Nominals, used in the same positions as NPs: Whatever you do () is okay with me. I don’t know what to do () or how to do it.

“Tough movement” in complements of some adjectives: Chris is easy for anyone to talk to ().

gapfiller

wh-phrase + yes-no question (with gap)

Page 18: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Why “Long-Distance”?

the book that Chris thinks Pat said Kim read ()

NP

VP

V

SBAR

SIN

NP

NP

NP

NP

NP

VP

VP

S

SV

V

Page 19: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Relation between the Filler and Gap

The wh-phrase can fill an obligatory constituent in the relative clause:

the student who () got the scholarship the student whom the professor saw () the student whom the dean said hello to ()

The wh-phrase can act as an optional adverbial on the relative clause:

the child to whom I read the book the city where I was born

Ambiguities more likely in latter case:

the man to whom John said he sold the book

?

Page 20: CS 544: Lecture 3.3 Syntax and Compositional Semantics

“Pied Piping”

a man the brother of whom I have met ()

The wh-word is identical to the head noun.The whole wh-phrase fills the gap.

a system whose convenience consumers like ()

Page 21: CS 544: Lecture 3.3 Syntax and Compositional Semantics

All the Syntax of English (almost)

Structure of the clause

Structure of the noun phrase

Adverbials

Relative clauses and other long-distance dependencies

Conjunctions (or Coordination)

Page 22: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Coordination

Coordinate conjunctions: and, or, but

Conjunction constructions can be quite complicated, in general:

Pat likes Chris, and Kim too. (ambiguous) Pat likes and wants to go on a date with Chris. The teacher likes intelligent and enthusiastic students. (ambiguous) The three tall English and two short Danish men John believes Mary likes him and is happy. (ambiguous) John likes Mary, and Pat Chris. Sudan is an underdeveloped country, the northern half of which is desert and the southern jungle.

But .....

Page 23: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Coordination of Like Constituents

The vast majority of coordination constructions conjoin like constituents:

S and S: John likes Mary, and Chris likes Pat. VP CC VP: Chris likes Pat but hates Kim. VB CC VB: Everybody either loves or hates Hillary. NP and NP: Chris and Pat like Kim. NN and NN: the man and woman JJ and JJ: the tall and handsome man PP and PP: We went over the bridge and through the woods. IN and IN: Chris ran to and from school Predicate complements: Chris is rich, educated, and in the movie industry.

JJ VBN PP

Page 24: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Logical Form of Conjunctions

Two cases:

Clause conjunction: Chris arrived and Pat left. arrive’(e1,c) & leave’(e2,p) & and’(e3,e1,e2) logical conjunction

NP conjunction: Chris and Pat andn’(e,x,c,p) x is the typical element of the set {x,p} set construction

“intelligent and enthusiastic students” is ambiguous: => students who are both intelligent and enthusiastic (Clause) => intelligent students and enthusiastic students (NP)

Page 25: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Summary of “Shallow” Logical Form The logical form of a sentence is an existentially quantified conjunction of propositions: “The teacher graded the papers slowly.” ==> (E e1,e2,e3,e4,e5,e6,e7,e8,t,p,s) [the’(e1,t,e2) & teacher’(e2,t) & grade’(e3,t,p) & Past’(e4,e3) & the’(e5,p,e6) & paper’(e6,p) & Plural’(e6,p,s) & slow’(e7,e3)]

Nouns: book => book’(e,x)Proper nouns: Chris => Chris’(e,x)Plural nouns: books => book’(e1,x) & Plural’(e2,x,s)Prenominal nouns: wine glass => wine’(e1,x) & nn’(e2,x,y) & glass’(e3,y)

Adjectives: tall => tall’(e,x)Adjectives with complements: able to fly => able’(e1,x,e2) & fly’(e2,x)

Determiners: the => the’(e1,x,e2) = x is uniquely identifiable in context by means of the property e2Quantifiers: many => many’(e, s) (a property of the set)Numbers: three => three’(e,s) (a property of the set)

Page 26: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Summary of “Shallow” Logical Form

Verbs: Intransitive: sleep => sleep’(e,x) Transitive: read => read’(e,x,y) Ditransitive: give => give’(e,x,y,z) Infinitive complemenet: want to go => want’(e1,x,e2) & go’(e2,x) Sentential complement: say that he left => say’(e1,x,e2) & Past’(e2,e3) & leave’(e3,y)

Prepositions: P NP: in Tampa => in’(e,x,t) P S: before he left => before’(e1,x,e2) & Past’(e2,e3) & leave’(e3,y) (x argument (subject) is the S or NP the PP modifies)

Adverbs: run quickly => quick’(e1,e2) & run’(e2,x)

Page 27: CS 544: Lecture 3.3 Syntax and Compositional Semantics

Summary of “Shallow” Logical Form

Conjunction:

Clause conjunction: Chris arrived and Kim left => arrive’(e1,c) & leave’(e2,k) & and’(e3,e1,e2)

NP conjunction: Chris and Pat => andn’(e1,x,c,p)