Skip to content

Commit

Permalink
fix: exchange weak sensitive filter and sensitive filter
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Nov 11, 2023
1 parent 7089bb5 commit 48155e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ func initNamesMapping() error {

func initSensitiveWords() error {
SensitiveWordFilter = sensitive.New()
err := WeakSensitiveWordFilter.LoadWordDict("data/sensitive_words.txt")
err := SensitiveWordFilter.LoadWordDict("data/sensitive_words.txt")
if err != nil {
WeakSensitiveWordFilter = nil
SensitiveWordFilter = nil
return err
}
return nil
}

func initWeakSensitiveWords() error {
WeakSensitiveWordFilter = sensitive.New()
err := SensitiveWordFilter.LoadWordDict("data/weak_sensitive_words.txt")
err := WeakSensitiveWordFilter.LoadWordDict("data/weak_sensitive_words.txt")
if err != nil {
SensitiveWordFilter = nil
WeakSensitiveWordFilter = nil
return err
}
return nil
Expand Down

0 comments on commit 48155e6

Please sign in to comment.