Hello...simply, this happens because the levenshtein distance between:
          "dojo" and "m" is  4 ( in this case not suggest )
          "dojo" and "mo" is  3 ( suggest )
          "dojo" and "moo" is  2 (suggest)
          "dojo" and "moot" is 3 (suggest)
          "dojo" and "mooto" is 3 (suggest)
          "dojo" and "mootoo" is 4 (in this case not suggest)

and I assume , in the beginning, to suggest words with the levenshtein
distance between 0 and 3.
you can study the algorithm for a better knowledge here 
http://www.levenshtein.net/
cheers!


On Oct 6, 6:27 pm, rasmusfl0e <[email protected]> wrote:
> lol :D
>
> If you begin to type "mootools" it will suggest "dojo" all the way up
> until get to the third "o"; "mooto" :P
>
> But nice job anyway
>
> On Oct 6, 12:37 pm, Adrian Statescu <[email protected]> wrote:
>
> > A String.method which calculates Levenshtein distance between two
> > strings.
> > Check this out on forge:http://mootools.net/forge/p/string_levenshtein
> > You can view in 
> > action:http://thinkphp.ro/apps/js-hacks/String.levenshtein/String.levenshtei...

Reply via email to