/markov-gen

Yet another markov chain text generator written in Python. 🗣

Primary LanguagePythonMIT LicenseMIT

markov-gen

Markov Chain Text Generator

Demo can be found here.

About

Markov Chains allow the prediction of a future state based on the characteristics of a present state. Suitable for text, the principle of Markov chain can be turned into a sentences generator.

The project contains two types of Markov Models:

  • N-gram
    An n-gram is simply a sequence of units drawn from a longer sequence.
  • Word Markov Model
    Uses each word as a sequence of units drawn from the text corpus.

Note - The generator is in its early stages so it generates improper sentences without caring for the sentence structure. Modifications will be made in the next update.

Installation

  • Clone the repository

    $ git clone https://github.com/itsron717/markov-gen.git
    
  • Move into the repository

    $ cd markov-gen
    
  • Install the required packages

    $ pip install -r requirements.txt
    
  • Run the server

    $ python app.py
    

Feel free to contribute! Let me know if there are any issues with the installation or running of the prject using the GitHub issues. All suggestion are welcome.

License

The MIT License (MIT)

Copyright (c) 2019 Rounak Vyas