Fixed a markov chain thing i guess
This commit is contained in:
parent
29a21a2f8f
commit
92a4807322
|
@ -152,7 +152,7 @@ local markov = command("markov",{
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
markov_instance:load_state(preset)
|
markov_instance:load_state(preset)
|
||||||
local output = markov_instance:run("The",100)
|
local output = markov_instance:run(preset[1],100)
|
||||||
msg:reply(output)
|
msg:reply(output)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
markov = require("markov")
|
markov = require("markov")
|
||||||
json = require("json")
|
json = require("json")
|
||||||
text = [[
|
text_file = io.open("input",'r')
|
||||||
|
text = text_file:read("*a")
|
||||||
]]
|
text_file:close()
|
||||||
markov_instance = markov.new(text)
|
markov_instance = markov.new(text)
|
||||||
preset = io.open("new_preset.json","w")
|
preset = io.open("new_preset.json","w")
|
||||||
a = markov_instance:save_state()
|
a = markov_instance:save_state()
|
||||||
|
|
Loading…
Reference in New Issue