How do you implement a good profanity filter?

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

    I collected 2200 bad words in 12 languages: en, ar, cs, da, de, eo, es, fa, fi, fr, hi, hu, it, ja, ko, nl, no, pl, pt, ru, sv, th, tlh, tr, zh.

    MySQL dump, JSON, XML or CSV options are available.

    https://github.com/turalus/openDB

    I'd suggest you to execute this SQL into your DB and check everytime when user inputs something.

提交回复
热议问题