|Do you know where your variables are?|
Natural Language Sentence Productionby japhy (Canon)
|on Sep 22, 2005 at 20:53 UTC||Need Help??|
japhy has asked for the
wisdom of the Perl Monks concerning the following question:
Perhaps some monks here have done something similar to what I'm looking to do. I know there are natural language parsing modules on CPAN, but I want to do the opposite -- I want to take a description of a sentence (like "NOUN.SINGULAR VERB.SINGULAR NOUN.PLURAL", although I know that's probably not specific enough) and, given a table defining words and their parts of speech, construct a random sentence. The goal is to produce a random sentence generator that is sensical; the word bank will be comprised of the words and word phrases found in the "The Onion" Refrigerator Magnet Headline Kit.