On Fri, Apr 07, 2006 at 10:02:28PM +0900, Ruby Quiz wrote: > > This week's Ruby Quiz is about text generation. That's right, we're going to > teach your computer to weave tall tales. > > At its most basic level, a solution might be: > > >> (1..30).map { (("a".."z").to_a + [" "] * 10)[rand(36)] }.join > => "fb mcr hhluesjbhtf swm eehokmi" > > However, let's make our goal to get as close to English looking sentences as > possible. One way you might do this is using a technique called Markov Chains. I think it would be really neat to apply this to music composition. I'm just not sure how you would get a corpus for that (maybe parsing lilypond files?). --Aaron