JavaScript Prose Generator

When I was at IBM, I was inspired by a program called "foggy", which selected phrases from a menu to generate "managerese". I used a similar menu-based technique to generate sentences from lists of phrases extracted from any source, starting with William Shakespeare and Noam Chomsky. I wrote the original version in Rexx, which was a popular language at IBM in the 1980s. In 1995, I rewrote it in JavaScript, but I never did anything further with it.

Meanwhile, my old Rexx version, which had circulated around IBM, escaped to the Internet. Various people rewrote it in other languages, and it became popular as Chomskybot. It even has a page on Wikipedia. After receiving some emails about Chomskybot, I decided to dust off my 1995 JavaScript code and post it on my web site. There are two versions of the code:  one for prose in the style of Shakespeare and one for prose in the style of Chomsky. Both versions are identical except for the lists of phrases extracted from writings by each author.

The JavaScript programs are short and simple, and no knowledge of JavaScript is necessary to modify or replace the lists of phrases. Permission is hereby granted, under the LGPL license, for anybody to use or reuse these programs in any way they like. But please cite the source.

Copyright ©2011 by John F. Sowa.