Project

yada

0.0
No commit activity in last 3 years
No release in over 3 years
Train a Markov Chain model on textual content and use it to generate nonsensical text in that style
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0
 Project Readme

Yada

Yada trains a Markov chain model from some provided textual content, and uses it to generate more text that resembles in style the provided one (but is mostly nonsense).

Usage

yada = Yada.new
yada.train!(File.new('a_text_file.txt'))
yada.generate(10) # Generate 10 sentences

Example output, when trained on Franz Kafka's Metamorphosis:

It was just shrugged her to him. Then, and listen to talk at last glance he
would excuse their total despair, one arm around the cleaner had never to see
how Gregor needed a smart blue uniform cap in bed. He could not sleeping a
lieutenant in the task of the door and filled the chief clerk come and crying.
It seemed to him over at all around her left, Gregor's back out through the
contrary I mention this job and no-one had indeed cut off so stubborn; She was
already looked back comfortably on astonished and he lifted his sister were very
slowly.

License

The gem is available as open source under the terms of the MIT License.