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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5bf47d31418ceab033a1cb67ef62dd0958d619f
4
- data.tar.gz: 9fbfb8cfa723f0c124130aa15ef831e8cb30e317
3
+ metadata.gz: 95e6a82c745772e5180c3765d2ae24995f02e2db
4
+ data.tar.gz: e1c6fb9a5f8a4651dac1d3dc5fb327cb8e586e44
5
5
  SHA512:
6
- metadata.gz: 79d2af7643a0184efc1f4173f4cce6e966d6e02d8ddc60ebfa03c8aed1f34d6c33ec6cb75077e46f466acf91eabe9122af4ff611d5f96f3d7bfba29923de90db
7
- data.tar.gz: 80bc672d0e87fdb0a5064dcd6d8d80746923f7713f38da1c34decb3e3b4a7e11fe92e16e2c8230a1837905b91b3db3de7368c56f0f89654500f4ea242291775a
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
- total_unique_words = vec.count{|word| word != 0}
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.
@@ -1,3 +1,3 @@
1
1
  module ClassifierReborn
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
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.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-13 00:00:00.000000000 Z
12
+ date: 2014-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fast-stemmer