Bad Word Filter PRO - Solution against profanity and obscenity

Bad Word Filter (BWF)

The “Bad Word Filter” (aka profanity or obscenity filter) is exactly what the title suggests: a tool to filter swearwords and other “bad sentences”.

There are multiple uses for the “Bad Word Filter” in your game, but the three most obvious would be user names (e.g. for high-scores), in a chat within the game and character names.

If you don’t want some wannabe-funny-guy to use the user name “a55-face”, “S+alin” or any other word you don’t approve of, just enable the “Bad Word Filter” and instead of the swearword something like this comes out: #$@&%*!

In our library included are the following 25 languages (bad words as regular expressions which matches ten thousands of word variations):

Arabic, Chinese, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hindi, Hungarian, Italian, Japanese, Korean, Norwegian, Persian, Polish, Portuguese, Russian, Spanish, Swedish, Thai, Turkish and Vietnamese.

Furthermore, you can add (or remove) any word and language you’d like!

We also included the following special filters: domains (URLs/emails), reserved names (from games, movies, comics etc.), global bad words, emojis (miscellaneous symbols), excessive capitalization and punctuation.

The “Bad Word Filter” works with any language and writing system. It is easily customizable, runs on all Unity platforms and the source code (including all bad words provided) is also contained within the package.

Features:
Filter function

  • Review, select, read and replace:

  • Bad words and inappropriate phrases

  • Domains, URLs and email addresses

  • Excessive capitalization (such as “HEY DUDE”)

  • Excessive punctuation (e.g. “!!11111”)

  • All four filters can be used separately and changed during run-time

Languages
Contains over 5’000 of regular expressions in 25 languages - equivalent to tens of thousands of word variations!
Supports any language and any writing system:

  • Arabic, Cyrillic, Chinese, Japanese, etc.
  • Including ltr / rtl (left to right or right to left)
  • Automated (easy) pluralization of English terms

Flexible & expandable

  • Easy modifications/additions to the existing sources (“bad words”).

  • Multi-threaded and lightning fast - even with thousands of words!

  • C# delegates and Unity events

  • Use the preconfigured providers for resources, files and URLs - or add your own provider (e.g. for XML, JSON)

  • Meta data for sources (e.g. descriptions, icons)

  • All sources („bad words“) provided

Documentation & control

  • Test all the functions in the editor
  • Powerful API for maximum control
  • Detailed demo scene
  • Comprehensive documentation and support
  • Full C# source code

Compatibility

  • Supports all build platforms
  • Works with Windows, Mac and Linux editors
  • Compatible with Unity 2019.4 – 2023
  • Works with Online Check
  • PlayMaker actions

Some impressions:

Video:

AssetStore:
Bad Word Filter PRO
Essential Tools Bundle
All Tools Bundle

Our other assets

Demo:
WebGL

**
**Changes

Feel free to download and test it.
Any constructive comments are very welcome!

Cheers
Stefan

1 Like

I just noticed this in the store. Like everyone, I know there are limitations to what can be done with a profanity filter, but I’m wondering how sophisticated this is intended to become. So I have a few questions:

Will it let me use a different bad word list for player names than the one I use to filter chat? I ask because I might want to disallow copyrighted or trademarked names when making player names, whereas it would be fine to use such words in chat.

On the use of bad player names, I’d like to reject the entry and have it highlight the improper usage in all caps and maybe bold as well (in case the original entry was in all caps). In the chat it will either print the profanity in all caps (and bold) or substitute a @#$! string, depending on which option is selected. Is this easily done?

Also, a common problem with profanity filters is that either they don’t search in-string (so a person can literally type “curseword” or *curseword, and it passes) or if they do search in-string, they don’t allow for proper words that can contain bad words. It would be great to have the ability to not only specify bad words, but also to list acceptable words that contain bad word strings.

Hi Hopeful!

Thank you for your interest in our product!

You can easily build your own resource files and use them whenever you want. It’s a really flexible system. You can e.g. have a resource “copyrightednames” and another one like “mybadwords”, Then you are able to decide during runtime which one you would like to use. For more informations, please take a look at the docs in chapter 4&5.

To your second question: yes, it is possible to get the first or all bad words/sentences inside a given string back, but you have to mark them by yourself (e.g. with IndexOf)
BUT, there is als a function to replace all bad words/sentences with a generated string (same length as the bad words/sentences). The result will be something like #$@&%*!

The answer to your last question is again yes! :slight_smile: But please feel free to test our demo to see if it’s good enough for you.

If you have any questions or suggestions, please let us know.

Cheers
Stefan

Yeah, our asset got a 5 star rating :slight_smile: happy time

Thank you dear customers!

I was looking for something like this. I rolled my own for a project, but did not spend as much time on it as I really should have. I will probably be picking this up soon, just wish I saw it before the sale price expired :slight_smile:
This is something I was surprised I did not see when I looked for one in the store at the time I was looking for one, glad you decided to spend the time on one.

