summa 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/summa.rb +7 -7
- metadata +1 -1
data/lib/summa.rb
CHANGED
@@ -5,12 +5,12 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
5
5
|
require 'FrequencyAnalyzer'
|
6
6
|
|
7
7
|
module Summa
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.8'
|
9
9
|
end
|
10
10
|
|
11
11
|
class String
|
12
12
|
def summarize
|
13
|
-
puts "
|
13
|
+
puts "Testing version 0.0.8 "
|
14
14
|
end
|
15
15
|
|
16
16
|
def removePunctuation!
|
@@ -39,10 +39,10 @@ class PheremoneAnalysis
|
|
39
39
|
@sigma_sq = @sigma * @sigma
|
40
40
|
@threshold = SummaData.threshold
|
41
41
|
@output = ""
|
42
|
-
|
43
|
-
text.each(' ') { |w|
|
44
|
-
@pheremones = Array.new(
|
45
|
-
for i in 0...
|
42
|
+
wordArray= Array.new
|
43
|
+
text.each(' ') { |w| wordArray.insert(at_end=-1,w) }
|
44
|
+
@pheremones = Array.new(wordArray.length())
|
45
|
+
for i in 0...wordArray.length
|
46
46
|
@pheremones[i] = 0
|
47
47
|
end
|
48
48
|
end
|
@@ -536,5 +536,5 @@ class SummaData
|
|
536
536
|
|
537
537
|
|
538
538
|
end
|
539
|
-
|
539
|
+
#end of SummaData class
|
540
540
|
|