zaarly-swearjar 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/config/en.yml CHANGED
@@ -1,4 +1,4 @@
1
- default:
1
+ profanity:
2
2
  "anal": ["sexual"]
3
3
  "anus": ["sexual"]
4
4
  "arse": ["insult"]
@@ -55,7 +55,6 @@ default:
55
55
  "bitching": ["inappropriate"]
56
56
  "bitchtits": ["discriminatory"]
57
57
  "bitchy": ["insult"]
58
- "blow job": ["sexual"]
59
58
  "blowjob": ["sexual"]
60
59
  "blowjobs": ["sexual"]
61
60
  "bollocks": ["sexual"]
@@ -142,11 +141,10 @@ default:
142
141
  "cyberfuckers": ["sexual"]
143
142
  "cyberfucking": ["sexual"]
144
143
  "dago": ["discriminatory"]
145
- "damn": ["inappropriate"]
146
144
  "deggo": ["discriminatory"]
147
145
  "deepthroat": ["sexual"]
148
146
  "deepthroating": ["sexual"]
149
- "dick": ["sexual", "insult"]
147
+ "dick": ["sexual,:insult"]
150
148
  "dickbag": ["insult"]
151
149
  "dickbeaters": ["sexual"]
152
150
  "dickface": ["insult"]
@@ -284,8 +282,6 @@ default:
284
282
  "hardcoresex": ["sexual"]
285
283
  "hard on": ["sexual"]
286
284
  "heeb": ["discriminatory"]
287
- "hell": ["inappropriate"]
288
- "hell": ["inappropriate"]
289
285
  "ho": ["discriminatory"]
290
286
  "hoe": ["discriminatory"]
291
287
  "homo": ["discriminatory"]
@@ -495,86 +491,88 @@ default:
495
491
  "wank": ["sexual"]
496
492
  "wetback": ["discriminatory"]
497
493
  "whore": ["insult"]
494
+ "whores": ["insult"]
498
495
  "whorebag": ["insult"]
499
496
  "whoreface": ["insult"]
500
497
  "wop": ["discriminatory"]
501
- "bbw": ["questionable"]
502
- "bbws": ["questionable"]
503
- "bdsm": ["questionable"]
504
- "bj": ["questionable"]
505
- "bjs": ["questionable"]
506
- "boobs": ["questionable"]
507
- "booty": ["questionable"]
508
- "circumcised": ["questionable"]
509
- "clit": ["questionable"]
510
- "ddf": ["questionable"]
511
- "ddfree": ["questionable"]
512
- "dicks": ["questionable"]
513
- "dildo": ["questionable"]
514
- "fetishes": ["questionable"]
515
- "fondling": ["questionable"]
516
- "foreplay": ["questionable"]
517
- "foreskin": ["questionable"]
518
- "fuck": ["questionable"]
519
- "fucked": ["questionable"]
520
- "fucker": ["questionable"]
521
- "fwb": ["questionable"]
522
- "hookers": ["questionable"]
523
- "humilation": ["questionable"]
524
- "humiliation": ["questionable"]
525
- "intercourse": ["questionable"]
526
- "intimacy": ["questionable"]
527
- "kink": ["questionable"]
528
- "kinkier": ["questionable"]
529
- "kinky": ["questionable"]
530
- "lover": ["questionable"]
531
- "lust": ["questionable"]
532
- "milf": ["questionable"]
533
- "mistress": ["questionable"]
534
- "orgasmic": ["questionable"]
535
- "orgasms": ["questionable"]
536
- "rape": ["questionable"]
537
- "rimming": ["questionable"]
538
- "sexting": ["questionable"]
539
- "shemale": ["questionable"]
540
- "slave": ["questionable"]
541
- "slut": ["questionable"]
542
- "slutty": ["questionable"]
543
- "spank": ["questionable"]
544
- "spanked": ["questionable"]
545
- "spanking": ["questionable"]
546
- "std": ["questionable"]
547
- "str": ["questionable"]
548
- "submissive": ["questionable"]
549
- "swf": ["questionable"]
550
- "swm": ["questionable"]
551
- "tgirl": ["questionable"]
552
- "threesome": ["questionable"]
553
- "threesomes": ["questionable"]
554
- "vasectomy": ["questionable"]
555
- "busty": ["questionable"]
556
- "cuties": ["questionable"]
557
- "gag": ["questionable"]
558
- "lick": ["questionable"]
559
- "licked": ["questionable"]
560
- "licking": ["questionable"]
561
- "moan": ["questionable"]
562
- "oral": ["questionable"]
563
- "orally": ["questionable"]
564
- "passable": ["questionable"]
565
- "submission": ["questionable"]
566
- "throbbing": ["questionable"]
567
- "attracted": ["questionable"]
568
- "attractive": ["questionable"]
569
- "endowed": ["questionable"]
570
- "freaky": ["questionable"]
571
- "handsome": ["questionable"]
572
- "hunk": ["questionable"]
573
- "jerk": ["questionable"]
574
- "lips": ["questionable"]
575
-
576
-
498
+ "bbw": ["sexual"]
499
+ "bbws": ["sexual"]
500
+ "bdsm": ["sexual"]
501
+ "bj": ["sexual"]
502
+ "bjs": ["sexual"]
503
+ "boobs": ["sexual"]
504
+ "booty": ["sexual"]
505
+ "circumcised": ["sexual"]
506
+ "clit": ["sexual"]
507
+ "ddf": ["sexual"]
508
+ "ddfree": ["sexual"]
509
+ "dicks": ["sexual"]
510
+ "dildo": ["sexual"]
511
+ "fetishes": ["sexual"]
512
+ "fondling": ["sexual"]
513
+ "foreplay": ["sexual"]
514
+ "foreskin": ["sexual"]
515
+ "fuck": ["sexual"]
516
+ "fucked": ["sexual"]
517
+ "fucker": ["sexual"]
518
+ "fwb": ["sexual"]
519
+ "hookers": ["sexual"]
520
+ "humilation": ["sexual"]
521
+ "humiliation": ["sexual"]
522
+ "intercourse": ["sexual"]
523
+ "intimacy": ["sexual"]
524
+ "kink": ["sexual"]
525
+ "kinkier": ["sexual"]
526
+ "kinky": ["sexual"]
527
+ "lover": ["sexual"]
528
+ "lust": ["sexual"]
529
+ "milf": ["sexual"]
530
+ "mistress": ["sexual"]
531
+ "orgasmic": ["sexual"]
532
+ "orgasms": ["sexual"]
533
+ "rape": ["sexual"]
534
+ "rimming": ["sexual"]
535
+ "sexting": ["sexual"]
536
+ "shemale": ["sexual"]
537
+ "slave": ["sexual"]
538
+ "slut": ["sexual"]
539
+ "slutty": ["sexual"]
540
+ "spank": ["sexual"]
541
+ "spanked": ["sexual"]
542
+ "spanking": ["sexual"]
543
+ "std": ["sexual"]
544
+ "str": ["sexual"]
545
+ "submissive": ["sexual"]
546
+ "swf": ["sexual"]
547
+ "swm": ["sexual"]
548
+ "tgirl": ["sexual"]
549
+ "threesome": ["sexual"]
550
+ "threesomes": ["sexual"]
551
+ "vasectomy": ["sexual"]
552
+ "busty": ["sexual"]
553
+ "cuties": ["sexual"]
554
+ "lick": ["sexual"]
555
+ "licked": ["sexual"]
556
+ "licking": ["sexual"]
557
+ "moan": ["sexual"]
558
+ "oral": ["sexual"]
559
+ "orally": ["sexual"]
560
+ "passable": ["sexual"]
561
+ "submission": ["sexual"]
562
+ "throbbing": ["sexual"]
563
+ "attracted": ["sexual"]
564
+ "endowed": ["sexual"]
565
+ "hunk": ["sexual"]
566
+ "bastard": ["insult"]
567
+ "molest": ["sexual"]
568
+ "std": ["sexual"]
569
+ "stds": ["sexual"]
570
+ "herps": ["sexual"]
571
+ "herpes": ["sexual"]
572
+
577
573
  inappropriate:
574
+ "marijuana": ["inappropriate"]
575
+ "crossbow": ["inappropriate"]
578
576
  "m4m": ["inappropriate"]
579
577
  "m4mm": ["inappropriate"]
580
578
  "m4mw": ["inappropriate"]
@@ -590,8 +588,31 @@ inappropriate:
590
588
  "w4m": ["inappropriate"]
591
589
  "w4mw": ["inappropriate"]
592
590
  "w4w": ["inappropriate"]
593
-
591
+ "murder": ["inappropriate"]
592
+ "kush": ["inappropriate"]
593
+ "midget": ["inappropriate"]
594
+ "adderall": ["inappropriate"]
595
+ "firearm": ["inappropriate"]
596
+ "glock": ["inappropriate"]
597
+ "rifle": ["inappropriate"]
598
+ "splif": ["inappropriate"]
599
+ "cyanide": ["inappropriate"]
600
+ "adderal": ["inappropriate"]
601
+ "aderall": ["inappropriate"]
602
+ "vicodin": ["inappropriate"]
603
+ "mercenary": ["inappropriate"]
604
+
594
605
  questionable:
606
+ "gag": ["questionable"]
607
+ "mary jane": ["questionable"]
608
+ "hell": ["questionable"]
609
+ "hell": ["questionable"]
610
+ "attractive": ["questionable"]
611
+ "freaky": ["questionable"]
612
+ "handsome": ["questionable"]
613
+ "jerk": ["questionable"]
614
+ "lips": ["questionable"]
615
+ "slit": ["questionable"]
595
616
  "bareback": ["questionable"]
596
617
  "barefeet": ["questionable"]
597
618
  "bi": ["questionable"]
@@ -619,7 +640,7 @@ questionable:
619
640
  "domination": ["questionable"]
620
641
  "doms": ["questionable"]
621
642
  "erotic": ["questionable"]
622
- "escorts": ["questionable"]
643
+ "escort": ["questionable"]
623
644
  "exhibitionist": ["questionable"]
624
645
  "exhibitionists": ["questionable"]
625
646
  "fag": ["questionable"]
@@ -672,7 +693,7 @@ questionable:
672
693
  "sexxy": ["questionable"]
673
694
  "sexy": ["questionable"]
674
695
  "sissy": ["questionable"]
675
- "slapping": ["questionable"]
696
+ "slap": ["questionable"]
676
697
  "sperm": ["questionable"]
677
698
  "strapon": ["questionable"]
678
699
  "throating": ["questionable"]
@@ -774,7 +795,7 @@ questionable:
774
795
  "heels": ["questionable"]
775
796
  "hole": ["questionable"]
776
797
  "hot": ["questionable"]
777
- "husband": ["questionable"]
798
+ "crack": ["questionable"]
778
799
  "inches": ["questionable"]
779
800
  "ladies": ["questionable"]
780
801
  "lady": ["questionable"]
@@ -809,26 +830,85 @@ questionable:
809
830
  "virgin": ["questionable"]
810
831
  "weed": ["questionable"]
811
832
  "wear": ["questionable"]
812
- "wife": ["questionable"]
833
+ "get busy": ["questionable"]
813
834
  "woman": ["questionable"]
814
835
  "women": ["questionable"]
815
-
836
+ "ammo": ["questionable"]
837
+ "gun": ["questionable"]
838
+ "poison": ["questionable"]
839
+ "paintball": ["questionable"]
840
+ "shotgun": ["questionable"]
841
+ "pistol": ["questionable"]
842
+ "colt": ["questionable"]
843
+ "bong": ["questionable"]
844
+ "venom": ["questionable"]
845
+ "knife": ["questionable"]
846
+ "knives": ["questionable"]
847
+ "punch": ["questionable"]
848
+ "ammunition": ["questionable"]
849
+ "shoot": ["questionable"]
850
+ "dropkick": ["questionable"]
851
+ "mate": ["questionable"]
852
+ "kill": ["questionable"]
853
+ "killer": ["questionable"]
854
+ "bastard": ["questionable"]
855
+ "asshole": ["questionable"]
856
+ "gauge": ["questionable"]
857
+ "pump": ["questionable"]
858
+ "semi": ["questionable"]
859
+ "airsoft": ["questionable"]
860
+ "pot": ["questionable"]
861
+ "head": ["questionable"]
862
+ "shrooms": ["questionable"]
863
+ "shroom": ["questionable"]
864
+ "420": ["questionable"]
865
+ "4.20": ["questionable"]
866
+ "gloc": ["questionable"]
867
+ "bud": ["questionable"]
868
+ "aids": ["questionable"]
869
+ "topless": ["questionable"]
870
+ "cush": ["questionable"]
871
+ "damn": ["questionable"]
872
+
816
873
  needs_review:
817
- "sale": ["needs_review"]
874
+ "for sale": ["needs_review"]
875
+ "someone to buy": ["needs_review"]
818
876
  "sell": ["needs_review"]
877
+ "selling": ["needs_review"]
878
+ "offer": ["needs_review"]
879
+ "offering": ["needs_review"]
880
+ "job": ["needs_review"]
881
+ "sale": ["needs_review"]
882
+ "exchange": ["needs_review"]
883
+ "trade": ["needs_review"]
884
+ "trading": ["needs_review"]
885
+ "free": ["needs_review"]
886
+ "buyer": ["needs_review"]
887
+ "I have": ["needs_review"]
888
+ "client": ["needs_review"]
889
+ "want work": ["needs_review"]
890
+ "need work": ["needs_review"]
819
891
  "test": ["needs_review"]
