classifier 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/classifier/bayes.rb +2 -1
  3. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 100ebc0413bceeeb5148d4fed13de9cf9c9400016fc9f005d0d6a8f440ecf361
4
- data.tar.gz: d8ff488e9fd84e28539b2546a1bb338deeecde8f24b0bcf312c04e2866137968
3
+ metadata.gz: 8c8010bf5648dd9ca16e4c15e44c627c295978440a15e8ce2bd8314a91a050f7
4
+ data.tar.gz: 168a80242021c3153b405a7102e480a76a66916eedb628e3d90a150bbe3f69a3
5
5
  SHA512:
6
- metadata.gz: f41ee004b5d4c0a6cb18a9694fe1d69dcfdf0a7d4e3598086acf0c1bd786db43d5ef2a5b2d8438f1097eef0031bae7d8a7360a36fd0a7b28acad8f25fffb69a5
7
- data.tar.gz: acefed9a7917ba3b1cdae5c23e0cb708533cf09b740a3b6d546ceabbd0d980abbfcce177fc89737a3a8afab3169eaa7f8e9ae99b8f870642a7ee68163064311d
6
+ metadata.gz: a3fb835c78cfa325c5008a88e3202a92df188cc0a870ce7e09a333040f2bd272c7be15747d5c7d055edfbeba6fedf7a5322d05b36e1da3bef53ca05696b12303
7
+ data.tar.gz: cd3dd6304aa20a2eb251db1e6d3c5f28cd93860ca463bdc6b65af1dca7d42ee037e561d2c41ad3f8d0203fd2ba2900203e56e6fed8f0bda54f525b62cb72cc4c
@@ -152,10 +152,11 @@ module Classifier
152
152
  category = category.prepare_category_name
153
153
  raise StandardError, "No such category: #{category}" unless @categories.key?(category)
154
154
 
155
+ @total_words -= @category_word_count[category].to_i
156
+
155
157
  @categories.delete(category)
156
158
  @category_counts.delete(category)
157
159
  @category_word_count.delete(category)
158
- @total_words -= @category_word_count[category].to_i
159
160
  end
160
161
  end
161
162
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mutex_m
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.2'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement