1 natural language processing lectures 8-9 auxiliary verbs movement phenomena reading: james allen...

33
1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

Upload: rudolf-lang

Post on 18-Jan-2016

243 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

1

Natural Language Processing

Lectures 8-9

Auxiliary VerbsMovement Phenomena

Reading: James Allen NLU (Chapter 5)

Page 2: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

2

Auxiliary and Modal Verbs

• I can see the house.• I will have seen the house.• I was watching the movie.• I should have been watching the movie.• I am not going.• He could not have seen the car.• I did eat my carrots.• Did you see the car?

Page 3: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

3

Auxiliary Verbs

VP (AUX COMPFORM ?s) (VP VFORM ?s)

Page 4: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

4

Auxiliary Verbs (Sequence Constraints)

VP (AUX COMPFORM ?s) (VP VFORM ?s)

Modal + have + be (Progressive) + be (Passive)

They might have been being played as they left.

* He has might see the movie already

I regret having been chosen to go

* I must be having been singing

Page 5: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

5

Passive Sentences

VP AUX [be] VP [ing, +main]

VP AUX [be] VP [ing, +pass]

VP [+pass] AUX [be] VP [pastprt, +main]

Page 6: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

6

Lexicon Samples

Page 7: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

7

Passive Sentences

I will hide my hat in the drawer

My hat will be hidden in the drawer

I hid my hat in the drawer

My hat was hidden in the drawer

I was hiding my hat in the drawer

My hat was being hidden in the drawer

Page 8: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

8

Passive sentences

• VP constituents in passive sentences have a missing NP

• Need a Head binary feature “passgap”

VP [-passgap] V [_np] NP

VP [+passgap] V [_np]

Page 9: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

9

Passive Sentences

Page 10: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

10

Rule 1 & 2 & ((7 & 9) or (5 & 8))

Page 11: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

11

Movement phenomena

• Local (bounded) movementSubject-aux inversion

Jack is giving Sue a bookIs Jack giving Sue a book?He will run in the marathon next yearWill he run in the marathon next

year?John went to the storeDid John go to the store?

Henry goes to school everydayDoes Henry go to school everyday?

Page 12: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

12

Movement Phenomena

• Unbounded movementwh-questions

The fat man will angrily put the book in the cornerWhich man will angrily put the book in the cornerWho will angrily put the book in the cornerHow will the fat man put the book in the cornerIn what way will the fat man put the book in the …What will the fat man put angrily in the cornerWhere will the fat man angrily put the bookWhat will the fat man angrily put the book in

Page 13: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

13

Similar to yes/no questions

I found a book case

Did I find a book case?

What did I find?• So we can use part of the grammar for Yes/no

questions• But there is a missing constituent

What will the fat man

angrily put in the corner

* I angrily put in the corner

Page 14: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

14

Holes and Fillers

• There is a Hole somewhere in a constituent

• The moved part is a Filler for that holeWhat will the fat man angrily put in the corner• Is parsed as if it were:

… angrily put what in the corner

What did you put in the cupboard?* What did you put the bottle in the cupboard

Page 15: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

15

Transformational Grammars

Page 16: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

16

Filling gaps

• Slash categories:

are complex non terminals of form X/Y :

a constituent of type X with a sub constituent Y missing

S/NP

S constituent with the GAP feature NP

Page 17: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

17

Box 5.2 Different Types of Movement

Page 18: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

18

Questions in CFGs

S[+inv] (AUX AGR ?a SUBCAT ?v) (NP AGR ?a) (VP VFORM ?v)

(NP GAP (CAT NP AGR ?a) AGR ?a)

• Inserting GAP Features automatically1. Lexical Head

VP V [_np_vp:inf] NP VP(VP GAP ?g) V [_np_vp:inf] (NP GAP ?g) (VP GAP -)(VP GAP ?g) V [_np_vp:inf] (NP GAP -) (VP GAP ?g)

2. Non Lexical Head(S GAP ?g) (NP GAP -) (VP GAP ?g)

Page 19: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

19

Adding Gap features to a grammar

Page 20: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

20

Wh-words in Lexicon

Page 21: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

21

Wh – words Grammar rules

Page 22: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

22

Ws-questions grammar rules

Page 23: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

23

Ws-questions grammar rules (expanded)

Page 24: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

24

Box 5.3 Movement Constraints(Island Constraints)

• The A over A constraint* What book did you meet the author of __?

• Complex-NP constraint* To whom did the man who gave the book __ laugh?

• Sentential subject ConstraintFor me to learn these constraints is impossible.* What is for me to learn __ impossible?

• Wh-Island ConstraintDid they wonder whether I took the book?* What did they wonder whether I took __?

• Coordinate Structure ConstraintDid you see John and Sam?* Who did you see and __?

Page 25: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

25

Parsing with Gaps

(NP GAP (CAT NP AGR ?a) AGR ?a)

(VP GAP (NP AGR 3s)) V [_np_pp:loc] (NP GAP (NP AGR 3s) PP [LOC]

(NP AGR 3s EMPTY +)

(VP GAP (NP AGR 3s)) V [_np_pp:loc] (NP GAP (NP AGR 3s) PP [LOC]

Page 26: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

26

Adding Empty constituents

Page 27: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

27

1 Which 2 dogs 3 did 4 he 5 see 6

Page 28: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

28

1 Which 2 dogs 3 did 4 he 5 see 6

Page 29: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

29

Box 5.4 Feature Propagation in GPSGGeneralized Phrase Structure Grammar

Uses Slash feature instead of GAP featureSlash Feature obey two rules :

1. Head Feature principle (all head features are shared between mother constituent and head sub constituent)

2. Foot Feature principle (if a foot feature appears in any sub constituent, it must be shared with mother constituent)

Slash feature is both head and foot

Uses meta-rules (that only apply to rules with lexical head constituent) to derive additional rules from a basic grammar

VP V NP VP/NP V NP [+NULL]

VP V[TRANSITIVE] NP X VP [PASSGAP] V X

Page 30: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

30

Relative clauses

CNP CNP REL

REL (NP WH R AGR ?a) (S[-inv, fin] GAP (NP AGR ?a)))

REL (PP WH R PFORM ?p) ( S[-inv, fin] GAP (PP PFORM ?p)))

The man who we saw at the store.

The exam in which you found the error

The man whose book you stole

Page 31: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

31

Relative clauses (Cont.)

The man who read the paper (who is the subject)

So Need the following rule

REL NP [R] VP [fin]

The man that we saw at the party

The man that read the paper

“That” need to regarded as a relative pronoun with WH = R

Page 32: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

32

Relative clauses (Cont.)

Relative clauses that do not start with an appropriate wh-phrase:

1. The Paper John read2. The damage caused by the storm3. The issue creating the argument

2 and 3 are called Reduced Relative clauses

REL (S[fin] GAP (NP AGR ?a)))REL ( VP VFORM {ing, pastprt})

Page 33: 1 Natural Language Processing Lectures 8-9 Auxiliary Verbs Movement Phenomena Reading: James Allen NLU (Chapter 5)

33

Relative clauses (Cont.)

Can we have Relative clauses within wh_questions?

Which dog1 did the man [who2 we saw __2 holding the bone] feed __1 ?

CNP CNP REL

(CNP GAP ?g) (CNP GAP ?g) (REL GAP -)

*Which dog1 did the man2 [we saw __2 petting __1 ] laughed?