fuzzy_match icon indicating copy to clipboard operation
fuzzy_match copied to clipboard

One character word matching score is ignored in some cases

Open alexsmartens opened this issue 11 months ago • 0 comments

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.

alexsmartens avatar Mar 07 '24 22:03 alexsmartens