Tweet random haikus
Tweet random haikus
I like Markov Chains, and I like haikus, so this is my attempt at creating a
Twitter bot that tweets Markov-Chain-generated haikus. It’s not meant to be
blazing fast, but it should count syllables very accurately.
Tweet a random haiku:
cd /path/to/haiku_ebooks/bin
./haiku_ebooks
The first time will take longer than normal (~1 minute), because it has to parse
the CMU pronunciation dictionary for word syllable lengths and generate a
persistent Markov Chain. Subsequent runs should only take ~10 seconds.
ruby
(I’m using ruby 2.4.2
)bundler
for installing:
git clone https://github.com/spejamchr/haiku_ebooks.git
bundle install
data/keys.example.yml
to data/keys.yml
and put your Twitter keys.txt
files in the data/text/
directory. Your Markov Chain will beOriginal author: Spencer Christiansen
haiku_ebooks is released under the MIT License.