How do you implement a good profanity filter?

后端 未结 21 2743
误落风尘
误落风尘 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:15

    I concluded, in order to create a good profanity filter we need 3 main components, or at least it is what I am going to do. These they are:

    1. The filter: a background service that verify against a blacklist, dictionary or something like that.
    2. Not allow anonymous account
    3. Report abuse

    A bonus, it will be to reward somehow those who contribute with accurate abuse reporters and punish the offender, e.g. suspend their accounts.

提交回复
热议问题