问题
How can I create the good bad word chat filter? For example, let users not type Poop and send them warning.
However it should also filter pooopppp , P00p, Po0p, P0o0o0op, (or whatever trick they try to use) etc.
回答1:
You should implement some Machine Learning to filter that. I recommend this : Google Tensorflow.
What you should do is to create the tensorflow engine, train them with bad words eg : Poop, P0op, Po0pp, etc... and after several training the engine will able to tell that Po0000p considered as bad word.
While Machine Learning might need steep learning curve, you can follow the tutorial at https://developers.google.com/machine-learning/crash-course/.
来源:https://stackoverflow.com/questions/50225202/how-to-implement-decent-bad-word-filter