Sha256: abcc98cd70c0a0e2fd3347c9497af03b7e81028b2dfbc6b1a6899b167e07ffed

Contents?: true

Size: 865 Bytes

Versions: 6

Compression:

Stored size: 865 Bytes

Contents

= Swearjar

Simple profanity detection with content analysis. Added a larger dictionary to joshbuddy's version but many of the reasons are simply listed as "offensive" to save time.

== 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

6 entries across 6 versions & 1 rubygems

Version Path
cf-swearjar-1.0.6 README.rdoc
cf-swearjar-1.0.5 README.rdoc
cf-swearjar-1.0.4 README.rdoc
cf-swearjar-1.0.3 README.rdoc
cf-swearjar-1.0.2 README.rdoc
cf-swearjar-1.0.1 README.rdoc