330 likes | 406 Views
LING 388: Language and Computers. Sandiway Fong 10/17 Lecture 16. Administrivia. Extra Credit Homework 5 Due tonight. Complexity of PP attachment. Last time…. d on’t store the actual parses. Complexity of PP attachment. Computed up to nearly 97 million parses!. Today’s Topics.
E N D
LING 388: Language and Computers Sandiway Fong 10/17 Lecture 16
Administrivia • Extra Credit Homework 5 • Due tonight
Complexity of PP attachment Last time… don’t store the actual parses
Complexity of PP attachment Computed up to nearly 97 million parses!
Today’s Topics • Homework 4 Review
Homework 4 Review • Part 1: construct a grammar for the sentences: • I want John to win • I want to win • I want John to win the race • I want to win the race
Homework 4 Review Start with hw4.pl
Homework 4 Review • Need to add rules for: • infinitival clause (“to”) • “want” to select for an infinitival clause complement • verb “win” to optionally take an NP complement • subject of infinitival clause can be empty (PRO)
Homework 4 Review • Need to add rules for: • infinitival clause (“to”) vp(vp(VBP,S)) --> vbp(VBP), s(S). vbp(vbp(want)) --> [want]. But we already have an s rule for finite clauses: s(s(NP,VP)) --> np(NP), vp(VP). And we would like “want” to select for an infinitival s Solution is to copy and rename… vp(vp(VBP,S)) --> vbp(VBP), s_inf(S). vbp(vbp(want)) --> [want]. s_inf(s(NP,VP)) --> np(NP), vp_inf(VP). vp_inf(vp(TO,VP)) --> to(TO), vp_inf(VP). to(to(to)) --> [to]. vp_inf(vp(VB)) --> vb(VB). vb(vb(win)) --> [win].
Homework 4 Review • Rules added so far: even when NN “race” is added
Homework 4 Review • Rules added so far: allow VB to optionally take an object
Homework 4 Review • Rules added so far: problem is here
Homework 4 Review • Rules added so far: allow empty subject copy and modify rule
Homework 4 Review • BTW, rules given are not perfect; e.g. vp_inf recursion is too permissive:
Homework 4 Review • Part 2: Compare the sentences in part 1 with: • I trust John to win • *I trust to win • I trust John to win the race • *I trust to win the race • Modify your grammar from part 1 to handle part 2 as well, i.e. it should accept and reject accordingly
Homework 4 Review • If we simply add trust as vbp, it’ll pattern exactly like want: but we wanna block these two parses
Homework 4 Review • Generalization: • want takes s_inf with overt and empty NP subjects • trust takes s_inf with overt NP subjects only • There are two s_inf rules. One encodes overt and the other empty subjects. Split them up into s_inf1 and s_inf2: 1 2
Homework 4 Review • Let vbp1 select for s_inf1 and vbp2 for s_infl2, respectively. Then want is both a vbp1 and vbp2 verb. And trust is only vbp1:
Homework 4 Review • Let’s make sure want still works…
Homework 4 Review • Summary: • This is a construction-specific approach • There are two s infinitival constructions: • [Sinf1 NP [VPinf to [VPinf [VB win] .. ]]] • [Sinf2 [NP ∅] [VPinf to [VPinf [VB win] .. ]]] • want selects for 1. and 2. • trust selects for 1. only We restrict the scope of the grammar rules by selective copy and renaming A GB-theoretic approach might say: want optionally assigns exceptional Case and trust obligatorily assigns exceptional Case to the subject of its complement. In an infinitival clause, a subject does not normally get Case. Overt NPs must get Case. [NP∅] (aka PRO) cannot receive Case.
g16.pl • We now have built quite a complex little grammar so far in this course … • use this grammar for today’s exercise • download from the website • it’s about 50 rules, organized into sections by phrase type…
g16.pl • Note: • g16.pl could but it doesn’t incorporate the PP attachment rules from the previous lecture …
Exercise 1 • Determiner-Noun Agreement • example • English determiner-noun number agreement • data • the man • the men • a man • *a men • lexical features • man [singular] • men [plural] Like in the case of want vs. trust: the [singular] want vbp1 the [plural] want vbp2 a [singular] trust vbp1
Exercise 1 • Method 1: nonterminal renaming • rename grammar rules to constrain the possibilities for determiner and noun co-occurrence: dt_singular(dt(a)) --> [a]. dt_plural(dt(the)) --> [the]. dt_singular(dt(the)) --> [the]. • write lexical rules for man/men: nn_singular(nn(man)) --> [man]. nn_plural(nn(men)) --> [men].
Exercise 1 • Method 1: nonterminal renaming • rename grammar rules to constrain the possibilities for determiner and noun co-occurrence: • rewrite existing rules involving nn and dt
Exercise 1 • Need to also rename other lexical rules: How should we handle cheese?
Exercise 2 • Method 2: use an extra argument to hold a variable corresponding to the Number feature e.g. dt(D,Number), nn(N,Number) then the value of the variable Number must match for determiner and noun • the [plural/singular] • a [singular] • man [singular] • men [plural]
Exercise 2 • Lexical rules for determiners and nouns must now define the value of Number as a 2nd argument as well • e.g. • nn(nn(man),singular) --> [man]. • dt(dt(a),singular) --> [a]. • download g16.pl again and implement this system • Which way is better?