Help w/2 things ...

William Lewis wiml at blake.acs.washington.edu
Wed Aug 16 15:39:54 AEST 1989


In article <63195 at linus.UUCP> rtidd at mitre.arpa writes:
>The first is a certain algorithm that i'm looking for, it's called
>fuzzy string-matching.  Apparently you give it two strings and a
>percentage, and through various and sundry means it determines if
>the two strings are that percentage alike.
>
>A guy named Glenn Snow told me on CompuServe that the source was
>available in 8086 Assembly on a BBS local to me, but I only got
>through to it once in the past few weeks and didn't see the code
>on there.
>
>Does anyone know what i'm talking about, and does anyone have any
>code like this?

   What you're looking for is the article in the July 1988 issue of
Dr. Dobb's Journal, named "Pattern Matching by Gestalt". The function
is

   int simil(a,b) char *a, *b;

  and returns the percent similarity of the two strings passed to it.
The article includes a discussion of the algorithm and 80x8x assembly
source code. (Which, by the way, trashes the index registers; if your
compiler wants them preserved over function calls (perhaps as 
register variables -- both MWC and I think MSC want this) you'll have
to modify it slightly.


     --- phelliax
         "Heresy is the lifeblood of religions. It is faith that begets
          heretics. There are no heresies in a dead religion."



More information about the Comp.lang.c mailing list