How do you implement a good profanity filter?

后端 未结 21 2647
误落风尘
误落风尘 2020-11-22 04:27

Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs

21条回答
  •  没有蜡笔的小新
    2020-11-22 05:06

    Don't.

    Because:

    • Clbuttic
    • Profanity is not OMG EVIL
    • Profanity cannot be effectively defined
    • Most people quite probably don't appreciate being "protected" from profanity

    Edit: While I agree with the commenter who said "censorship is wrong", that is not the nature of this answer.

提交回复
热议问题