text 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/text/version.rb +1 -1
- data/lib/text/white_similarity.rb +2 -2
- metadata +2 -2
data/lib/text/version.rb
CHANGED
@@ -37,10 +37,10 @@ module Text
|
|
37
37
|
pairs1 = word_letter_pairs(str1)
|
38
38
|
pairs2 = word_letter_pairs(str2).dup
|
39
39
|
|
40
|
-
union = pairs1.
|
40
|
+
union = pairs1.length + pairs2.length
|
41
41
|
|
42
42
|
intersection = 0
|
43
|
-
pairs1.
|
43
|
+
pairs1.each do |pair1|
|
44
44
|
if index = pairs2.index(pair1)
|
45
45
|
intersection += 1
|
46
46
|
pairs2.delete_at(index)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-06-07 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: ! 'A collection of text algorithms: Levenshtein, Soundex, Metaphone,
|
17
17
|
Double Metaphone, Figlet, Porter Stemming'
|