We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def parse(self, path): with open(path, 'rb') as f: self.keywords = [x.decode('utf8').strip() for x in f.readlines()]
def filter(self, message, repl="*"): for kw in self.keywords: message = message.replace(kw, len(kw)*repl) return message
之前的版本是2.7的我运行不了,我自己根据python3.7改了下NaiveFilter的function。(我也把敏感词那个文件改成txt文件了)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Parse function
Filter function
之前的版本是2.7的我运行不了,我自己根据python3.7改了下NaiveFilter的function。(我也把敏感词那个文件改成txt文件了)
The text was updated successfully, but these errors were encountered: