[net.sources.bugs] Wanted, nearly equal function for strings.

nather@ut-sally.UUCP (Ed Nather) (07/04/86)

> An interesting extension would be to weight each comparison by the differance
> in the character positions in the two strings, such that an F in column 15 of
> string one matching an F in column 15 of string two would count as a better
> match than it would matching an F in column 65 of string two...
> Ben Cranston zben @ umd2.UMD.EDU    Kingdom of Merryland Sperrows 1100/92

I did something like that years ago (too many to admit) that resulted in a
"re-speller" program for on-line use at out observatory, on the theory that
astronomers are thick-headed at 3am and mis-type things a lot.  I got it to
work fairly well, mostly because the vocabulary used in the command language
was very limited.  I found that reversed or mis-placed consonants should be
weighted more heavily than vowels, and that you could do about as well not
bothering to match vowels at all.  Letter reversals were weighted pretty high
because they are easy typos to make.

One amusing sidelight:  when the "NEW COMPUTER SYSTEM" at the observatory
was shown to visitors by typing "FIND VENIS" and the computer responded
"VENUS COORDINATES: ... "  most visitors never blinked an eye ... unless
they knew a bit about programming.  If they did, they became fascinated,
and would sit at the terminal for an hour or more, "feeling out" the
algorithm by making various different kinds of errors until the system
could no longer find anything that matched.

No, I don't still have a copy ... it died with the NEW COMPUTER SYSTEM:
and IBM 1800 (gag).
-- 
Ed Nather
Astronomy Dept, U of Texas @ Austin
{allegra,ihnp4}!{noao,ut-sally}!utastro!nather
nather@astro.AS.UTEXAS.EDU