classifier 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/classifier/bayes.rb +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c8010bf5648dd9ca16e4c15e44c627c295978440a15e8ce2bd8314a91a050f7
|
4
|
+
data.tar.gz: 168a80242021c3153b405a7102e480a76a66916eedb628e3d90a150bbe3f69a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3fb835c78cfa325c5008a88e3202a92df188cc0a870ce7e09a333040f2bd272c7be15747d5c7d055edfbeba6fedf7a5322d05b36e1da3bef53ca05696b12303
|
7
|
+
data.tar.gz: cd3dd6304aa20a2eb251db1e6d3c5f28cd93860ca463bdc6b65af1dca7d42ee037e561d2c41ad3f8d0203fd2ba2900203e56e6fed8f0bda54f525b62cb72cc4c
|
data/lib/classifier/bayes.rb
CHANGED
@@ -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.
|
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
|
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
|
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
|