changed word count hash/json from string to integer
parent
a5d9693c80
commit
79e5bc63e1
|
@ -27,7 +27,7 @@ require 'optparse'
|
||||||
def bin_counter (bin, text)
|
def bin_counter (bin, text)
|
||||||
ret = Hash.new
|
ret = Hash.new
|
||||||
bin.each do |word|
|
bin.each do |word|
|
||||||
ret[word.to_sym] = text.scan(word).count.to_s
|
ret[word.to_sym] = text.scan(word).count.to_i
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue