module
Version:
v0.0.0-...-60698ea
Opens a new window with list of versions in this module.
Published: Nov 15, 2021
License: MIT
Opens a new window with license information.
README
¶
sensitive-word-detect
sensitive words detection
Golang version of observerss/textfilter
- toy work for ByteDance backend trainingcamp
Example
package utils
import (
"github.com/Karshilov/sensitive-word-detect/automaton"
"github.com/Karshilov/sensitive-word-detect/utils"
)
var SensitiveWordsFilter = func() automaton.ACAutomaton {
keywords, _ := utils.GetKeywords()
ac := automaton.ACAutomaton{}
ac.Reserve(1000000)
for _, v := range keywords {
ac.Insert(v)
}
ac.Build()
return ac
}()
Directories
¶
Click to show internal directories.
Click to hide internal directories.