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.
- checksums.yaml +4 -4
- data/lib/symspell.rb +5 -2
- data/symspell.gemspec +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d7f7da36ea1dcb15688c3e5e894beade785079e8
         | 
| 4 | 
            +
              data.tar.gz: 6711028f831084a96f22b9bb4abbabf73e0c3dfb
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: dc232316552aef8f3827f4efac2afb7f21e03fff0a9ff833e6759dbf5469f9e2c6fc5f1dc530a56f475e1a9f8feca8a1fa2f597b3a70e90aa391d6b0e3ad7755
         | 
| 7 | 
            +
              data.tar.gz: 514fbb2004272cb6ca8372194b863edc45d0dc225a84bc04d3fe40ec04bb472a884ac7f522e75e6aad0778927cafe4bdbaf342b0a8d7a7aad09189f6da38dcc5
         | 
    
        data/lib/symspell.rb
    CHANGED
    
    | @@ -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 | 
            -
                           | 
| 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 | 
            -
                 | 
| 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
         | 
    
        data/symspell.gemspec
    CHANGED
    
    | @@ -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. | 
| 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. | 
| 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- | 
| 11 | 
            +
            date: 2015-08-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: 
         | 
| 14 14 | 
             
            email: phil@electricvisions.com
         |