S
sftriman
I am looking for a way to, without custom defining a dictionary, to
get a list of suggested words for a misspelled word. Or better, "the"
most likely intended word for a misspelled word.
My base case to consider is:
dmr wjite saddle
which refers to a brand (DMR) and color (white) of a bike part
(saddle).
Ideally, dmr would return no suggestion, and wjite would return the
string "white" though I could certainly understand why "write" is
equally good a suggestion. I would be willing to define an add-on
dictionary to ignore certain words, such as brands and abbreviations
which are known to me, such as DMR, so that is possible to handle.
ispell -a yields:
<Q>$ echo "dmr wjite saddle" | ispell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.5)
& dmr 28 0: Dr, Mr, DMD, DMZ, Dar, Der, Dir, Dur, Dem, dorm, Dame,
dame, demur, dime, dimer, dome, MDT, mfr, Dom, Dre, Dru, MRI, dam,
dim, dry, MD, Md, rm
& wjite 29 4: jute, kite, White, white, quite, Waite, write, Joete,
jitter, kiter, jet, Kit, jot, jut, kit, quiet, whiter, whitey, quote,
Whit, whit, Cote, Jude, Kate, cote, cute, quit, Wit, wit
*
from which I could easily pass on the dmr suggestions, but, scoring
and evaluating the suggestions for wjite is harder. "white" and
"write" are 'ranked' (I guess) 3rd, 4th, and 7th.
Does anyone know of an alternative that would return basic words as
suggestions? ispell is certainly a good start and I might be able to
use it, but I was thinking maybe there is something more human-
intuitive out there.
Thanks!
David
get a list of suggested words for a misspelled word. Or better, "the"
most likely intended word for a misspelled word.
My base case to consider is:
dmr wjite saddle
which refers to a brand (DMR) and color (white) of a bike part
(saddle).
Ideally, dmr would return no suggestion, and wjite would return the
string "white" though I could certainly understand why "write" is
equally good a suggestion. I would be willing to define an add-on
dictionary to ignore certain words, such as brands and abbreviations
which are known to me, such as DMR, so that is possible to handle.
ispell -a yields:
<Q>$ echo "dmr wjite saddle" | ispell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.5)
& dmr 28 0: Dr, Mr, DMD, DMZ, Dar, Der, Dir, Dur, Dem, dorm, Dame,
dame, demur, dime, dimer, dome, MDT, mfr, Dom, Dre, Dru, MRI, dam,
dim, dry, MD, Md, rm
& wjite 29 4: jute, kite, White, white, quite, Waite, write, Joete,
jitter, kiter, jet, Kit, jot, jut, kit, quiet, whiter, whitey, quote,
Whit, whit, Cote, Jude, Kate, cote, cute, quit, Wit, wit
*
from which I could easily pass on the dmr suggestions, but, scoring
and evaluating the suggestions for wjite is harder. "white" and
"write" are 'ranked' (I guess) 3rd, 4th, and 7th.
Does anyone know of an alternative that would return basic words as
suggestions? ispell is certainly a good start and I might be able to
use it, but I was thinking maybe there is something more human-
intuitive out there.
Thanks!
David