Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
rgbjoy
· 2y ago · 0 comments
I’m a bit confused. “Unit” brings up Turkmenistan before United States.
Comments
[–]
Arch485
2y ago
Turkmenistan is 8 edits, United States is 9. Levenshtein Distance is not actually a good search algorithm :)
[–]
card_zero
2y ago
That's correct, yes. Turkmenistan: 8 deletions (Trkmesan). United States: 9 deletions (ed States), including the space character.
[–]
d0100
2y ago
You'll have to add more weights to substring matches, fuzzy search by itself is usually not enough for intuitive search