Help w/2 things ...

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Aug 12 17:05:04 AEST 1989


In article <63195 at linus.UUCP> rtidd at mitre.arpa writes:
>Does anyone know what i'm talking about, ...

Seems doubtful :-)

> ... and does anyone have any code like this?

I can dream up implementable meanings for "fuzzy string matching",
but without knowing your application I'd hesitate to make specific
recommendations.  Our shell has a "cd spelling corrector" that
makes several passes searching for a matching subdirectory name in
the directories in the CDPATH, first for exact spelling, then for
a single omitted or extra character, then for transposition of two
adjacent characters, in each path component.  I could send you the
code for that algorithm if it fits your needs.

Cryptanalysts use various probability (or information) measures to
determine how well patterns match.  These are usually based on
extremely simple probability theory and are quite obvious.  If you
can formulate precisely what you wish to determine, and what
ancillary information (such as: assumed language) is available,
then lots of people should be able to provide the formula you seek.
(Ask a statistician..)

>The second is something that came up in a programming contest a while
>back.  Write a program that will display an exact copy of its own 
>source code.  I'm not too sure but I think it had to be written in
>C or Pascal.  Anyone?

main(){system("cat foo.c");}



More information about the Comp.lang.c mailing list