The Levenshtein Distance & Spell Checkers

13 בנובמבר 2008

תגיות: ,
13 תגובות

Have you ever wondered how spell-checkers actually work?

According to Wikipedia, the Levenshtein Distance is:

"a metric for measuring the amount of difference between two sequences. The Levenshtien distance between two strings is given by the minimum number of operations needed to transform one string into the other."

Basically, all the spell checkers search for short Levenshtein distances and allow you to choose the one that is write for you.

For example if you write "developen" but you meant "development" it will try the following:

  1. developen –> developmen (inserted the 'm')
  2. developmen –> development (inserted the 't')

So, the Levenshtein distance for those will be 2.

Is that cool or what?

(Inspired by Jeff Blankenburg)

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

13 תגובות

  1. iliciaforce5 במאי 2011 ב 0:30

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  2. olomaryapinto5 במאי 2011 ב 23:09

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  3. ulfrriedetspeaksi6 במאי 2011 ב 14:45

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  4. enetdtieamcmasterse19 במאי 2011 ב 12:19

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  5. ejohnetgtecearlocko20 במאי 2011 ב 20:29

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  6. arfonalddalmontei21 במאי 2011 ב 15:17

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  7. ichxelsezywestberrya22 במאי 2011 ב 11:54

    Hi!!! I am a long time lurker and just decided to sign up!! I look forward to getting to know the people on here.

    הגב
  8. htc-hd7-giveaway10 בנובמבר 2011 ב 11:05

    I miss blogs.microsoft.co.il !!! Today i come back here
    HTC HD7 giveaway

    הגב
  9. htc-thundrbolt-free17 בנובמבר 2011 ב 11:14

    I love to read blogs.microsoft.co.il everyday
    htc thunderbolt

    הגב
  10. Annis 1 ביוני 2012 ב 14:25

    Like the site , just responding to the great comments on wordpress and the plug ins.Qualitity content is still the way to go.

    mobila la comanda

    הגב
  11. make money online7 בספטמבר 2012 ב 12:09

    I love your blogs.microsoft.co.il, keep us up to date
    make money online

    הגב