CIT 594 Assignment 3: Random sentence generation
Spring 2015, David Matuszek

Purposes

General idea

Write a text file containing BNF grammar for English sentences. Here is an example you can start with, but you should either write your own, or "improve" this one. In either case, replace the vocabulary items (the "terminals") with your own vocabulary items.

Read in your BNF grammar and use it to generate about twenty random sentences.

Specifics

Clone the project at https://github.com/DavidMatuszek/SentenceGenerator. Significant portions of the code have been written for you; the missing parts are all tagged with a TODO comment. (In Eclipse, choose Window → Show view → Tasks.)

Notes

The Grammar is stored as a TreeMap<String, <ArrayList<ArrayList<String>>>>. To make this easier to think about, I have made the following definitions:

Generate the Javadoc for members with Package visibility. (In Eclipse, choose Project → Generate Javadoc....) Look over the Javadoc before you turn it in, to make sure that it is essentially complete.

Due date

Zip up and turn in your complete project in to Canvas before 6 a.m. Thursday, February 5. Include all test files, the generated Javadoc, and your grammar.