classifier-reborn 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/classifier-reborn/lsi/content_node.rb +6 -1
- data/lib/classifier-reborn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e6a82c745772e5180c3765d2ae24995f02e2db
|
4
|
+
data.tar.gz: e1c6fb9a5f8a4651dac1d3dc5fb327cb8e586e44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d276020491d285ef656d85de17013c3fbcbb3161116ed139798602107dcd2229b85da121d0e0e3d00d6a5be095ae110a24e864d99f8efc2ab62fb4aa26b6b07
|
7
|
+
data.tar.gz: 735ebae19d3d920efad2e58dadb8580ae04d512528f319a63d1a746f539d5166405d2a8de5efc487f6c4832700652fbc222d71d672b31826ddaeaefd2687d365
|
@@ -45,8 +45,13 @@ module ClassifierReborn
|
|
45
45
|
|
46
46
|
# Perform the scaling transform and force floating point arithmetic
|
47
47
|
total_words = vec.sum.to_f
|
48
|
+
total_unique_words = 0
|
48
49
|
|
49
|
-
|
50
|
+
if $GSL
|
51
|
+
vec.each { |word| total_unique_words += 1 if word != 0 }
|
52
|
+
else
|
53
|
+
total_unique_words = vec.count{ |word| word != 0 }
|
54
|
+
end
|
50
55
|
|
51
56
|
# Perform first-order association transform if this vector has more
|
52
57
|
# then one word in it.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classifier-reborn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Carlson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fast-stemmer
|