mctext 0.2 – A Markov Chain Text Generator

This is the second release of my Markov Chain text generator – mctext. This text generator takes existing sample text, and generates a new text using Markov Chains.

The main new thing in the version in that it allows the users to specify via the command line how many words should be considered when generating the next one. The bigger the step number the closer the generated text is to the original one. The value used in mctext-0.1 was 2, and this is also the default in this one. The number of steps can be set using the --steps command line switch.

In this version also couple of bugs were fixed (mostly segmentation faults). Another change the regular user will not notice, as it happened under the hood. I’ve redesign the program, and gave better software architecture that hopefully will allow one to extend its abilities and generalize its output generation.

I planned to add more features in this release but due to lack of time, I’ve decided to release as-is. The design rewrite is part of a future plan to allow mctext to operate on music pieces (probably MIDI). This should add a new dimension to the program and allow it to utilize the new generalized structure to generate new music pieces based on sample ones. This future project can have much nicer results that just plain text generation. I really hope I’ll find the time to complete it.

The new package can be downloaded found here – mctext-0.2.tar.bz2. Compilation and installation remained the same as in the previous version. The only dependency is the Boost C++ library.

This is a free software, so please fill free to modify or hack it any way you like. It would be great if you can send a comment when you do so. Also, if you got an interesting idea how this program can be used or modified, please comment.

4 thoughts on “mctext 0.2 – A Markov Chain Text Generator

  1. Brian

    Dear Guy,

    It would be great if you could point us at a windows binary! I can’t compile!

    Best wishes
    Brian

  2. Guy Post author

    Hi Brian,

    There is currently no binary for Windows, although the code was written with portability in mind so it should compile fine. I will try to provide some binaries for Windows soon.

    BTW what compilation errors have you received?

  3. Ben

    Er… Help! I’m way out of my depth here. I just want a little app that can scramble text offline. where can I get something like that?

  4. Guy Post author

    Hi Ben,
    What do you mean by scramble text? Just to take a list of words and randomize the order (with/without repeats)? If so you can just use Python’s builtin random.choice to do the trick.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.