Project

mrkv

0.0
No commit activity in last 3 years
No release in over 3 years
given an array of source lines, builds a markov chain and generates random sentences.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

mrkv

Gem Version Build Status

An actual real life demonstration of everything that this gem does:

$ gem install mrkv
Successfully installed mrkv-0.1.0
1 gem installed
$ irb
irb(main):001:0> require 'mrkv'
=> true
irb(main):002:0> example = Mrkv::Chain.new(1) # ngram defaults to 2
=> #<Mrkv::Chain:0x007ff024b36638 @ngram=1, @chain={}>
irb(main):003:0> example.add ["Ruby is a language and a sight to behold!", "Ruby is a bottle of beer and a bag of french fries?", "Ruby is joy and friendship and caring!", "Ruby is a product of love and devotion."]
=> true
irb(main):004:0> example.generate
=> "Ruby is a bottle of love and friendship and a bottle of love and a bag of love and a sight to behold!"
irb(main):005:0> example.generate
=> "Ruby is a language and a language and devotion."
irb(main):006:0> # etc.

slated 4 v0.2.0

bi-directional chain. respond to input. compression/optimization.