markovfun 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -92,7 +92,7 @@ module Markovfun
92
92
  def self.score_sentence(sent, probs)
93
93
  total_surprise = 0
94
94
 
95
- sent = sent[0..-2].split(" ").push(".")
95
+ sent = sent[0..-2].split(" ").push(".") if sent.class == String
96
96
  sent = [nil, nil] + sent + [nil]
97
97
 
98
98
  sent.zip(sent[1..-1], sent[2..-1]).each do |prev2, prev1, cur|
@@ -1,3 +1,3 @@
1
1
  module Markovfun
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markovfun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: