Skip to content

Instantly share code, notes, and snippets.

@dineybomfim
Last active July 18, 2018 12:06
Show Gist options
  • Save dineybomfim/886da2cb79801f1c511a1c26c9b14ea4 to your computer and use it in GitHub Desktop.
Save dineybomfim/886da2cb79801f1c511a1c26c9b14ea4 to your computer and use it in GitHub Desktop.
let strings = loadTextFile(fileName: file)
.replacingOccurrences(of: "\n", with: " ")
.components(separatedBy: " ")
MarkovModel.process(transitions: strings) { matrix in
print(matrix)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment