textfilter
textfilter copied to clipboard
敏感词过滤的几种实现+某1w词敏感词库
Results
12
textfilter issues
Sort by
recently updated
recently updated
newest added
中文词表加载问题
1
对中文支持不好,python3对utf8支持很好了,建议修改,open(filename,'r',encoding='utf8')
Parse function ---- ```python def parse(self, path): with open(path, 'rb') as f: self.keywords = [x.decode('utf8').strip() for x in f.readlines()] ``` Filter function ---- ```python def filter(self, message, repl="*"): for kw...