Sha256: 230dbee864a3bf4aeae280270597274aa44189340a7a3e6ea5d5cb348b9fc7e8

Contents?: true

Size: 850 Bytes

Versions: 4

Compression:

Stored size: 850 Bytes

Contents

module JaroWinkler
  DEFAULT_ADJ_TABLE = Hash.new
  [
    ['A', 'E'], ['A', 'I'], ['A', 'O'], ['A', 'U'], ['B', 'V'], ['E', 'I'], ['E', 'O'], ['E', 'U'], ['I', 'O'],
    ['I', 'U'], ['O', 'U'], ['I', 'Y'], ['E', 'Y'], ['C', 'G'], ['E', 'F'], ['W', 'U'], ['W', 'V'], ['X', 'K'],
    ['S', 'Z'], ['X', 'S'], ['Q', 'C'], ['U', 'V'], ['M', 'N'], ['L', 'I'], ['Q', 'O'], ['P', 'R'], ['I', 'J'],
    ['2', 'Z'], ['5', 'S'], ['8', 'B'], ['1', 'I'], ['1', 'L'], ['0', 'O'], ['0', 'Q'], ['C', 'K'], ['G', 'J'],
    ['E', ' '], ['Y', ' '], ['S', ' ']
  ].each{ |s1, s2|
    if not DEFAULT_ADJ_TABLE.has_key?(s1)
      DEFAULT_ADJ_TABLE[s1] = Hash.new
    end
    if not DEFAULT_ADJ_TABLE.has_key?(s2)
      DEFAULT_ADJ_TABLE[s2] = Hash.new
    end
    DEFAULT_ADJ_TABLE[s1][s2] = DEFAULT_ADJ_TABLE[s2][s1] = true
  }
  DEFAULT_ADJ_TABLE.default = Hash.new
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jaro_winkler-1.4.0-java lib/jaro_winkler/adjusting_table.rb
jaro_winkler-1.4.0 lib/jaro_winkler/adjusting_table.rb
jaro_winkler-1.3.7 lib/jaro_winkler/adjusting_table.rb
jaro_winkler-1.3.6 lib/jaro_winkler/adjusting_table.rb