G22.2590 - Natural Language Processing  -- Spring 2008 -- Prof. Grishman

Assignment #2

January 31, 2008

(1) [1.5 points] Using the grammar given in sections 9.1-9.5 of J & M, determine the constituent structure of the sentences

a) Show the airlines with flights to Boston.
b) Show the airlines that fly to Boston.
c) I need to know the aircraft and flight number.
d) Do you prefer to go to Boston?
You do not have to use the grammar rules which account for agreement (p. 340-41) or subcategorization (p. 344).  If you don't want to draw trees, you can use parenthesis notation ("[S  [NP  [Nominal  [Noun flights]]] [VP [Verb crash]]]").  The grammar given in sections 9.1-9.5 is summarized below.

Keep in mind that our goal in parsing a sentence is to get some handle on the meaning (semantics) of a sentence through its syntactic (grammatical) structure. The subject of a sentence (the np in s->np vp) and the object of a sentence (the np in vp -> v np) should in general reflect the 'who did what to whom' relationships.  In addition,
(2) [2 points] J&M 9.3:  Augment the rules of the J&M grammar in the manner described on page 341 to handle pronouns.  Deal properly with person/number and case (this means that your grammar should block both errors of number such as *"He eat" and errors of case such as *"Him eats.").
    Present tense verbs occur in two forms:  the singular ("eats") and the plural ("eat").  The only exception is the verb "be", which has a third form ("am") when the subject is "I".  For the purpose of this exercise, you do not have to account for this special behavior of "I am".
    Pronouns differ in person, number, and case:

singular
plural

nominative
accusative
nominative
accusative
1st person
I
me
we
us
2nd person
you
you
you
you
3rd person
he, she, it
him, her, it
they
them
    Ignoring the "I am" case, it is sufficient for purposes of person/number agreement to lump together 1st person singular ("I"), 2nd person singular ("you"), and all the plural pronouns ("we", "you", "they"), and distinguish them from 3rd person singular pronouns ("he", "she", "it"), putting the last in the 'pronoun-singular' category and all the others in the 'pronoun-plural' category.
    In addition, to capture the case constraints, you must distinguish nominative ("I", "he", "she") from accusative ("me", "him", "her") pronouns, keeping in mind that some ("you", "it") can fill either case.
     If you have constructed your grammar properly, you will have captured four constraints:

(3) [1 point] Using Jet (with grammar grammar1.txt) add a verb and a noun to the dictionary given (tiny1.dict) and parse two sentences,  using the top-down parser; submit the parses produced (copy and paste from the console log).  Download Jet and follow the Jet Guide for Assignment 2.

Due  February 7th.


Summary of Jurafsky and Martin English Grammar (Chapter 9, sections 1-5)

S
->
NP VP |


VP |


Aux NP VP | Wh-NP VP | Wh-NP Aux NP VP |


S and S
NP
->
Pronoun |


Proper-Noun |


(Det) (Card) (Ord) (Quant) (AP) Nominal |


NP and NP
Nominal
->
Noun Nominal | Noun | Nominal PP (PP) (PP) |


Nominal GerundVP | Nominal RelClause
VP
->
Verb | Verb NP | Verb NP PP | Verb PP | Verb S | Verb to VP |


VP and VP
PP
->
Preposition NP
GerundVP
->
GerundV | GerundV NP | GerundV PP | GerundV NP PP
RelClause
->
(who | that) VP