RubyGems
npm
Organizations
Log in
Sign up
RubyGems
tf-idf-similarity
Versions diffs
0.0.4 → 0.0.5
tf-idf-similarity 0.0.4 → 0.0.5
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (4)
hide
show
data/lib/tf-idf-similarity/collection.rb
+1
-0
data/lib/tf-idf-similarity/extras/document.rb
+0
-2
data/lib/tf-idf-similarity/version.rb
+1
-1
metadata
+1
-1
data/lib/tf-idf-similarity/collection.rb
CHANGED
Viewed
@@ -118,6 +118,7 @@ class TfIdfSimilarity::Collection
118
118
document.term_frequency term
119
119
end
120
120
end
121
+
alias_method :tf, :term_frequency
121
122
122
123
# @return [Float] the average document size, in terms
123
124
def average_document_size
data/lib/tf-idf-similarity/extras/document.rb
CHANGED
Viewed
@@ -11,8 +11,6 @@ class TfIdfSimilarity::Document
11
11
@average_term_count ||= @term_counts.values.reduce(:+) / @term_counts.size.to_f
12
12
end
13
13
14
-
15
-
16
14
# Returns the term count.
17
15
#
18
16
# SMART n, Salton t, Chisholm FREQ
data/lib/tf-idf-similarity/version.rb
CHANGED
Viewed
@@ -1,3 +1,3 @@
1
1
module TfIdfSimilarity
2
-
VERSION = "0.0.
4
"
2
+
VERSION = "0.0.
5
"
3
3
end
metadata
CHANGED
Viewed
@@ -1,7 +1,7 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: tf-idf-similarity
3
3
version: !ruby/object:Gem::Version
4
-
version: 0.0.
4
4
+
version: 0.0.
5
5
5
prerelease:
6
6
platform: ruby
7
7
authors: