home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.msdos.programmer:11658 comp.lang.pascal:7701
- Newsgroups: comp.os.msdos.programmer,comp.lang.pascal
- Path: sparky!uunet!wupost!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!s.psych.uiuc.edu!amead
- From: amead@s.psych.uiuc.edu (Alan Mead)
- Subject: ALGORITHM to match patterns flexibly needed
- Message-ID: <BzzBLs.Gr3@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: UIUC Department of Psychology
- Date: Mon, 28 Dec 1992 17:08:14 GMT
- Lines: 21
-
- I hope I've posted this request to appropriate groups, I included
- Pascal because that's the target language but I can read C, FORTRAN,
- etc. I need a way to count the number of typos by comparing a sample
- string with a target string. I'm not sure how smart UNIX 'diff' is,
- but I would think the problem is analagous: you wouldn't want to
- declare two files completely different because one was preceeded by an
- extra blank line.
-
- For example,
-
- target: run Spot run.
-
- sample 1 (1 error): ruyn Spot run.
- sample 2 (2 errors): rnu Spot run.
- sample 3 (2 errors): runnm Spot run.
- and, incidentally,
- sample 4 (1 error): run spot run.
-
- I would appreciate any suggestion. Thanks very much.
-
- -alan mead
-