Hehehe.. I got it now. Thanks again guys.. On Wed, 2008-03-26 at 01:06 +0800, Orlando Andico wrote: > Eep. The subtraction comes first. > > LEN(Str1) - Levenshtein(Str1,Str2) > ------------------------------------------------- > LEN(Str1) > > The maximum levenshtein distance of a string of length L and another > string of length L is of course L (meaning the strings have nothing in > common, hence the edit distance is the length of the string itself). > > If comparing two unequal-length strings, use the length of the longer string. > > The above scheme will be horrifically inefficient unless your database > supports function- and expression-based indexes (many do not). > However, i understand it is possible to define new functions in MySQL, > so you could code your own SIMILAR function in MySQL. You can do the > same scheme for any open-source database, actually.
-- Alec Joseph Rivera F S 3 Consulting Inc. http://www.fs3.ph
signature.asc
Description: This is a digitally signed message part
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

