python 敏感词

敏感词过滤:

github:https://github.com/observerss/textfilter/blob/master/filter.py
>>> f = DFAFilter()
>>> f.add("sexy")
>>> f.filter("hello sexy baby")
hello **** baby

敏感词库:

github:https://github.com/konsheng/Sensitive-lexicon/tree/main/Vocabulary
posted @ 2024-09-03 09:46  二月雪  阅读(2)  评论(0编辑  收藏  举报