Don't ask to ask, just ask | |
PerlMonks |
Re^2: Natural Language Sentence Productionby Excalibor (Pilgrim) |
on Sep 23, 2005 at 08:19 UTC ( [id://494429]=note: print w/replies, xml ) | Need Help?? |
Check out Dave "Pragmatic" Thomas's blog entry Kata14 where you'll be challenged to generate sensical text by using "trigrams"... I've tried his solution, and with a varied enough text base to feed it, it generates some impressive texts with so little effort... I guess you can improve it to check longer strings as well, but you'd end up with a Markov Chain (de|re)generator, which could be interesting on itself, but... (suggestion: the Gutenberg Project is a great place to get good base texts for feeding the database :-) Link: PragDave's Kata Fourteen Good luck, --
In Section
Seekers of Perl Wisdom
|
|