
Generating inspirational quotes with Markov chains - ramtinalami
http://www.ramtin.xyz/post/4
======
dfsegoat
In a similar vein, this is one of the most amusing use of Markov chains IMO:
It is trained on the King James Bible and several Computer science textbooks:

[http://kingjamesprogramming.tumblr.com/](http://kingjamesprogramming.tumblr.com/)

So you get some gold like:

"And this I pray, that your love may abound yet more and more like a
controlled use of shared memory."

~~~
michaelfeathers
My favorite is this twitter account of titles for imaginary articles
constructed from titles submitted to Hacker News.

[https://twitter.com/HNTitles](https://twitter.com/HNTitles)

~~~
itronitron
I wonder if it knocks out exact matches to previous HN titles or if it could
generate one eventually

~~~
flashman
I built a few generative Twitter bots with character level language models[1]
(@steam_gaems for instance) and one problem is that they spit out phrases from
the source text relatively frequently. So I included a function to re-generate
the output if it matched any input phrases. Brute-force but effective.

[1] [http://karpathy.github.io/2015/05/21/rnn-
effectiveness/](http://karpathy.github.io/2015/05/21/rnn-effectiveness/)

------
ideonexus
This is a great article from a young person who is clearly learning by
writing. Having good communication skills along with technical skills will
make you invaluable in the workforce. We need this kind of popular science
writing for computer science. Keep up the great work!

------
vowelless
In the same spirit, I find [http://inspirobot.me](http://inspirobot.me) to be
quite funny. Click "generate ".

A collection:
[https://www.instagram.com/inspirobotquotes/](https://www.instagram.com/inspirobotquotes/)

~~~
pault
"All that is needed to start a movement is sexuality and a fiddle."

Sounds legit to me. :)

~~~
itronitron
"Nobody can jeopardize heroes."

------
msoad
I would like to introduce you to the world of computer generated content and
commentary:

[https://www.reddit.com/r/SubredditSimulator/](https://www.reddit.com/r/SubredditSimulator/)

~~~
thinkpad20
This is pretty amazing, thanks for the share

------
qznc
In our research group we mixed our PhD theses with Lovecraft fiction. While
sometimes fun, it usually does not mix well, because Lovecraft writes in past
tense and theses are in present tense.

Choose your sources wisely

------
zokier
My biggest problem with Markov chain generated text is the amount of simply
grammatically nonsense output. For example “Grew up your bliss and the world.”
as far as I can tell just doesn't parse

~~~
ateesdalejr
markov chain text generator + grammar checker = problem solved

~~~
toomanybeersies
Not necessarily true, for example: "Colorless green ideas sleep furiously"

[https://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_fu...](https://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_furiously)

------
suixo
There is a slight issue with the provided code: if one sentence ends with a
given word, then this word will always "terminate" any sentence, even if it is
almost always inside a sentence.

Ex: "I like the letter i" will put "i" in the END dictionary, and as soon as
this "word" gets picked up the sentence will be terminated, leading to
incomplete / low-quality results :/

I like the trick of not using a weight or probability but just the number of
occurrences of the world for in-sentences words (that don't scale well but are
totally useful with small size training sets), maybe there is a way to reuse
the same trick to not always terminate on such END words.

Good article :)

------
tempodox
Considering the inanity of inspirational quotes, a Markov chain is the perfect
generator for them.

------
hgdsraj
We made something like this for a hackathon a year ago.

[http://quoteraptor.herokuapp.com/WICSApp/](http://quoteraptor.herokuapp.com/WICSApp/)

------
enkrs
Recently on a slow Friday we trained Markov chains with our Slack history. We
generated a separate chain for each Slack member. It culminated with a Slack
channel emulator generating full chat logs of what members would typically
say.

The programming in Python was suprisingly quick and easy, but we ended up
wasting more time then expected by amusing ourselves with the results.

So if anyone’s thinking to try out Markov chains for text, I recommend taking
Slack logs for training.

~~~
ridhoq
I actually made a slack bot to do this exact thing:
[https://github.com/ridhoq/ditto](https://github.com/ridhoq/ditto). It was a
quick side project to learn Elixir so it’s a bit rough around the edge. I'm
actually in the process of refactoring to use the new Events API. But it’s
been pretty hilarious to see the responses get better and better over time. If
anybody is interested and wants to put it on their Slack, I may try to put it
in the Slack App directory thing.

------
diyseguy
These sorts of results are so easy to generate using simple ngrams. No machine
learning necessary:

the best revenge is showing up.

hope is showing up with what you decide to plant.

live what you live

you cannot do what you miss when you are no one.

plant a journey not a worry

fill every beat with the edge.

the heartbeat of imagination makes us infinite

feel inferior without limits

the grass is a beginning

hope is a beginning. a fresh beginning. the best way. there. may you do

find your mind controls your mind controls your own sunshine

feel inferior without fear

conquer from within

go to bed with determination

turn your wounds into wisdom

the heartbeat of beautiful destinations

every day is always under construction

------
fsiefken
would be nice to use it in combination with fortune or if I could use it as
login greeting. Load it up with the best quotes from the stoics, psalms, jesus
sirach, the gospels, pauls letters and ecclesiastes and all the existing
library. Put a good RND in front of it and you have a real Oracle greeting you
whenever you want!

------
jboogie77
This is similar to my site
[http://www.poemgenerator.com](http://www.poemgenerator.com). Not using markov
chains but concept is similar.

------
drdrey
I didn't get Markov chains until now. Thanks OP!

------
MechEStudent
Link is auto-blocked by security software. Is this a known-misbehaving domain?

~~~
eat_veggies
Probably the .xyz tld which a lot of software just straight up blocks

------
mberning
The results are not very convincing.

~~~
scoot
Not all of them, but:

    
    
        Someone must try to live forever.
        What are you waiting for?
    

is a doozy!

