Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!gatech!howland.reston.ans.net!pipex!warwick!bsmail!danno!wildgoos
From: wildgoos@danno (E.A. Wildgoose)
Subject: Re: Find a nearest dictionary word
Message-ID: <D7wI73.Hz@info.bris.ac.uk>
Sender: usenet@info.bris.ac.uk (Usenet news owner)
Nntp-Posting-Host: danno.cs.bris.ac.uk
Organization: University of Bristol, England
X-Newsreader: TIN [version 1.2 PL0]
References: <D7LBM2.A5v@info.bris.ac.uk> <N.042695.151443.14@user33.lightside.com>
Date: Mon, 1 May 1995 13:16:15 GMT
Lines: 29

Chris La Mantia (lamantia@lightside.com) wrote:

: > Is there a standard algorithm publically available which might be used
: > to suggest the nearest word in a dictionary to the nearest typed word.
: > I guess this heavily depends on what is meant by "nearest" since words
: > aren't evenly distributed in the English language.
: > 
: > Any offers please,
: > 
: >   Ed.
: > 

Sorry. Can I tighten this request up a bit. What I really wanted this for was
to operate a spelling check and guesser for a DOS command line.  If anyone has
seen Zshell for unix this offers a nearest guess for incorrect commands and 
filenames.  I would like to do something similar for 4DOS on the PC, however
the source for zsh is not very easy to read and so I was going to start from
scratch.  The idea of getting all possible commands and filenames in the path
seems to be a good start, then calculating a 'distance' for each possible
command from the typed one, and taking the one with the closest distance seems
promising?

Any other suggestions? Is an operator more likely to drop letters? misspell 
words, but keep same no. of letters, etc...

Cheers,

	Ed.

