Skip to content

nstott/gomarkov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

just some fun playing with dissociated press type text generation
we can populate a group of triples from a corpus of text, and then use it to generate some semi random text.
if you supply the text as a series of paragraphs, then we can look at the first two words of each paragraph and choose among them randomly to begin our generation, and then randomly choose a triple.third


this will work as a nice text case
func main() {
	gomarkov.ProcessString("Go placidly amid the noise and haste, and remember what peace there may be in silence. As far as possible without surrender be on good terms with all persons. Speak your truth quietly and clearly; and listen to others, even the dull and ignorant; they too have their story.\n\nAvoid loud and aggressive persons, they are vexations to the spirit. If you compare yourself with others, you may become vain and bitter; for always there will be greater and lesser persons than yourself. Enjoy your achievements as well as your plans.\n\nKeep interested in your own career, however humble; it is a real possession in the changing fortunes of time. Exercise caution in your business affairs; for the world is full of trickery. But let this not blind you to what virtue there is; many persons strive for high ideals; and everywhere life is full of heroism.\n\nBe yourself. Especially, do not feign affection. Neither be cynical about love; for in the face of all aridity and disenchantment it is perennial as the grass.\n\nTake kindly the counsel of the years, gracefully surrendering the things of youth.\n\nNurture strength of spirit to shield you in sudden misfortune. But do not distress yourself with imaginings. Many fears are born of fatigue and loneliness. Beyond a wholesome discipline, be gentle with yourself.\n\nYou are a child of the universe, no less than the trees and the stars; you have a right to be here. And whether or not it is clear to you, no doubt the universe is unfolding as it should.\n\nTherefore, be at peace with God, whatever you conceive Him to be and whatever your labours and aspirations, in the noisy confusion of life keep peace with your soul.\n\nWith all its sham, drudgery and broken dreams, it is still a beautiful world. Be cheerful. Strive to be happy.\nNetflix and NBC Universal have extended their partnership to bring several of NBC's top shows to the rental company's streaming service.\nThe two companies say they have entered into a \"multiyear deal\" that starts next week, but they didn't specify how long that deal is good for.\nUnder the new arrangement, \"hundreds\" of \"Saturday Night Live\" episodes from the past 35 years, as well as \"day-after broadcast\" of the show's next three seasons, will be available on Netflix Instant Streaming. NBC is also offering every previous-season episode of \"30 Rock,\" \"The Office,\" and \"Law & Order: SVU.\" Earlier seasons of those shows already on Netflix will still be available.\nAll episodes of the venerable SyFy series \"Battlestar Galactica\" will also be available on the service.\nNBC Universal and Netflix said that \"Monk\" and \"Friday Night Lights,\" among many other shows, will also be included in the expanded relationship between the companies.\nThe decision by NBC Universal to offer so much content on Netflix's $9-per-month streaming service comes just a couple days after Jeff Zucker, the company's CEO, said that he doesn't want to make NBC's content available via the new Apple TV. The Apple set-top box, which also streams Netflix content, will offer users the option to watch individual episodes of television series for 99 cents per rental. Zucker said he's afraid that Apple TV will \"devalue\" NBC's content.\nNBC's shows will be available on Netflix's streaming service beginning next week.")
	gomarkov.Generate(100)
}

About

text generation with markov chains

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages