fuzzy_match
fuzzy_match copied to clipboard
One character word matching score is ignored in some cases
Reproducible example
names = [
"Apple iPhone",
"Apple iPhone 8",
]
matcher = FuzzyMatch.new(names)
matcher.find_all_with_score("Apple 8")
=>
[["Apple iPhone", 0.6153846153846154, 0.5],
["Apple iPhone 8", 0.6153846153846154, 0.5]]
Expected behavior
Apple iPhone 8
to have a higher match score than Apple iPhone
when matched against Apple 8
.