MCPcopy Create free account
hub / github.com/TruthHun/BookStack / loadDict

Function loadDict

utils/util.go:87–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func loadDict() {
88 beego.Info("加载分词词典...")
89 dict := "dictionary/dictionary.txt"
90 err := seg.LoadDict(dict)
91 if err != nil {
92 beego.Error("加载分词词典失败!请在程序根目录启动程序", err.Error())
93 }
94 seg.LoadStop("dictionary/stop_tokens.txt, dictionary/stop_word.txt")
95 te.WithGse(seg)
96 err = te.LoadIdf("dictionary/idf.txt")
97 if err != nil {
98 beego.Error("加载分词词典失败!请在程序根目录启动程序", err.Error())
99 }
100 beego.Info("加载分词词典完成!")
101}
102
103func PrintInfo() {
104 fmt.Println("Service: ", "BookStack")

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected