tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A spell corrector for apropos



On Tue, 4 Oct 2011 23:39:30 +0530
Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost> wrote:

> I have referred to Prof. Peter Norvig's article [1] on spell
> correctors and translated his Python implementation to C. Following
> are some of the results:
> 
> $ ./apropos "funckiton for coping stings"
> Did you mean "function for copying strings" ?
> [...]

Very nice.

If I understand, it would ask the question, although non-interactively,
followed with results for the original string (as opposed to results for
the corrected string)?

At least for me, this would be the least surprising mode, and if I
really want I could run apropos again with the corrected string.  It
also would be no problem for the case you describe where the user
really meant "acp" rather than "tcp", etc; it would not get in the way
at all.

If you want to then support a more fancy interactive mode (perhaps even
a full screen mode with curses, or whatever), then an option/switch or
ENV var could probably be used to enable the wanted mode...

Thanks,
-- 
Matt


Home | Main Index | Thread Index | Old Index