Ben's Blog

all out geekery, I.T. ben February 16, 2011

Markov chains based random text generation

We’ve already seen how to use Markov chains to generate random words that are based on the essence of a previously analyzed corpus. Well the exact same algorithm can be applied to text. The base entities become words instead of letters. I make punctuation be part of the entities, this way, sentence flow becomes part of the extracted statistical essence.

Feel free to send me ideas of cool corpora to analyze.

You can play with it here:

Recent Comments

  1. tranxenne says:
    March 2, 2011 at 7:39 pm

    Quelqu’un s’est amusé à compiler divers bouquins avec Markov : Hamlet et Alice in Wonderland, The Book of Yellow et The Egyptian Book of the Dead, et – mon préféré – Alice in Wonderland et The Book of Revelation of St John.

    L’Apocalypse selon Alice. Ça fonctionne super bien.

    Reply
    • admin says:
      March 8, 2011 at 7:40 am

      Ouais c’est pas nouveau, la partie interessante c’est d’appliquer l’algorithme a bien plus. Je commence par les mots, ensuite le text mais la musique arrive bientot. C’est un truc sur lequel j’avais travaille il y a quelques annees et les resultats sont tres, tres cools. J’ai quelques autres idees de trucs auquels l’appliquer aussi (images) mais c’est un peu plus experimental.

      Reply
      • tranxenne says:
        March 8, 2011 at 5:42 pm

        Ah ouais ! Avec la zik ça peut déchirer !

        Reply
  2. Tranxenne says:
    March 3, 2011 at 6:01 am

    Here’s some ideas on what you could compile, be it mashups or standalones :

    – Obama’s speeches + Fight Club
    – The Star Wars scripts
    – Stephen Hawking’s The Universe in a Nutshell (or any other [kick]astrophysics book).
    – James Joyce’s Finnegans Wake. I would actually be very interested to see this one. What would it bring up? Maybe the compiled text would make actual sense lol !
    – Poetry. Pablo Neruda’s Canto General for instance.
    – All of Lovecraft’s works.

    Reply
    • admin says:
      March 8, 2011 at 7:37 am

      Well the problem is that I’m kind of limited to what’s in the public domain for 2 reasons:
      – I’m cheap
      – easy to find electronic copies in plain text on sites like http://www.gutenberg.org/

      So the only thing I found in there was a couple of texts from Lovecraft, I’ve added them to the corpora and am redoing the analysis, you’ll see a new option shortly.

      thanks for the suggestions 🙂

      Reply

Leave a Comment

Cancel reply

This blog is solar powered

Interactive

Handwriting Capture
Mandalagaba
IPv6 link-local to MAC converter
IPv6 MAC to link-local converter
Markov Text Generation
Markov Word Generation
Markov Music Generation
Duplogrifier
Flood Fill Algorithms
Homestead Metrics
RGB Playground
Web Games

Categories

  • aesthetics111
    • plots54
    • specular holography6
  • Books3
  • I.T.202
    • 3D modeling / printing21
    • AI6
    • all out geekery36
    • electronics27
    • homestead automation6
    • maniacal paranoia25
    • plotters49
    • unix / linux29
    • video games4
    • web development29
    • web games3
  • Lego / Duplo67
  • life in the U.S.42
  • miscellaneous202
  • nature encounters114
  • old vinyls3
  • organs2
  • self sustainability560
    • agriculture105
    • apiculture38
    • apple20
    • building131
    • canning3
    • crochet6
    • foraging6
    • hunting10
    • maple syrup47
    • poultry39
    • preserving2
    • solar power28
    • water23
    • wood84
  • trip to a new life6
Theme by Bloompixel. Proudly Powered by WordPress