Sha256: a12f20b1903208f2452a75e408f17a8637b074f461d2140b76458faa70fbe8ef

Contents?: true

Size: 358 Bytes

Versions: 12

Compression:

Stored size: 358 Bytes

Contents

#!/usr/bin/env ruby
unless RUBY_VERSION >= '1.9'
  require 'rubygems'
end
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'fuzzy_match'

haystack = [ 'seamus', 'andy', 'ben' ]
needles = [ 'Mr. Seamus', 'Sr. Andy', 'Master BenT', 'Shamus Heaney' ]

d = FuzzyMatch.new haystack
needles.each do |needle|
  d.explain needle
  puts
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fuzzy_match-1.5.0 examples/first_name_matching.rb
fuzzy_match-1.4.1 examples/first_name_matching.rb
fuzzy_match-1.4.0 examples/first_name_matching.rb
fuzzy_match-1.3.3 examples/first_name_matching.rb
fuzzy_match-1.3.2 examples/first_name_matching.rb
fuzzy_match-1.3.1 examples/first_name_matching.rb
fuzzy_match-1.3.0 examples/first_name_matching.rb
fuzzy_match-1.2.2 examples/first_name_matching.rb
fuzzy_match-1.2.1 examples/first_name_matching.rb
fuzzy_match-1.1.1 examples/first_name_matching.rb
fuzzy_match-1.1.0 examples/first_name_matching.rb
fuzzy_match-1.0.5 examples/first_name_matching.rb