Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Edit Distance Function?

From: garymiller:starband at: 17-Jul-2002 15:08

Has anyone out there written an edit distance function in Rebol they would be willing to share. Edit Distance returns an integer when passed two string that counts the number on insertions, deletions or substitution necessary to turn string1 into string2. The algorithm is documented pretty well on the web but since it's recursive and is always described in terms of mathematical dynamic programming, it's a nontrivial exercise, at least for me! For example. string1: doog string2: dog edit distance would be 1 string1: gaot string2: goat edit distance would be 2 These algorithm are usually used along with soundex in spelling checkers and the like. _____________________________________ Think you can't get high-speed Internet? Now you can! StarBand offers high-speed Internet via satellite. No phone lines needed. New lower prices. For all 50 U.S. States. See for yourself at: http://www.StarBand.com