arnaucode 13e26f1c71 | 7 years ago | |
---|---|---|
.gitignore | 7 years ago | |
LICENSE | 7 years ago | |
README.md | 7 years ago | |
main.go | 7 years ago | |
markov.go | 7 years ago |
markov chains text generator written in Go from scratch
states := markov.train(text)
generatedText := markov.generateText(states, firstWord, count)
fmt.Println(generatedText)
(in the text variable, goes the text content, can be loaded from a .txt file)