Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Natural Language Sentence Productionby GrandFather (Saint) |
on Sep 22, 2005 at 21:23 UTC ( [id://494306]=note: print w/replies, xml ) | Need Help?? |
Haven't you just pretty much described the algorythm? Build tables of words for the various parts of speech, then use templates to select the table to use to select the word for each position in the sentence. If you want to get clever, allow the template to be defined recursively. A Super Search may help. If you have absolutely no idea how to go about this, Re: Perl can do it, take 1 (sentence generation) may help. Perl is Huffman encoded by design.
In Section
Seekers of Perl Wisdom
|
|