- 🚨 CFG with Tracery, Tracery by Kate Compton
- 📕 Tracery: An Author-Focused Generative Text Tool
- 📚 Context-Free Grammars by Allison Parrish
- 🍿 Intro to CFG
- 🍿 CFG with RiTa
- 🍿 CFG "from scratch" with p5.js
- 💻 CFG p5.js code examples
- 💻 RiGrammer from RiTa library, RiGrammar example
- 📚 2016 Notes on Context-Free Grammar
- 🤖 Art Assignment Bot
- 👹 Monstr (a dating website, but for monsters)
- 👗 What color is this dress?
- 💖 Happy Valentine's Day
- 🔬 SCIgen - An Automatic CS Paper Generator -- no longer working 😢
- 🎨 ContextFree GenGen by Allison Parrish based off of GenGen by Darius Kazemi -- no longer working 😢
(It is not required to write any new code for this assignment. You are welcome to run one or more of the provided examples with your own data. You can document the results in a blog post (or link to a web page where the text is generated). I'll include some other ideas below in case you are feeling ambitious.)
Invent your own grammar and generate text. I suggest using Tracery but you can base your code on any of my examples, try RiGrammer from the RiTa library, use ContextFree GenGen with a Google Sheet (not working 😢), or even investigate Allison Parrish's Seaduck.
Getting results from a context-free-grammar can be tricky. Short and sweet, highly structured ideas tend to work well. For example.
- A coffee drink order generator.
- An apology generator.
- An ITP project idea generator.
- A knock knock joke generator.
Something you might consider is pulling the "terminal" words for your grammar from an API or other data source. You are also welcome to explore generative visual art with Context Free Grammars basing your exercise off of the L-System material described above. Or what else can you generate from a Context-Free Grammar? Music?
(Please note you are welcome to post under a pseudonym and/or password protect your published assignment. Here is some helpful information on privacy options for an NYU blog. Finally, if you prefer not to post your assignment at all here, you may email the submission.)
- 🚨 Watch this video tutorial! (this is technical info needed for the examples). Of course if you already know this material, you can skip.
- 🔢 This is found in a group, maybe pick just one to check out!
- 🍿 Additional video if you have a particular interest and want to do a deeper dive.
- 📕 Required reading! Let's make sure we all have read this.
- 📚 Optional additional reading for a deeper dive.
- 💻 Code examples here!
- 📈 Class presentation slides
- 🔗 Extra reference material / link