Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome or Safari browser. Firefox 10 will also handle it.


Learn foreign languages by translation


Natural Language Sentence Generation

Context-Free Grammars

Problem: Agreement

Unification Grammars

Structure Sharing

Sentence generation = grammar + lexicon + unification

Clojure maps and refs

Map: set of key-value pairs, with nesting: trees

Maps + Refs = Directed Acyclic Graphs

Workbook demo

Sentence Generation demo in the REPL

Simple cases

With filters

Implementation Details

Lazy Sequences

MongoDB Serialization

Serialize: Turn a DAG into a tree + metadata

Deserialize: Turn a tree + metadata into a DAG

Use a spacebar or arrow keys to navigate