From: dmoore@ucsd.edu (David Moore)
Newsgroups: rec.games.mud.admin
Subject: Re: Spellchecking in MU*
Date: 11 Sep 1992 23:05:44 GMT
Organization: UCSD Peripheral Nerve Research Group
Reply-To: David Moore <dmoore@ucsd.edu>
NNTP-Posting-Host: sdnp1.ucsd.edu
In-reply-to: lwl@eniac.seas.upenn.edu's message of 11 Sep 92 18:49:24 GMT

In article <88666@netnews.upenn.edu> lwl@eniac.seas.upenn.edu (Lydia Leong) writes:

|In article <18nu5kINNdhs@agate.berkeley.edu> alansz@cogsci.berkeley.edu (Alan Schwartz) writes:
|>How difficult would it be to add a spelling checker to a MU* ? [...]

|It probably wouldn't be all that difficult (just grab the text and
|call popen() to "spell" or something). But I don't really see much
|sense in this (plus it's kindof an ugly hack).

	Ick, ick, ick.  Don't be putting this junk in the server.  And
'popen' is a dangerous thing to drop into anything if you don't know
what you're doing.  An unexpected SIGPIPE could have interesting affects
on certain servers I know of.

|It might be more
|intelligent to add spellchecking ability to a client; I'd bet that
|it wouldn't be terribly difficult to program in VTC,

	I wrote a webster client for VT about half a year ago?  I have
no idea if it'll even load into the current version.  It provided spell
checking, word completion, and definition lookup.  I can mail
folks what I have, but I don't have time to rewrite it.  EBob actually
obtained a version at some point, so maybe he knows if it still works in
newer releases, or how to make it work.

|although I
|don't think TinyFugue could handle it without some hardcoding.

	A simple spell checker should be easy w/ tf macros.  If you have
ispell use it, otherwise just take a peek into /usr/dict/words, which of
course isn't nearly as smart.

Example stupid tf solution:
;; Spell check a single word.
/def spell =\
    /def -1 -p101 -t"Spell: 0" spell_correct =\
        //undef spell_wrong%%;\
        //echo %1 is spelled correctly.%;\
    /def -1 -p100 -t"Spell: *" spell_wrong =\
        //undef spell_correct%%;\
        //echo %1 is spelled incorrectly.  TOAD EM.%;\
    /quote //trigger Spell: !(egrep "^%*$$" //usr//dict//words > //dev//null; echo $$?)

(Actually that was a fairly complex solution but stupid never the less.
 I even tested it before posting to the net, won't mom be proud...)

|(I am not an expert in the programming languages of clients. Has
|anyone out there actually written a spellchecker in a client?)

	I think Ben Jackson (bjackson@glia.biostr.washington.edu) even
has a couple tf macros to do webster checks.  I'm unsure of what they
all do, however.

|-------------------------+----------------------------------------------------
|Lydia Leong, CSE '94     | C code. C code run. Run code run... please!
|lwl@eniac.seas.upenn.edu | Backup not found:  (A)bort  (R)etry  (P)anic
|lwl@imsasun.imsa.edu     | "man reboot" (-n option): Avoids the sync(1). It
|lwl@csa.bu.edu           | can be used if a disk or the processor is on fire.
|-------------------------+----------------------------------------------------

David
--
David Moore <dmoore@ucsd.edu> - SysAdmin/Programmer
UCSD | Dept. of Anesthesiology | V-151 | La Jolla, CA 92093-9151
Work Phone: (619) 552-8585 x7042
"God does not play dice." - A. Einstein		"Yes, I do." - D. Moore
Newsgroups: rec.games.mud.admin,rec.games.mud,rec.games.mud.misc