Sha256: 8afb04f8f8dbb92dd778bbb2b793ce391496e13aa7b512fbd463ff64af598545

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

= Swearjar

Simple profanity detection with content analysis.

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

2 entries across 2 versions & 1 rubygems

Version Path
swearjar-1.0.0 README.rdoc
swearjar-0.1.2 README.rdoc