forked from an/flokati
test
This commit is contained in:
parent
45ba50b132
commit
664d8bfcb3
|
@ -23,8 +23,6 @@ import (
|
|||
"git.dnix.de/an/xlog"
|
||||
)
|
||||
|
||||
var markovPrefixLen *int
|
||||
|
||||
var (
|
||||
//markovPrefixLen = flag.Int("markov_prefix_len", 3, "markov: prefix len")
|
||||
markovAnswerLen = flag.Int("markov_answer_len", 10, "markov: answer len")
|
||||
|
@ -38,7 +36,6 @@ var markovChain *MarkovChain
|
|||
func init() {
|
||||
MsgFuncs["markov"] = markovHandleMessage
|
||||
RunFuncs["markov"] = markovRun
|
||||
*markovPrefixLen = 3
|
||||
}
|
||||
|
||||
func markovHandleMessage(m *Message) {
|
||||
|
@ -62,7 +59,8 @@ func markovHandleMessage(m *Message) {
|
|||
}
|
||||
|
||||
func markovRun() {
|
||||
markovChain = markovNewChain(*markovPrefixLen)
|
||||
//markovChain = markovNewChain(*markovPrefixLen)
|
||||
markovChain = markovNewChain(3)
|
||||
err := markovChain.Load(*markovStateFile)
|
||||
if err != nil {
|
||||
xlog.Error(err.Error())
|
||||
|
|
Loading…
Reference in New Issue