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