Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
notice how it gets all the fiddly grammar with tenses and plural agreements correct.
# a jruby DSL for the Simple Natural Language Generator library -
realise clause {
subject 'two cats', :plural => true
verb 'live with'
object 'Matt', 'Ariel'
complement preposition_phrase {
complement 'San Francisco'
preposition 'in'
tense :future
=> "Two cats will live with Matt and Ariel in San Francisco."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.