CSC 247/447, 1999 Assignment 3, Problem 6: Lisp Due: 5pm, Thursday March 25 6.(a) Modify the grammar for James Allen's parser to handle topicalization. Topicalization was discussed in class (see the notes handed out by Myrosia) and is also the subject of exercise (5), p.155 in the text. Make sure that your rules enable the parser to handle various kinds of examples, and show and discuss the results. Include examples that involve other gaps, in particular relative clauses, as in "The dog we passed in the alley, I dislike". (b) (Grads) Write a program to generate VP phrase structure rules from lexical verb entries. Use the lexicon in JFA's format as input, from which you should then obtain a list of rules as output. For example, from see: (V (VFORM base) (SUBCAT _np)) you would generate ((VP (VFORM ?v) (AGR ?a)) -vp1> (head (V (VFORM ?v) (AGR ?a) (SUBCAT _np))) (NP)) You can also generate a simpler form of the rule ((vp) -vp1> (head (V (subcat _np))) (NP)) But in this case you should make sure that vform and agr are declared as head features (they usually are in JFA's parser) Don't forget that all rules need distinct identifiers. In general, the form of subcategorization information in JFA's lexicon looks something like this (arbitrarily assuming 2 subcategorized constituents): _c1-spec1_c2-spec2, where _c1 and _c2 are constituent types (such as _np, _pp or _vp), and -spec1 and -spec2 optionally specified ptype or vform values (e.g., _np_pp-of should generate the rule ((vp) -vp1> (head (V (subcat _np_pp-of))) (NP) (PP (ptype of))). There are also 2 special cases: _none, which is given to intransitive verbs, and s, which means that the verb can take a sentence as a complement (if we were following the convention completely, it would have to be _s). Your function should take the complete lexicon in JFA's format, for example *lexicon-4.6* from Chapter4.lisp, discover all possible verb subcategorizations and generate the corresponding set of rules, making sure that there are no duplicate rules in the set. Again be sure (and demonstrate) that the rules you generate enable parsing of sentences containing such VPs. Comment on other phrase structure rules that you think could be automatically generated in this way. Note that at least part (b) requires being able to examine the names of such symbols as _np_pp. Myrosia will put up an explanation how to handle symbols in LISP on the web page for the course.