joshaven / string_score

JavaScript string ranking 0 for no match upto 1 for perfect... "String".score("str"); //=> 0.825
MIT License
840 stars 62 forks source link

why? #10

Closed michaelficarra closed 13 years ago

michaelficarra commented 13 years ago

Why use this arbitrary string scoring algorithm over the well-known and common Levenshtein distance? I'm not trying to attack this project, but I'd like to know if it has anything more to offer. There are already a few JavaScript/coffee-script Levenshtein implementations.

joshaven commented 13 years ago

I wrote it to solve a problem I was having with speed when using the QuickSilver.js method... I didn't know about any other options when I wrote it. As far as I know my string score does more faster than any other method. Hopefully I have time sometime to test against a JavaScript version of the Levenshtein distance... maybe I can learn something from the other method...