Do exercise #3, section 7.4.8 of the NLTK book.
From the PP attachment corpus (nltk.corpus.ppattach), build
a simple model of PP attachment based on the frequency distributions of the
attachment to the various verbs and nouns listed in the corpus. That is,
for each VP and NP, build a model of what the likely PP attachment will be.
Use the training data to build your model, then test it on the test data.
Report your accuracy. How does using just the VP compare to using just the
NP? Is it better to use some combination of the two?
Next, use the model you built from the PP attachment corpus to correctly attach PPs in your chunker that you wrote for Part 1. Use the tree structure of the chunks to actually do the attachment: don't just report it. Examine the results manually (you don't have to look at everything; just take a look at a dozen or two examples), and report your observations.