phrase_lookup 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/phrase_lookup.rb +4 -4
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd368d5aba0843e380540e9067541510ddf2754d
|
|
4
|
+
data.tar.gz: b70ebf8bed7feb12a359eb5a46f708a69a7af1eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f688e0f213dd0004989815f39c76fe7ae007444a7d9ebb8c5f872dea841a626d30bb5a3957637a74618a1bf11567ae305c49664685777ef5accbb903343ec848
|
|
7
|
+
data.tar.gz: 33c2696e31a4295878a22a5e9c3f3be8aa85fd7bd7a22ad0a2c3ac98415318fae98b3123ce19aad6722f5c3cc28c800bc0d22136fb852f8c369fa9e33f4ae57c
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/phrase_lookup.rb
CHANGED
|
@@ -107,9 +107,10 @@ class PhraseLookup
|
|
|
107
107
|
a = h.keys
|
|
108
108
|
|
|
109
109
|
a1 = a.grep /^#{s}/i
|
|
110
|
-
a2 = a.grep /\b#{s}/i
|
|
110
|
+
a2 = a.grep /\b#{s}/i
|
|
111
111
|
|
|
112
|
-
return (a1 + a2).uniq.sort_by {|word| -h[word]}.take
|
|
112
|
+
return (a1 + a2).uniq.sort_by {|word| -h[word]}.take(limit)\
|
|
113
|
+
.map {|x| x.sub(/ +\|.*$/,'')}
|
|
113
114
|
|
|
114
115
|
end
|
|
115
116
|
|
|
@@ -122,5 +123,4 @@ class PhraseLookup
|
|
|
122
123
|
def save(filename='phrase_lookup.yaml')
|
|
123
124
|
@master.save filename
|
|
124
125
|
end
|
|
125
|
-
end
|
|
126
|
-
|
|
126
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phrase_lookup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
m1kU5vbLTlJYenStfwtXDnHL7ul9y7MaPO+5UyjWWUuz8iRexmjB/HymNMK7NwPv
|
|
32
32
|
YzZJ2MWOCulgfw==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2017-
|
|
34
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rxfhelper
|
metadata.gz.sig
CHANGED
|
Binary file
|