This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build_markov_chain(data, n): | |
chain = { | |
'_initial':{}, | |
'_names': set(data) | |
} | |
for word in data: | |
word_wrapped = str(word) + '.' | |
for i in range(0, len(word_wrapped) - n): | |
tuple = word_wrapped[i:i + n] | |
next = word_wrapped[i + 1:i + n + 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
Error; | |
console.log('aca') | |
function e(t, n, o) { | |
const r = o(); | |
return t > 0 ? r.catch((r) => new Promise((e, t) => setTimeout(e, n)).then((r) => e(t - 1, n, o))) : r; | |
} | |
var t; | |
!(function (e) { | |
function t() { |