Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Natural Language Sentence Production

by tomazos (Deacon)
on Sep 23, 2005 at 00:59 UTC ( #494357=note: print w/replies, xml ) Need Help??

in reply to Re: Natural Language Sentence Production
in thread Natural Language Sentence Production

The easiest solution? Guess and check. Generate a sentence of random words and reject those which don't pass mu

Sounds like a bogosort to me.

To sort a deck of cards:

  1. Shuffle deck randomly.
  2. If not sorted, go to 1.

Efficiency in the order of O(lots and lots and lots and....) -Andrew.

Andrew Tomazos  |  |
  • Comment on Re^2: Natural Language Sentence Production

Replies are listed 'Best First'.
Re^3: Natural Language Sentence Production
by spiritway (Vicar) on Sep 23, 2005 at 05:39 UTC

    Close, but not quite. It depends on the ratio of "sensible" vs. "nonsensical" phrases, which in turn depends on how much leeway you're willing to give the program. If you want to mimic a rational human, then yes, you're right. But if you're willing to take something less stringent - say, your average irrational person, or worse, a suit - then you might be able to pull it off this way.

    I did something like this with a music-composing program. I randomly generated tones, intervals, and durations, and filtered out the obvious dissonances and silly combinations. What was left was OK - not exactly music, but close to Musak. It would have passed muster in an elevator, but not at a concert.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://494357]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-10-04 23:47 GMT
Find Nodes?
    Voting Booth?

    No recent polls found