classifier_atsukamoto 0.0.4 → 0.0.5

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: aa3ac0b6e6de4f38df50922c6e69b7cc822b1ca2
4
- data.tar.gz: 2c7157d3a7d85630a3b760e06582dcaa85e1ae31
3
+ metadata.gz: 452019d1cd647e13fa5ab4e6261d9006cca02309
4
+ data.tar.gz: 5649fd1a98255cfc62bfefa1e502453d6ef21477
5
5
  SHA512:
6
- metadata.gz: 8f536b77fa94db3aea1fe36cf98d7a28dd15db57b524b3510203aee7bb878be5a56cf31d1f32c8c55b99f11ea518a86dcea3d2e1f38cd339db80a046882f1d9e
7
- data.tar.gz: cd010d2aa6f7c8c0cc4341b8567d1040a22f9b2a9f06bf57fb94d6fb313ff23bd0505b7c9d378650b4a85d132b07d1bae8be1562c37bf9517151334a67506632
6
+ metadata.gz: 42818ec633de20053f7da225ead0de061d8d499ce15d3afa40c59e85daf9a304fe8576724d074a20fb26f0802e7b58262d472967f3025ce9ff39588819e99af8
7
+ data.tar.gz: 9604c52186837f59d5d81c843cdfe6676ac5f93d3adbf1daa064f4847b8e967df0a33850e43b21e8161003df59158cfa56061261bed9d68a55336adfd31461be
@@ -83,7 +83,7 @@ class Bayes
83
83
  def classifications(text)
84
84
  score = Hash.new
85
85
  # actual categories saved in the beggining but each do |category|
86
- @categories.names.each do |category, category_words|
86
+ @categories.each do |category, category_words|
87
87
  score[category.to_s] = 0
88
88
 
89
89
  # total = category_words.values.inject(0) {|sum, element| sum+element}
@@ -111,7 +111,7 @@ module Classifier
111
111
 
112
112
  def get_by_wild_keys(category)
113
113
  wildlings = []
114
- $redis.keys("#{escape_category(category)}:*").each do |key|
114
+ $redis.keys("#{escape_lang}:#{escape_category(category)}:*").each do |key|
115
115
  wildlings << get_by_key(key).to_i
116
116
  end
117
117
  wildlings
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classifier_atsukamoto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson