Week 8 Homework - Programming-from-A-to-Z/A2Z-F16 GitHub Wiki
Due Nov 1
Use a Context-Free Grammar to generate text. It's not required to write any new code for this assignment, you could just play with the examples and document your results in a blog post. Here are some approaches you could take:
Invent your own grammar and use one of the existing examples to generate text with it. Therearelots of example grammars you can find online, though you will likely have to reformat them to be the grammar syntax from my example or JSON.
Rework any of the example programs to use something other than text (or, at least, text that represents language) as its basic unit. For example: musical notes, songs in playlists, pixels in an image, shapes in a drawing, etc.
Build a grammar that pulls its terminal words from Wordnik.
Getting results from a context-free-grammar can be tricky. Consider a twitter bot, and the conciseness of 140 characters. Something short and sweet, highly structured ideas may work well:
* A coffee drink order generator.
* An apology generator.
* An ITP project idea generator.
* A knock knock joke generator.
If you prefer to work on expanding your bot project and creating a display for it, you may do so instead of or in combination with the above assignment. Please add a link and document your progress on your bot below.
Questions?
add your question here
Ruta: save() and saveStrings() saves text one character per line... why so?