• No results found

CS626-449: Speech, NLP and the Web/Topics in AI p

N/A
N/A
Protected

Academic year: 2022

Share "CS626-449: Speech, NLP and the Web/Topics in AI p"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

CS626-449: Speech, NLP and the Web/Topics in AI p

Pushpak Bhattacharyya

CSE Dept., IIT Bombay

Lecture-17: PCFG; Arguments and Adjuncts

(2)

Compare

• P(w1,m) = P(w1) * i=1πi=m P(wi/w1, n-i ) Æ Statistics

(S h)

(Speech)

• P(w1,m) = ∑t Ԗ all parses P(t) Æ Statistics + Linguistics

• w1,m = yield(s) Æ linguistics

(3)

Probability of a parse tree (cont.)

S1,l

NP1,2 VP3,l

N2,2 V3,3 PP4,l

P NP

w DT1

w P ( t|s ) = P (t | S1,l )

= P ( NP1,2, DT1,1 , w1,

N w2 P4,4 NP5,l

w4

w1 w3

w5 wl

N2,2, w2,

VP3,l, V3,3 , w3,

PP4 l, P4 4 , w4 NP5 l, w5 l

|

S1 l )

PP4,l, P4,4 , w4, NP5,l, w5…l

|

S1,l )

= P ( NP1,2 , VP3,l | S1,l) * P ( DT1,1 , N2,2 | NP1,2) * D(w1 | DT1,1) * P (w2 | N2,2) * P (V3 3 PP4 l | VP3 l) * P(w3 | V3 3) * P( P4 4 NP l | PP4 l ) * P(w4|P4 4) * P

P (V3,3, PP4,l | VP3,l) P(w3 | V3,3) P( P4,4, NP5,l | PP4,l ) P(w4|P4,4) P (w5…l | NP5,l)

(Using Chain Rule, Context Freeness and Ancestor Freeness )

(4)

Example PCFG Rules &

Probabilities Probabilities

• S → NP VP 1.0

• NP → DT NN 0.5

• DT → the 1.0

• NN → gunman 0.5

• NP → NNS 0.3

• NP → NP PP 0.2

• NN → building 0.5

• VBD → sprayed 1.0

• PP → P NP 1.0

• VP → VP PP 0.6

• NNS → bullets 1.0

• VP → VBD NP 0.4

(5)

Example Parse t

1`

• The gunman sprayed the building with bullets.

S1.0

NP0.5 VP0.6

P (t1)

= 1.0 * 0.5 * 1.0 * 0.5 * 0.6 * 0.4 * 1.0 * 0.5 * 1.0 * 0.5 * 1.0

0.5 0.6

DT1.0 NN0.5 PP1.0

* 1.0 * 0.3 * 1.0

= 0.00225 VP0.4

VBD1.0 NP0.5 P1.0 NP0.3 The gunman

DT1.0 NN0.5with NNS1.0

building the

sprayed

bullets building

the

(6)

Another Parse t

2

S

• The gunman sprayed the building with bullets.

S1.0

NP0.5 VP0.4

P (t2)

= 1.0 * 0.5 * 1.0 * 0.5 * 0.4 * 1.0 * 0.2 * 0.5 * 1.0 * 0.5 * 1.0 DT1.0 NN0.5VBD1.0 NP0.2

* 1.0 * 0.3 * 1.0

= 0.0015

NP0.5 PP1.0 The gunman sprayed

DT1.0 NN0.5 P1.0 NP0.3

ith NNS b ilding

the NNS1.0

bullets building with

the

(7)

Complements and Adjuncts Complements and Adjuncts

or

A t d Adj t

Arguments and Adjuncts

(8)

Rules in bar notation: Noun

• NPÆ (D) N’

• N’Æ (AP) N’

• N’Æ N’ (PP)

• N’Æ N (PP)

(9)

Rules in bar notation: Verb

• VPÆ V’

• V’Æ V’ (PP)

• V’Æ V (NP)

(10)

Rules in bar notation: Adjective

• APÆ A’

• A’Æ (AP) A’

• A’Æ A (PP)

(11)

Rules in bar notation: Preposition

• PPÆ P’

• P’Æ P’ (PP)

• P’Æ P (NP)

(12)

Introducing the “X factor”

• Let X stand for any category N, V, A, P

• Let XP stand for NP, VP, AP and PP

• Let X’ stand for N’, V’, A’ and P’

(13)

XP to X’

• Collect the first level rules

– NPÆ (D) N’

– VPÆ V’

APÆ A’

– APÆ A’

– PPÆ P’

• And produce

• And produce

– XPÆ (YP) X’

(14)

X’ to X’

• Collect the 2nd level rules

– N’Æ (AP) N’ or N’ (PP) – V’Æ V’ (PP)

A’Æ (AP) A’

– A’Æ (AP) A’

– P’Æ P’ (PP)

• And produce

• And produce

– X’Æ (ZP) X’ or X (ZP)

(15)

X’ to X

• Collect the 3rd level rules

– N’Æ N (PP) – V’Æ V (NP) A’Æ A (PP) – A’Æ A (PP) – P’Æ P (NP)

• And produce

• And produce

– X’Æ X (WP)

(16)

Basic observations about X and X’

• X’Æ X (WP)

• X’Æ X’ (ZP)

• X is called Head

• Phrases must have Heads: Headedness property

• Category of XP and X must match: Endocentricity

(17)

Basic observations about X and X’

• X’Æ X (WP)

• X’Æ X’ (ZP)

• Sisters of X are complements

– Roughly correspond to objects

• Sisters of X’ are Adjuncts

– PPs and Adjectives are typical adjuncts

• We have adjunct rules and complement rules

(18)

Structural difference between complements and adjuncts complements and adjuncts

XP X’

X’

ZP

WP X

Adjunct

Complement X

(19)

Complements and Adjuncts in NPs

NP N’

N’

ZP

PP N

with red cover N

book

of poems

(20)

NP

N’

Any number of Adjuncts

N’

N’

ZP from Oxford Press

PP N

with red cover N

book

of poems

References

Related documents

Going backward from final winner sequence which ends in state S2 (indicated By the 2 nd tuple), we recover the sequence..2. The HMM,

Going backward from final winner sequence which ends in state S2 (indicated By the 2 nd tuple), we recover the sequence..2. A N*T array called SEQSCORE to

animacy feature, then it is the likely agent of the action denoted by the verb.. denoted by

 One day, Sam left his small, yellow home to head towards the meat-packing plant where he worked, a task which was never completed, as on his way, he tripped, fell, and went

One day, Sam left his small, yellow home to head towards the meat-packing plant where he worked, a task which was never completed, as on his way, he tripped, fell, and went

 Wordnet is a network of words linked by lexical and semantic relations..  The first wordnet in the world was for English developed at Princeton over

Mitesh Khapra, Sapan Shah, Piyush Kedia and Pushpak Bhattacharyya, Domain- Specific Word Sense Disambiguation Combining Corpus Based and Wordnet Based Parameters , 5th

 If you knew which words are probable translation of each other then you can guess which alignment is probable and which one is improbable.  If you were given alignments with