fuzzy strcmp

Tom Christiansen tchrist at convexe.uucp
Thu Dec 21 01:21:09 AEST 1989


I'm looking for an algorithm that would allow me to determine
whether two strings were similar.  Thus 

	"abcde" !~ "xyzzy"
but
	"this old man can read" =~ "that old man can't read"

I'd like to be able to specify a fuzziness threshhold, so I 
envision a function something like like this:

    boolean strfzcmp(string1,string2,correlation)
		     char *string1, *string2;
		     float correlation;
or perhaps just

    float   strfzcmp(string1,string2)

and then I'd check the return value for the desired threshhold.

Anyone have any ideas?  Please mail me any suggestions that you may
post, as I'm about to go on Christmas vacation, and we expire 
news too quickly here for it to still be here when I get back.

thanks,

--tom

    Tom Christiansen                       {uunet,uiucdcs,sun}!convex!tchrist 
    Convex Computer Corporation                            tchrist at convex.COM
		 "EMACS belongs in <sys/errno.h>: Editor too big!"



More information about the Comp.unix.wizards mailing list