chomchom 0.5.0 → 0.5.1
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/.DS_Store +0 -0
- data/lib/chomchom/scorer.rb +4 -4
- data/lib/chomchom/version.rb +1 -1
- data/tests/.DS_Store +0 -0
- metadata +2 -2
data/.DS_Store
CHANGED
|
Binary file
|
data/lib/chomchom/scorer.rb
CHANGED
|
@@ -86,17 +86,17 @@ module Chomchom
|
|
|
86
86
|
|
|
87
87
|
private
|
|
88
88
|
#progressive length tax
|
|
89
|
-
#max = .
|
|
89
|
+
#max = .01 + .02 + .03 = .06 (6.0%)
|
|
90
90
|
#no punishment for short summary b/c itself won't be able to cover as much
|
|
91
91
|
def length_tax(summary_size)
|
|
92
92
|
if summary_size <= 100
|
|
93
93
|
0
|
|
94
94
|
elsif summary_size <= 200
|
|
95
|
-
(summary_size-100)*0.
|
|
95
|
+
(summary_size-100)*0.0001
|
|
96
96
|
elsif summary_size <= 300
|
|
97
|
-
0.
|
|
97
|
+
0.01 + (summary_size-200)*0.0002
|
|
98
98
|
else
|
|
99
|
-
0.
|
|
99
|
+
0.01 + 0.02 + (summary_size-300)*0.0003
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
data/lib/chomchom/version.rb
CHANGED
data/tests/.DS_Store
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: chomchom
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.5.
|
|
5
|
+
version: 0.5.1
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Quan Nguyen
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-05-
|
|
13
|
+
date: 2011-05-09 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: mechanize
|