Parsing Assignment for Ling645/CMSC723

Parsing Algorithms

This assignment is due in class next week.

Consider the following grammar:

 S    -->  NP VP
 VP   -->  V NP
 VP   -->  VP PP
 PP   -->  Prep NP
 NP   -->  Det N
 NP   -->  NP PP
 N    -->  dog | bit | man | yard
 V    -->  dog | man | bit
 Prep -->  in
 Det  -->  the
And consider the following input sentence:
 the dog bit the man in the yard

Your assignment is to parse this sentence by hand using three different algorithms. Specifically, you must choose:

  1. One of
  2. Left corner
  3. One of

For the stack-based parsers (top down, bottom up, left corner), you should show a trace of one path through the non-deterministic search space, according to the format we used in class, i.e.

  Operation     What's on the Stack    What's in the input
The path you choose should lead to the parse where the prepositional phrase "in the yard" modifies "the man", not "the yard".

For the CKY or Earley parsers, you should show the final contents of the table. For CKY what you do should be consistent with the algorithm handout from class (e.g. words are numbered starting from 1). For Earley's algorithm, what you do should follow the textbook. For either algorithm, if you make mistakes you are more likely to get partial credit if you also show the chart data structure that corresponds to the parse (i.e. showing which edges cover which parts of the sentence.)

For people who have seen some of these algorithms before, I strongly recommend you choose the algorithms with which you are least familiar.

Extra Credit

You will get two points of extra credit for doing all five algorithms 100% correctly.

Algorithm Specifications

You have on-paper algorithmic descriptions for CKY (handout) and Earley (textbook). Here is a link to a postscript file showing the operations for the stack-based parsers as I presented them in class.


Return to the course home page.