phonetics 3.0.9 → 3.2.0
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/CHANGELOG +4 -0
- data/Makefile +3 -0
- data/VERSION +1 -1
- data/ext/c_levenshtein/phonetic_cost.c +412 -412
- data/lib/phonetics/distances.rb +5 -1
- metadata +3 -2
    
        data/lib/phonetics/distances.rb
    CHANGED
    
    | @@ -106,7 +106,11 @@ module Phonetics | |
| 106 106 |  | 
| 107 107 | 
             
                  # When we have four values we can use the pythagorean theorem on them
         | 
| 108 108 | 
             
                  # (order doesn't matter)
         | 
| 109 | 
            -
                  Math.sqrt((f1_distance**2) + (f2_distance**2))
         | 
| 109 | 
            +
                  sqrt = Math.sqrt((f1_distance**2) + (f2_distance**2))
         | 
| 110 | 
            +
             | 
| 111 | 
            +
                  # Vowels are more similiar to each other than consonants, so we apply a
         | 
| 112 | 
            +
                  # penalty softening here
         | 
| 113 | 
            +
                  sqrt / 2.0
         | 
| 110 114 | 
             
                end
         | 
| 111 115 | 
             
              end
         | 
| 112 116 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: phonetics
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.0 | 
| 4 | 
            +
              version: 3.2.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jack Danger
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024- | 
| 11 | 
            +
            date: 2024-05-01 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -107,6 +107,7 @@ files: | |
| 107 107 | 
             
            - ".gitignore"
         | 
| 108 108 | 
             
            - ".rspec"
         | 
| 109 109 | 
             
            - ".rubocop.yml"
         | 
| 110 | 
            +
            - CHANGELOG
         | 
| 110 111 | 
             
            - CODE_OF_CONDUCT.md
         | 
| 111 112 | 
             
            - Dockerfile
         | 
| 112 113 | 
             
            - Gemfile
         |