bayes_on_redis 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bayes_on_redis.rb +2 -0
- metadata +3 -3
data/lib/bayes_on_redis.rb
CHANGED
@@ -22,6 +22,7 @@ class BayesOnRedis
|
|
22
22
|
@redis.hincrby(redis_category_key(category), word, count)
|
23
23
|
end
|
24
24
|
end
|
25
|
+
alias_method :learn, :train
|
25
26
|
|
26
27
|
def untrain(category, text)
|
27
28
|
category = category.downcase
|
@@ -36,6 +37,7 @@ class BayesOnRedis
|
|
36
37
|
@redis.hset(redis_category_key(category), word, new_count)
|
37
38
|
end
|
38
39
|
end
|
40
|
+
alias_method :unlearn, :untrain
|
39
41
|
|
40
42
|
def classify(text)
|
41
43
|
scores = {}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bayes_on_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Didip Kerabat
|