Conditional probability + text = new text!

Check this link ! It presents an easy algorithm that’s very applicable:

  1. input texts
  2. generate a letter randomly
  3. produce the next character according to its probability of appearance after the first letter (learned from input texts)
  4. once there are at least x characters, produce the next character according to the x previous ones. With longer x, the generated text makes more sense, but more it’s more similar to input texts!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s