symspell 0.0.2 → 0.0.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/symspell.rb +5 -2
  3. data/symspell.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c6abf1253f5e16d82ae589bc6e35a6f5d72bc36
4
- data.tar.gz: 6c9344ec4d40597700099e119b423ccfb85d3582
3
+ metadata.gz: d7f7da36ea1dcb15688c3e5e894beade785079e8
4
+ data.tar.gz: 6711028f831084a96f22b9bb4abbabf73e0c3dfb
5
5
  SHA512:
6
- metadata.gz: 2f71318a0ded808acf0f3eac41d8b569edd908ec0b81f126421fcfa7d206fce6969bc47e565fcdc324e1b4fb02f492e482e52e36b608559cf4364760a1847baf
7
- data.tar.gz: 62215df1ac0378e26fe131ed8c730ebf3ad235107858bebf37802704bb8f8dd8a88c0c15f9a15da02518e7034cdeaa34802c24d03b38e31d8dc834c86254c03f
6
+ metadata.gz: dc232316552aef8f3827f4efac2afb7f21e03fff0a9ff833e6759dbf5469f9e2c6fc5f1dc530a56f475e1a9f8feca8a1fa2f597b3a70e90aa391d6b0e3ad7755
7
+ data.tar.gz: 514fbb2004272cb6ca8372194b863edc45d0dc225a84bc04d3fe40ec04bb472a884ac7f522e75e6aad0778927cafe4bdbaf342b0a8d7a7aad09189f6da38dcc5
@@ -90,7 +90,8 @@ class SymSpell
90
90
  next if @verbose < 2 && suggestions.count > 0 && distance > suggestions[0].distance
91
91
 
92
92
  if (distance <= @edit_distance_max)
93
- if value2 = @dictionary[suggestion]
93
+ value2 = @dictionary[suggestion]
94
+ if value2
94
95
  si = SuggestItem.new
95
96
  si.term = suggestion
96
97
  si.count = value2.count
@@ -156,11 +157,13 @@ class SymSpell
156
157
  def create_dictionary_entry(key)
157
158
  result = false
158
159
  value = nil
159
- if valueo = @dictionary[key]
160
+ valueo = @dictionary[key]
161
+ if valueo
160
162
  if valueo.is_a?(Fixnum)
161
163
  tmp = valueo
162
164
  value = DictionaryItem.new
163
165
  value.suggestions << tmp
166
+ @dictionary[key] = value
164
167
  else
165
168
  value = valueo
166
169
  end
@@ -2,7 +2,7 @@ require 'base64'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'symspell'
5
- s.version = '0.0.2'
5
+ s.version = '0.0.3'
6
6
  s.authors = 'Phil Thompson'
7
7
  s.email = Base64.decode64("cGhpbEBlbGVjdHJpY3Zpc2lvbnMuY29t\n")
8
8
  s.summary = 'Ruby port of the symetric spell checking algorithm'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symspell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: phil@electricvisions.com