noctivityinc-classifier191 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/classifier.gemspec +4 -4
- data/lib/classifier/bayes.rb +1 -1
- metadata +3 -3
data/classifier.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{noctivityinc-classifier191}
|
5
|
-
s.version = "1.3.
|
5
|
+
s.version = "1.3.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Yury Korolev (patch by Joshua Lippiner)"]
|
9
9
|
s.date = %q{2010-04-15}
|
10
|
-
s.description = %q{A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1.}
|
10
|
+
s.description = %q{A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1. and fixes various bugs}
|
11
11
|
s.email = %q{yury.korolev@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["lib/classifier/base.rb", "lib/classifier/bayes.rb", "lib/classifier/extensions/vector.rb", "lib/classifier/extensions/vector_serialize.rb", "lib/classifier/lsi/content_node.rb", "lib/classifier/lsi/summary.rb", "lib/classifier/lsi/word_list.rb", "lib/classifier/lsi.rb", "lib/classifier.rb", "lib/init.rb", "LICENSE", "README"]
|
13
13
|
s.files = ["classifier.gemspec", "lib/classifier/base.rb", "lib/classifier/bayes.rb", "lib/classifier/extensions/vector.rb", "lib/classifier/extensions/vector_serialize.rb", "lib/classifier/lsi/content_node.rb", "lib/classifier/lsi/summary.rb", "lib/classifier/lsi/word_list.rb", "lib/classifier/lsi.rb", "lib/classifier.rb", "lib/init.rb", "LICENSE", "Manifest", "Rakefile", "README", "test/base_test.rb", "test/bayes/bayesian_test.rb", "test/lsi/lsi_test.rb", "test/test_helper.rb"]
|
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Classifier", "--main", "README"]
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = %q{classifier}
|
19
|
-
s.rubygems_version = %q{1.3.
|
20
|
-
s.summary = %q{A general classifier module to allow Bayesian and other types of classifications.}
|
19
|
+
s.rubygems_version = %q{1.3.6}
|
20
|
+
s.summary = %q{A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1. and fixes various bugs.}
|
21
21
|
s.test_files = ["test/base_test.rb", "test/bayes/bayesian_test.rb", "test/lsi/lsi_test.rb", "test/test_helper.rb"]
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
data/lib/classifier/bayes.rb
CHANGED
@@ -48,7 +48,7 @@ class Bayes < Classifier::Base
|
|
48
48
|
category = prepare_category_name(category)
|
49
49
|
word_hash(text).each do |word, count|
|
50
50
|
if @total_words >= 0
|
51
|
-
orig = @categories[category][word]
|
51
|
+
orig = @categories[category][word] || 0
|
52
52
|
@categories[category][word] ||= 0
|
53
53
|
@categories[category][word] -= count
|
54
54
|
if @categories[category][word] <= 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noctivityinc-classifier191
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev (patch by Joshua Lippiner)
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.5.1
|
34
34
|
version:
|
35
|
-
description: A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1.
|
35
|
+
description: A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1. and fixes various bugs
|
36
36
|
email: yury.korolev@gmail.com
|
37
37
|
executables: []
|
38
38
|
|
@@ -103,7 +103,7 @@ rubyforge_project: classifier
|
|
103
103
|
rubygems_version: 1.3.5
|
104
104
|
signing_key:
|
105
105
|
specification_version: 2
|
106
|
-
summary: A general classifier module to allow Bayesian and other types of classifications.
|
106
|
+
summary: A general classifier module to allow Bayesian and other types of classifications that works with ruby 1.9.1. and fixes various bugs.
|
107
107
|
test_files:
|
108
108
|
- test/base_test.rb
|
109
109
|
- test/bayes/bayesian_test.rb
|