simstring_pure 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simstring_pure.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9733d2ee56f3c95d1fc3a483c5fc0791a40f221f
|
4
|
+
data.tar.gz: 53e69ca93dae86a227954107a3baca9eddcd0f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f90d0c66fc502d749c67e5f12a7241599dd5646337cf664097237762db5773a19540375a200bb110b13ad2977beb486b88171bda3eef7577a77e28f6fd4be14
|
7
|
+
data.tar.gz: 50490e3405a21a81d12a17c82f639ae1152939035f7e6acd60083e72aef9f42cc7769d600525de5373656e90758a0a0a54dce0b9adbac116694f1086e572d332
|
data/lib/simstring_pure.rb
CHANGED
@@ -157,6 +157,18 @@ module SimString
|
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
160
|
+
class ComputeSimilarity
|
161
|
+
def initialize(feature_extractor, measure)
|
162
|
+
@feature_extractor, @measure = feature_extractor, measure
|
163
|
+
end
|
164
|
+
|
165
|
+
def similarity(string1, string2)
|
166
|
+
feature_set1 = @feature_extractor.features(string1)
|
167
|
+
feature_set2 = @feature_extractor.features(string2)
|
168
|
+
@measure.similarity(feature_set1, feature_set2)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
160
172
|
|
161
173
|
class Database
|
162
174
|
class << self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simstring_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Ellis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby implementation of the SimString approximate string matching algorithm.
|
14
14
|
email: davidkellis@gmail.com
|
@@ -39,7 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
39
|
version: '0'
|
40
40
|
requirements: []
|
41
41
|
rubyforge_project:
|
42
|
-
rubygems_version: 2.
|
42
|
+
rubygems_version: 2.5.1
|
43
43
|
signing_key:
|
44
44
|
specification_version: 4
|
45
45
|
summary: SimString approximate string matching library.
|