Skip to content

bka9/elixir-markovify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.3.0"}]
end
```
  1. Ensure markovify is started before your application:
```elixir
def application do
  [applications: [:markovify]]
end
```

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages