elixir-markovify

Inspired by the python package Markovify, this library uses Markov Chain theory to take a body of text and create a new sentence based off of that text.

The idea of a markov chain is that given a state there is not equal probability of the next state. As the algorithm decides the next state to move to it will use this distributed probability to go down a more random path.

Example

  chain = Markovify.Text.model("<sample text here>")
  Markovify.Text.make_sentence(chain)

Installation

If available in Hex, the package can be installed as:

  1. Add markovify to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:markovify, "~> 0.1.0"}]
end
```
  1. Ensure markovify is started before your application:
```elixir
def application do
  [applications: [:markovify]]
end
```