SkillAgentSearch skills...

Swearjar

Put another nickel in the swearjar. Simple profanity detection with content analysis.

Install / Use

/learn @joshbuddy/Swearjar
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Swearjar

Simple profanity detection with content analysis.

Installation

gem install swearjar

Usage

require "swearjar"

sj = Swearjar.default

sj.profane?("jim henson has a massive hard on he is gonna use to fuck everybody")
# => true

sj.scorecard("jim henson has a massive hard on he is gonna use to fuck everybody")
# => {:sexual => 2}

sj.censor("jim henson has a massive hard on he is gonna use to fuck everybody")
# => "jim henson has a massive **** ** he is gonna use to **** everybody"

The censor mask * can be overridden:

sj.censor("damn", "X")
# => "XXXX"

To load from a custom config file, you can do the following:

# For an example see lib/config/en.yml
sj = Swearjar.new("my_swears.yml")
View on GitHub
GitHub Stars72
CategoryContent
Updated1y ago
Forks21

Languages

Ruby

Security Score

80/100

Audited on Jan 16, 2025

No findings