Hi bobbylee

Thanks for your interest in our product!
I’m glad you thinking about using it :wink:

Currently, I’m working on an update to add two new languages:

  • Norwegian
  • Swedish

I’m also working on improved pattern matching and thinking about a white-list…

Anyway, sad you missed the sale :frowning: The price will raise over time (while adding more and more languages) - but probably it’s on sale some day :slight_smile:

Have a nice day!

Regards
Stefan

Hey Stefan,
I’m looking for an asset which will filter user input for SQLite forbidden symbols, like ’ " ', AND, WHERE and so on. I’m not talking about SQL injection prevention tool, but something simple which will filter symbols which may corrupt the DB.

Does your tool is able to provide that?

Cheers,
Ilya

1 Like

Hi Ilya

I’d like to sell you my asset, but to be honest, I don’t think it’s the right tool (at the moment) for what you would accomplish. :slight_smile:
What about the following solution?

Don’t escape the strings - use a parametrized query.
Is that possible in your context? If it’s not, let me know and I figure something out…

Have a nice Sunday!

Cheers
Stefan

We will soon publish an update to the asset store.

It will contain the following new languages:

  • Portuguese

  • Czech

  • Hungarian

We also added the “Fuzzy” recognition and an experimental (undocumented) RegEx-function. This means, that you can modify the matching criteria with RegEx. You can write a resource and put the RegEx instead of “simple” bad words/sentences. E.g.:

(((?!\b(?:assum|assimil)[\w]*\b))ass)

This will match all words containing “ass” but exclude “assum” (e.g. “I assume …”) and “assimil” (like “assimilation”).

You can do all kind of crazy matching stuff with RegEx and it’s totally up to you, what and how you will match something (but to unleash the full power of this feature, you have to set the detection to “Fuzzy”).

Have a nice weekend!

Cheers
Stefan

Looks interesting. I notice it doesn’t deal with Scunthorpe though!

Hi Rikrok

Thank you for your interest!
We will release an update soon where this problem will be fixed - the current web demo is already up-to-date. :slight_smile:
We’re always thankful for input and we constantly try to improve the asset.

Cheers
Stefan

Hmm now the profanity in question never gets picked by fuzzy recognition.
Nevertheless I’m sure you’ll address it. Sold!

Thanks, we’ll look into it and will recalibrate the detection rate to gain even better results.
Just let me know if you find other things that could be improved.

Could you add fuzzy recognition into the example scenes and documentation?
Obviously I can remove them myself but the kill words, lmao and tainted love feel like overkill to me.

The current asset store version (1.2.0) doesn’t support “Fuzzy recognition”. But I submitted the updated version 1.3.0 a while ago - hopefully, it will be available for download later today. :slight_smile:

Or just send me an email with your invoice number to assets@crosstales.com and I send you the latest version.

Hi there
I bought your filter some time ago and am very happy with it. Unfortunately I missed the sale :slight_smile:
So far I am impressed with the amount of updates that you made, thanks!
Nevertheless, do you plan on introducing something like an URL-Filter?
Cheers, Hippi

Hi Hippi

Thank you for buying our asset! We will keep up our effort on this asset to build the best solution for Unity developers.

So I’ve just made some improvements which might interest you:

-A domain-filter for URLs/emails
-Prevention of excessive capitalization
-Prevention of excessive punctuation

And we added Turkish as the language number 20 :slight_smile:

See it here in action

We will (hopefully) publish the update 1.4.0 tomorrow to the asset store - I hope this is good news for you.

Just let me know, if you have any other wishes.

Regards
Stefan

Sounds good, thank you!

Did you censor Cheese? Because that offends me slightly.
Oh and bad is a negative term too, but it could be positive like “bad @$$”.

Edit: I actually found a few words that aren’t censored, and certain words that are allowed but similar synonyms that aren’t, because I guess Labia makes ‘god’ frown but Cervix is totally okay.
I don’t know how to feel about this plugin. Can you customize this? I’d honestly use this to blacklist spam links, but allow everything else. Freedom of speech is pretty great, unless you’re a bot.

“toy rubber bouncy balls”
Oh no it isn’t Context Sensitive.

Now I can’t talk about how much I love putting sausages between buns and then putting ketchup on them, because “sausage” can mean penis, but shaft isn’t censored, but I used “sausage” to talk about how I love ketchup on my hotdogs.
I swear, I’m not a terrible person! I just love ketchup on my sausage!

Niggardly isn’t profanity either, according to google it means:

"not generous; stingy.
‘serving out the rations with a niggardly hand’ "

But I guess I’ll leave that up to you.

Nope, cheese isn’t censored - but as a Swiss guy, I have to like it :wink:
Anyway, you can censor what ever you want - the system is totally flexible.

1 Like