1
2
Fork
You've already forked profanity
0
Profanity Checker for zig
  • Zig 100%
Find a file
2026年04月04日 12:53:37 +10:00
src Remove "crow" from English list 2026年04月04日 12:53:37 +10:00
.gitignore Basic profanity checker 2026年04月01日 09:40:43 +10:00
build.zig Basic profanity checker 2026年04月01日 09:40:43 +10:00
build.zig.zon Remove "crow" from English list 2026年04月04日 12:53:37 +10:00
LICENSE.md Basic profanity checker 2026年04月01日 09:40:43 +10:00
README.md Add a related reading link 2026年04月04日 09:59:20 +10:00

🧹 Profanity checker

A small dependency free library to check if a word or word phrase exactly matches a ban list.

This library does not support LLM style context aware checking of sentences.

📝 Usage

Tokenise your text into words and use profanity.isProfanity(word) to check if it is on the ban list.

constprofanity=@import("profanity");pubfnmain()void{std.log.info("{any}",.{profanity.isProfanity("badword")});std.log.info("{any}",.{profanity.isProfanity("bad phrase")});}

📨 Contributing

Contributions under the MIT license are welcome. Consider raising an issue first to discuss the proposed change.

Updates to the word list, or addition of ban lists for other languages are very welcome. Additional supporting code will also be considered.

📚 References

Helpful reading on this topic:

🔒 License

This code is released under the terms of the MIT license. This code is useful for my purposes. No warrantee is given or implied that this library will be suitable for your purpose and no warantee is given or implied that this code is free from defects.