Ling 571 - Deep Processing Techniques for NLP
Winter 2016
Homework #3: Due January 26, 2016, 23:45


Goals

Through this assignment you will: NOTE: You may work in teams of two (2) on this assignment. If you do so:

Background

Please review the class slides and readings in the textbook on the Cocke-Kasami-Younger algorithm.

Implementing a CKY Parser

Based on the material in the lectures and text, develop an implementation of the CKY algorithm that will parse input sentences using a CNF grammar. You may use existing implementations of the data structures to represent the grammar in NLTK or other NLP toolkits (e.g. the Stanford parser), but you must implement the parsing algorithm yourself.

Your algorithm must return all parses derived for the input sentences given the grammar.
Note: You do not need to convert output trees back out of CNF.

Parsing with your CKY parser

The program you submit should do the following:

Programming

Create a program named hw3_parser.{py|pl|etc} to perform CKY parsing as described above invoked as:
hw3_parser.{py|pl|etc} <grammar_filename> <test_sentence_filename> <output_filename>
where:

Files

Please adhere to the naming conventions.

Test and Example Files

All test and example files are located in /dropbox/15-16/571/hw3/ on the CL cluster (patas).

Submission Files

Handing in your work

All homework should be handed in using the class CollectIt.