{{CSCI 587 Test 2} \hfill {April 15, 1997}}
  1. NLP in Prolog: Given the grammar below:
       S    -> NP VP
       NP   -> pronoun | art noun | NP PP
       VP   -> verb NP | VP PP
       PP   -> prep NP
       
    Give two parse trees for ``I saw the man with a telescope.''

  2. Construct an RTN that recgonizes the sentences generated by this grammar.

  3. Write prolog code for a parser based on this grammar that will generate a parse tree as it parses. Assume the lexical productions, i.e., ``noun $\rightarrow$ man'' etc. are already handled.
       S    -> NP VP
       NP   -> pronoun | art noun | NP PP
       VP   -> verb NP | VP PP
       PP   -> prep NP
       

  4. Assuming the grammar below:
       S    -> NP VP | NP aux VP
       NP   -> art noun | art noun noun
       VP   -> verb NP 
       art  -> the
       noun -> water | can
       verb -> water | hold
       aux  -> can
       
    Give the chart for the parse of the sentence ``The water can can hold water.'' after the second ``can'' has been processed.
  5. Features:
    1. What does the feature SUBCAT \_np\_np mean for a verb?

    2. Give a SUBCAT feature for the verb receive.

    3. What does it mean for VAR to be a ``head'' feature for S?

  6. Semantics:
    1. Simplify:((($\lambda$ x (x*y +5*x + 3)2)

    2. Simplify:(($\lambda$ x (x A))($\lambda$ y (Q y)))

    3. Represent: ``likes Mary'' as in ``John likes Mary'' using a lambda expression.


  7. Thematic Roles: What are the thematic roles in the sentence ``John gave a valentine to Mary at the party'' ?

  8. Using the rule
            (VP   VAR ?v   SEM ($\lambda$  a3 (?semv ?v a3)))
            $\rightarrow$ \hfill 
    (V SUBCAT \_np VAR ?v SEM ?semv) (NP SEM ?semnp)
    Show the SEM feature generated for VP assuming:
            (V    SUBCAT \_np   VAR e3   SEM KISS1   VFORM PAST)
    (NP SEM (NAME m1 ``Mary''))