820
-
892
+ "money": ["needs_review"]
893
+ "cash": ["needs_review"]
894
+ "roommate": ["needs_review"]
895
+ "gig": ["needs_review"]
896
+ "gigs": ["needs_review"]
897
+ "sail": ["needs_review"]
898
+ "sailing": ["needs_review"]
899
+ "jew": ["needs_review"]
900
+ "moslim": ["needs_review"]
901
+ "muslim": ["needs_review"]
902
+ "christian": ["needs_review"]
903
+ "catholic": ["needs_review"]
904
+ "mormon": ["needs_review"]
905
+ "pope": ["needs_review"]
906
+ "getting rid": ["needs_review"]
907
+
821
908
  assault:
822
909
  "die": ["assault"]
823
910
  "death": ["assault"]
824
911
  "kill": ["assault"]
825
912
  "killing": ["assault"]
826
913
  "maim": ["assault"]
827
- "torture": ["assault"]
828
-
829
- trading:
830
- "trade": ["trading"]
831
-
832
- selling:
833
- "for sale": ["selling"]
834
- "someone to buy": ["selling"]
914
+ "torture": ["assault"]
@@ -1,3 +1,3 @@
1
1
  class Swearjar
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -1,30 +1,34 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SwearJar do
4
-
5
- it "should detect dirty words" do
6
- SwearJar.default.profane?('fuck you jim henson').should be_true
7
- end
8
-
9
- it "should detect dirty words regardless of case" do
10
- SwearJar.default.profane?('FuCk you jim henson').should be_true
11
- end
12
-
13
- it "should not detect non-dirty words" do
14
- SwearJar.default.profane?('i love you jim henson').should be_false
4
+ context "arsehole" do
5
+ it "is profanity" do
6
+ SwearJar["profanity"].profane?("arsehole").should be_true
7
+ end
15
8
  end
16
-
17
- it "should give us a scorecard" do
18
- SwearJar.default.scorecard('fuck you jim henson').should == {'questionable' => 1}
9
+
10
+ context "marijuana" do
11
+ it "is inappropriate" do
12
+ SwearJar["inappropriate"].profane?("marijuana").should be_true
13
+ end
19
14
  end
20
-
21
- it "should detect multiword" do
22
- SwearJar.default.scorecard('jim henson has a hard on').should == {'sexual' => 1}
15
+
16
+ context "freaky" do
17
+ it "is questionable" do
18
+ SwearJar["questionable"].profane?("freaky").should be_true
19
+ end
23
20
  end
24
21
 
25
- it "should censor a string" do
26
- SwearJar.default.censor('jim henson has a massive hard on he is gonna use to fuck everybody').should == 'jim henson has a massive **** ** he is gonna use to **** everybody'
22
+ context "offer" do
23
+ it "is needs review" do
24
+ SwearJar["needs_review"].profane?("offer").should be_true
25
+ end
26
+ end
27
+
28
+ context "death" do
29
+ it "is assault" do
30
+ SwearJar["assault"].profane?("death").should be_true
31
+ end
27
32
  end
28
-
29
33
  end
30
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaarly-swearjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-11-17 00:00:00.000000000 Z
13
+ date: 2011-12-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fuzzyhash
17
- requirement: &70201539784180 !ruby/object:Gem::Requirement
17
+ requirement: &70242330542900 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.0.11
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70201539784180
25
+ version_requirements: *70242330542900
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &70201539783680 !ruby/object:Gem::Requirement
28
+ requirement: &70242330542080 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70201539783680
36
+ version_requirements: *70242330542080
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rake
39
- requirement: &70201539783080 !ruby/object:Gem::Requirement
39
+ requirement: &70242330541120 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70201539783080
47
+ version_requirements: *70242330541120
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &70201539807320 !ruby/object:Gem::Requirement
50
+ requirement: &70242330540500 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70201539807320
58
+ version_requirements: *70242330540500
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: activesupport
61
- requirement: &70201539806700 !ruby/object:Gem::Requirement
61
+ requirement: &70242330539720 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70201539806700
69
+ version_requirements: *70242330539720
70
70
  description: Put another nickel in the swearjar. Simple profanity detection with content
71
71
  analysis.
72
72
  email: joshbuddy@gmail.com
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: -731051751863397089
106
+ hash: -1906850485618319307
107
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements: