Stochastic language generation (little program I wrote back in '09)