"Babble" script

Written by Adam Albright, last modified Feb 16, 2003

This is a very simple, quick and dirty script to generate random "words", given an inventory of possible onsets, nuclei, and codas.

It requires two files to run:

Instructions for use:

  1. Run the script, in whatever way you ordinarily run perl scripts. (e.g., by typing 'perl Babble.pl' from a command prompt in Unix, Windows, or Mac OSX, or using the "run" command in MacPerl)
  2. When the script asks for your file of onsets, nuclei, and codas, enter the name of your inventory file (e.g., 'Sample.inv')
  3. Enter the number of words that you want (an integer)
  4. Enter the maximum number of syllables you want your words to have
  5. Enter the name of the file you want to save the output under

Also note: If you enter a number of desired words that's larger than the theoretical maximum—that is, than the possible combinations of onsets * nucs * codas in your inventory file times the maximum number of syllables—the program will never terminate. If the program never says "Done generating novel words", check to make sure that you have requested a reasonable number of words.



Problems or questions? email me: albright@mit.edu

Back to Adam's homepage