profanity-filter 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2577d7d8d090b82467c6d2f002067d3d41d2e779f7e31b5813ce3709ff13b09a
4
- data.tar.gz: a9644450904f18d2261b8d86a4be3696dd4e675d9a4fb87fefa7d6ee98ec47c2
3
+ metadata.gz: 37f63a8273bf8fd2020d986fb9388e8bda853667c6d81577ba09a32db235f17b
4
+ data.tar.gz: 90b73051145aed17a064fd02f77452689c78a921f137438c2008a2ce648b094e
5
5
  SHA512:
6
- metadata.gz: 189dab97e9065eed4da6ff0013dad4d63234ef271ac5cb31f16dd4a1631558e76a21b4bd4614b15191156ee643007948f3422ff88eb108827d7ac63e453b5e81
7
- data.tar.gz: 2ece6bd1a9910ef30c969c85e266ccec7ec128395b649e0386feb18db10d52926be7a94ce4fd911995981088f37c34e1e91f9acb866e2769fbbf906e21c3f4ff
6
+ metadata.gz: 6366ac28841bb359b6bf884b8a8d97b45e3fb7a4fe66cb6240a32e032952f3a92786f21ac581f78f8a60bf2340000efc31b21aefe4be3104d8be2906a39c620c
7
+ data.tar.gz: de01d8b3c3e1428ec4dc6f684dd0e625ccbcf2d3682bdfef524424a0283e51b2d94e19e36675e0314ebea9290d3cef326880390e3dfa01d434d1d7a3fe043118
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- profanity-filter (0.1.2)
4
+ profanity-filter (0.1.4)
5
5
  webpurify
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  coderay (1.1.2)
11
- json (2.1.0)
11
+ json (2.2.0)
12
12
  method_source (0.9.2)
13
13
  minitest (5.11.3)
14
14
  pry (0.12.2)
data/README.md CHANGED
@@ -1,3 +1,20 @@
1
+ [![Gem Version](https://badge.fury.io/rb/profanity-filter.svg)](https://badge.fury.io/rb/profanity-filter)
2
+
3
+ ## Profanity Filter
4
+ Strategies to publish offensive texts online can be roughly grouped into 5 categories:
5
+ 1. Similarities, eg. b ⇔ 6
6
+ 2. Diacritics(sound alteration), eg. u ⇔ ü, ù, ú
7
+ 3. Constructions(multi-part), eg. W ⇔ VV, V ⇔ \/
8
+ 4. Injections, eg. s-h-i-t, shhhhhhhhhhhit
9
+ 5. Unicode(same shape but different unicode), eg ⒜, ⍺, a, 𝐚, 𝑎, 𝒂, 𝒶, 𝓪, 𝔞, 𝕒, 𝖆, 𝖺, 𝗮, 𝘢, 𝙖
10
+
11
+ This profanity filter implements:
12
+ - [Full Support] diacritics, injections, unicode
13
+ - [Partial Support] similarities, constructions
14
+
15
+ This gem is also integrated with [Web Purify](https://www.webpurify.com). Usage example below.
16
+
17
+
1
18
  ## Installation
2
19
 
3
20
  Add this line to your application's Gemfile:
@@ -19,6 +36,7 @@ Or install it yourself as:
19
36
  ```ruby
20
37
  # without WebPurify
21
38
  pf = ProfanityFilter.new
39
+
22
40
  # with WebPurify
23
41
  pf = ProfanityFilter.new(web_purifier_api_key: [YOUR-API-KEY])
24
42
 
@@ -46,3 +64,6 @@ The gem is available as open source under the terms of the [MIT License](https:/
46
64
  ## Code of Conduct
47
65
 
48
66
  Everyone interacting in the ProfanityFilter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cardinalblue/profanity-filter/blob/master/CODE_OF_CONDUCT.md).
67
+
68
+ ## Todo
69
+ pluggable logging and strategies
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'exact_match_strategy'
4
- require 'pry'
5
4
 
6
5
  module ProfanityFilterEngine
7
6
  class LeetExactMatchStrategy < ExactMatchStrategy
@@ -1,3 +1,3 @@
1
1
  class ProfanityFilter
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.4'
3
3
  end
@@ -5,7 +5,7 @@ require 'profanity-filter/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'profanity-filter'
7
7
  spec.version = ProfanityFilter::VERSION
8
- spec.authors = ['Maso Lin', 'Jenny Shih']
8
+ spec.authors = ['Maso Lin', 'Jenny Shih', 'YenTing Chen']
9
9
  spec.email = ['dev@cardinalblue.com']
10
10
 
11
11
  spec.summary = 'To detect if a given string contains profane words.'
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profanity-filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maso Lin
8
8
  - Jenny Shih
9
+ - YenTing Chen
9
10
  autorequire:
10
11
  bindir: exe
11
12
  cert_chain: []
12
- date: 2019-07-10 00:00:00.000000000 Z
13
+ date: 2019-07-30 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: webpurify