summa 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/summa.rb +15 -6
- metadata +1 -1
data/lib/summa.rb
CHANGED
@@ -5,7 +5,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
5
5
|
require 'FrequencyAnalyzer'
|
6
6
|
|
7
7
|
module Summa
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.7'
|
9
9
|
end
|
10
10
|
|
11
11
|
class String
|
@@ -33,8 +33,7 @@ class PheremoneAnalysis
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def initialize(text)
|
36
|
-
|
37
|
-
@fa = FrequencyAnalysis.new(text)
|
36
|
+
fa = FrequencyAnalyzer.new(text)
|
38
37
|
@keywords = fa.analyze()
|
39
38
|
@sigma = SummaData.sigma
|
40
39
|
@sigma_sq = @sigma * @sigma
|
@@ -521,9 +520,19 @@ class SummaData
|
|
521
520
|
"yourself", \
|
522
521
|
"yourselves" )
|
523
522
|
|
524
|
-
|
525
|
-
|
526
|
-
|
523
|
+
# Need to manually put in the accessors if they are class methods!
|
524
|
+
def SummaData.stopwords
|
525
|
+
@@stopwords
|
526
|
+
end
|
527
|
+
|
528
|
+
def SummaData.sigma
|
529
|
+
@@sigma
|
530
|
+
end
|
531
|
+
|
532
|
+
def SummaData.threshold
|
533
|
+
@@threshold
|
534
|
+
end
|
535
|
+
|
527
536
|
|
528
537
|
|
529
538
|
end
|