yanbi-ml 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/bayes/bayes.rb +1 -0
  2. data/lib/version.rb +1 -1
  3. metadata +2 -2
@@ -60,6 +60,7 @@ module Yanbi
60
60
  end
61
61
 
62
62
  def classify(document)
63
+ return nil if document.empty?
63
64
  max_score(document) do |cat, doc|
64
65
  score(cat, doc)
65
66
  end
@@ -3,5 +3,5 @@
3
3
  # License:: MIT
4
4
 
5
5
  module Yanbi
6
- VERSION = "0.2.2"
6
+ VERSION = "0.2.3"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yanbi-ml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-07-08 00:00:00.000000000 Z
12
+ date: 2016-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler