utsavprabhakar / Markov_Chain_Text_Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markov_Chain_Text_Generation

This Python code helps you to predict words from a seed string using Markov chain.

What is a Markov Chain?

Markov chains, named after Andrey Markov, are mathematical systems that hop from one "state" (a situation or set of values) to another. For example, if you made a Markov chain model of a baby's behavior, you might include "playing," "eating", "sleeping," and "crying" as states, which together with other behaviors could form a 'state space': a list of all possible states. In addition, on top of the state space, a Markov chain tells you the probabilitiy of hopping, or "transitioning," from one state to any other state---e.g., the chance that a baby currently playing will fall asleep in the next five minutes without crying first. To get a more visual understanding of visually understanding, I recommned checking out this amazing site

Dependencies

  • Numpy

Working

Please check out the jupyter notebook in this repo. The working and the outputs are clearly shown in the notebook.

About


Languages

Language:Jupyter Notebook 100.0%