markovfun 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/markovfun/version.rb +1 -1
- data/lib/markovfun.rb +1 -1
- metadata +1 -1
data/lib/markovfun/version.rb
CHANGED
data/lib/markovfun.rb
CHANGED
@@ -37,7 +37,7 @@ module Markovfun
|
|
37
37
|
# where prev2 and prev1 are the two previous words.
|
38
38
|
# The values are hashes, in which the keys are words (cur) that have followed
|
39
39
|
# prev2 and prev1, and the values are the number of occurrences.
|
40
|
-
def self.
|
40
|
+
def self.get_counts(sentences)
|
41
41
|
counts_hash = {}
|
42
42
|
sentences.each do |sent|
|
43
43
|
# nil denotes the beginnings and ends of sentences
|