syyongx / go-wordsfilter

A high performance sensitive word filter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wf.Contains has a bug

wxbacy opened this issue · comments

texts := []string{
"Miyamoto Musashi",
"妲己",
"アンジェラ",
"ความรุ่งโรจน์",
}
wf := wordsfilter.New()

// Generate
root := wf.Generate(texts)

c1 := wf.Contains("妲己", root)
// c1 true
c2 := wf.Contains("妲己2333", root)
// c2 false

Why c2 is false?

74232c7 has fixed it.

Thank you very much for the problem you found.