References:
- http://en.wikipedia.org/wiki/Markov_chain
- http://www.cs.princeton.edu/courses/archive/spr05/cos126/assignments/markov.html
The goal is to create a randomized text generator, which creates output based on a source text. The source text filename will be provided as a command line argument.
When run using "tao_te_ching.txt", I get silly sentences like these:
A good bookkeeper has an excellent memory, and acts without any expectations.
A journey of a great leader.
A kind heart makes the mind.
A large country should take the low place like a fool, my teachings.
A virtuous person will act out of duty, and thus is able to understand them, and in gaining, much is gained, and their family give them their form.
Accomplishments makes your labors good.
Act by not forcing.
After armies take to war, bad years must always follow.
Alert as if surrounded on all sides by the enemy.
All creatures in the level places, but people prefer to take the place of refuge and peace, and we are often our own worst enemy?
All movement returns to nothingness.
All of creation without trying to compete with it.
All things carry Yin yet embrace Yang.
All who do this and not what she knows is right, and people become rebellious, the Master shuns the use of violence.
Although it appears insignificant, nothing in the world, the greatest sounds cannot be further described, so we must not do.
Although the next country is close enough that they accomplish nothing.
Approach it and there will be able to understand my teachings become even more precious.
Because I do nothing, and the extremes.
Because it does not glorify herself, she diligently puts it into practice.
Because of this, great love extracts a great lumberjack.
Because she does are for the world is sacred vessel and it can't be seen.
Because their knowledge was so far superior I can only see what is meant by success is as dangerous as failure, and small countries benefit greatly from humility.
Because they are being manipulated, if a wise person acts out of pity, yet has not lost its power to harm, the less you comprehend.
Because those who have died.
Because you do not talk.
Before the universe was born there was something in the customs that they cherish.
Being and non-being produce each other.
Being eternal means everything returns to nothingness.
Being everywhere means it is to understand the way of the Tao, war horses are bread outside the cities.
Being one with Heaven, we begin to view death lightly, keep your eyes open for trouble ahead.