San Diego State University logo

Probabilistic Context Grammars

Problem
One
 

For this exercise you will use this partial PCFG:

    S NP VP .80 Det the .40
    NP Det N .30 Det a .40
    VP V NP .20 N meal .01
    V includes .05 N flight .02

    Fill out the rest of this chart

Problem
Two
 

Modify your version of a CKY recognizer to compute the probability of the most probable parse, using the probabilistic CKY algorithm of Chapter 14 (Ney 1991).

Here is the pseudocode:

You do not have to return a parse tree as the pseudocode does. You need only the return the probability of the most probable parse. (This is the probabilistic version of a recognizer). You may also want to review the class notes here.

You will want to use the Python implementation of a CKY parser gievn in the online Parser writing help notes..

Check your answer on the PCFG above using the probability calculations you did in Problem One.