This assignment is due Wednesday, October 2 at 11PM.

1. Goals

Through this assignment you will:

2. Background

Please review the class slides and readings in the textbook on context-free grammars. Also, see Section 8.3 of the NLTK Book for examples of grammars and configuration of the included parsers. We’ll get to the later parts of that chapter soon.

3. Parsing

Create a program to parse the test sentences based on the provided grammar and analyze the results. Specifically, your program should:

4. Programming

Create a program named hw1_parse.sh to perform the parsing as described above, invoked as:

hw1_parse.sh <grammar_file> <test_sentence_file> <output_file>

where

5. Files

In the dropbox:

You will find the following files in the dropbox:

These files contain a toy grammar, some toy sentences, and the expected output format described above.

You will also find:

These two files will be the test data on which to run your parser and generate a hw1_parse.out file.

Files to Submit: