
Show HN: MissPlete – Misspelling-tolerant autocomplete in 200 lines of ES6 - xavi
http://xavi.github.io/miss-plete/
======
anonfunction
In the demo I started typing United States and it was showing a bunch of other
countries above United States.

~~~
xavi
Yes, I realize that Levenshtein, the scoring algorithm used by default, can
actually be worse than a simple `startsWith` if there are no misspellings. In
the case of United States, if typed without misspellings, with Levenshtein, it
only shows as the first option after typing "united s", or " us" (because ISO
3166-1 codes are configured as synonyms).

The default scoring algorithm can be replaced via the `scoreFn` param.

Probably a variant of Levenshtein, or something else that gives more weight to
matches at the beginning should be used as the default, in order to get the
best results in all cases.

