Sha256: 6cd282303966e44b93a5c6fdeaf44900777cd0ab3803cf091f559ba6313228ac

Contents?: true

Size: 815 Bytes

Versions: 5

Compression:

Stored size: 815 Bytes

Contents

= Swearjar

Simple profanity detection with content analysis. Added a different dictionary and a few tweaks to joshbuddy's version 

== Installation

gem install swearjar

== Usage

  require 'swearjar'

  Swearjar.default.profane?('jim henson has a massive hard on he is gonna use to fuck everybody')
  << true

  Swearjar.default.scorecard('jim henson has a massive hard on he is gonna use to fuck everybody')
  << {:sexual => 2}

  Swearjar.default.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'

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

  sj = Swearjar.new
  sj.load_file('my_yaml.yml')

The YAML file can have two sections, `simple` and `regex`. For an example, see `lib/config/en.yml`.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cf-swearjar-1.1.1 README.rdoc
cf-swearjar-1.1.0 README.rdoc
cf-swearjar-1.0.9 README.rdoc
cf-swearjar-1.0.8 README.rdoc
cf-swearjar-1.0.7 README.rdoc