Skip to content

Commit

Permalink
clean spam samples
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 6, 2023
1 parent 8bfadc1 commit e62c5a6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1,781 deletions.
2 changes: 1 addition & 1 deletion app/bot/spam.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func (s *SpamFilter) tokenize(inp string) map[string]int {
continue
}
token = s.cleanEmoji(token)
token = strings.Trim(token, ".,!?-:;()")
token = strings.Trim(token, ".,!?-:;()#")
token = strings.ToLower(token)
tokenFrequency[strings.ToLower(token)]++
}
Expand Down
Loading

0 comments on commit e62c5a6

Please sign in to comment.