loose_tight_dictionary 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/loose_tight_dictionary.rb +7 -7
- data/lib/loose_tight_dictionary/version.rb +1 -1
- metadata +5 -33
@@ -121,17 +121,17 @@ class LooseTightDictionary
|
|
121
121
|
|
122
122
|
similarities = possibly_identical.map { |straw| needle.similarity straw }.sort
|
123
123
|
|
124
|
-
best_similarity = similarities[-1]
|
125
|
-
straw = best_similarity.wrapper2
|
126
|
-
score = best_similarity.best_score.to_f
|
127
|
-
|
128
124
|
if gather_last_result
|
129
125
|
last_result.similarities = similarities
|
130
|
-
last_result.record = straw.record
|
131
|
-
last_result.score = score
|
132
126
|
end
|
133
127
|
|
134
|
-
straw.record
|
128
|
+
if best_similarity = similarities[-1] and straw = best_similarity.wrapper2 and record = straw.record
|
129
|
+
if gather_last_result
|
130
|
+
last_result.record = record
|
131
|
+
last_result.score = best_similarity.best_score.to_f
|
132
|
+
end
|
133
|
+
record
|
134
|
+
end
|
135
135
|
end
|
136
136
|
|
137
137
|
# Explain is like mysql's EXPLAIN command. You give it a needle and it tells you about how it was located (successfully or not) in the haystack.
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loose_tight_dictionary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 21
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
5
|
+
version: 0.2.2
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Seamus Abshere
|
@@ -15,7 +10,8 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
13
|
+
date: 2011-05-02 00:00:00 -05:00
|
14
|
+
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
17
|
name: shoulda
|
@@ -25,9 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ">="
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 0
|
31
24
|
version: "0"
|
32
25
|
type: :development
|
33
26
|
version_requirements: *id001
|
@@ -39,9 +32,6 @@ dependencies:
|
|
39
32
|
requirements:
|
40
33
|
- - ">="
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 3
|
43
|
-
segments:
|
44
|
-
- 0
|
45
35
|
version: "0"
|
46
36
|
type: :development
|
47
37
|
version_requirements: *id002
|
@@ -53,11 +43,6 @@ dependencies:
|
|
53
43
|
requirements:
|
54
44
|
- - ">="
|
55
45
|
- !ruby/object:Gem::Version
|
56
|
-
hash: 11
|
57
|
-
segments:
|
58
|
-
- 2
|
59
|
-
- 3
|
60
|
-
- 4
|
61
46
|
version: 2.3.4
|
62
47
|
type: :runtime
|
63
48
|
version_requirements: *id003
|
@@ -69,9 +54,6 @@ dependencies:
|
|
69
54
|
requirements:
|
70
55
|
- - ">="
|
71
56
|
- !ruby/object:Gem::Version
|
72
|
-
hash: 3
|
73
|
-
segments:
|
74
|
-
- 0
|
75
57
|
version: "0"
|
76
58
|
type: :runtime
|
77
59
|
version_requirements: *id004
|
@@ -83,11 +65,6 @@ dependencies:
|
|
83
65
|
requirements:
|
84
66
|
- - ">="
|
85
67
|
- !ruby/object:Gem::Version
|
86
|
-
hash: 25
|
87
|
-
segments:
|
88
|
-
- 0
|
89
|
-
- 0
|
90
|
-
- 3
|
91
68
|
version: 0.0.3
|
92
69
|
type: :runtime
|
93
70
|
version_requirements: *id005
|
@@ -141,6 +118,7 @@ files:
|
|
141
118
|
- test/test_loose_tight_dictionary.rb
|
142
119
|
- test/test_loose_tight_dictionary_convoluted.rb.disabled
|
143
120
|
- test/test_tightening.rb
|
121
|
+
has_rdoc: true
|
144
122
|
homepage: https://github.com/seamusabshere/loose_tight_dictionary
|
145
123
|
licenses: []
|
146
124
|
|
@@ -154,23 +132,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
132
|
requirements:
|
155
133
|
- - ">="
|
156
134
|
- !ruby/object:Gem::Version
|
157
|
-
hash: 3
|
158
|
-
segments:
|
159
|
-
- 0
|
160
135
|
version: "0"
|
161
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
137
|
none: false
|
163
138
|
requirements:
|
164
139
|
- - ">="
|
165
140
|
- !ruby/object:Gem::Version
|
166
|
-
hash: 3
|
167
|
-
segments:
|
168
|
-
- 0
|
169
141
|
version: "0"
|
170
142
|
requirements: []
|
171
143
|
|
172
144
|
rubyforge_project: loose_tight_dictionary
|
173
|
-
rubygems_version: 1.
|
145
|
+
rubygems_version: 1.6.2
|
174
146
|
signing_key:
|
175
147
|
specification_version: 3
|
176
148
|
summary: Allows iterative development of dictionaries for big data sets.
|