1 / 33

LING 388: Language and Computers

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.

caelan
Download Presentation

LING 388: Language and Computers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LING 388: Language and Computers Sandiway Fong 10/17 Lecture 16

  2. Administrivia • Extra Credit Homework 5 • Due tonight

  3. Complexity of PP attachment Last time… don’t store the actual parses

  4. Complexity of PP attachment Computed up to nearly 97 million parses!

  5. Today’s Topics • Homework 4 Review

  6. 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

  7. Homework 4 Review Start with hw4.pl

  8. Homework 4 Review

  9. 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)

  10. 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].

  11. Homework 4 Review • Rules added so far: even when NN “race” is added

  12. Homework 4 Review • Rules added so far: allow VB to optionally take an object

  13. Homework 4 Review • Rules added so far: problem is here

  14. Homework 4 Review • Rules added so far: allow empty subject copy and modify rule

  15. Homework 4 Review • BTW, rules given are not perfect; e.g. vp_inf recursion is too permissive:

  16. 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

  17. Homework 4 Review • If we simply add trust as vbp, it’ll pattern exactly like want: but we wanna block these two parses

  18. 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

  19. 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:

  20. Homework 4 Review • Let’s make sure want still works…

  21. 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.

  22. 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…

  23. g16.pl

  24. g16.pl

  25. g16.pl

  26. g16.pl

  27. g16.pl • Note: • g16.pl could but it doesn’t incorporate the PP attachment rules from the previous lecture …

  28. 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

  29. 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].

  30. 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

  31. Exercise 1 • Need to also rename other lexical rules: How should we handle cheese?

  32. 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]

  33. 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?

More Related