How to implement decent “bad word filter”?

穿精又带淫゛_ 提交于 2019-12-10 12:37:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!