1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Spellchecking -->
<!--X-From-R13: Dvpuneq Ibbypbpx <YnHveNqvny.cvcrk.pbz> -->
<!--X-Date: Tue, 22 Sep 1998 16:39:32 &#45;0700 -->
<!--X-Message-Id: 3608A6AD.1E19#dial,pipex.com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Spellchecking</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:KaVir#dial,pipex.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg01107.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01109.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01147.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01117.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01108">Author</A>
&nbsp;|&nbsp;<A HREF="#01108">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01108">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Spellchecking</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Spellchecking</LI>
<LI><em>From</em>: Richard Woolcock &lt;<A HREF="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 23 Sep 1998 00:43:41 -0700</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Although I've not been coding much lately, I've still been thinking over
various concepts I am (at least considering) implementing within my mud.

One of these is something I had thought about a long time ago, but never
really got around to coding - mob speech.  I believe this area has been 
discussed briefly in the past (primarily by Matt Chatterley I believe).

The reason I mention it is because - while thinking about mob speech - I
realised that such a system might well serve to differentiate players and 
mobs, which is something I am trying to avoid.  Mob speech would do this 
in many ways (primarily by the quality of the speech itself), but the most 
immediate giveaway in many situations would be typo's made by players - 
typo's that mobs wouldn't make.

At first I thought about adding the occasional typo in mob speech, but 
quickly discarded that idea.  Instead, I considered spell-checking every 
bit of speech made by players.  If kept purely to the in-character methods 
of communication (rather than the OOC global channel), the impact upon the
processing power of the machine would be minimal.

Thinking further, I realised that - because all of the in-character names
people can choose are stored in lists (male forenames, female forenames
and surnames) - I could add every possible player name to the list of words 
as well.  This would allow correct capitalisation of speech for in-character 
conversations.  By storing the names this way, I could also incorporate them
into the same text-speech recognition code as used for mobs, allowing names
to be recognised as references to people they might know (and my mobs *can*
'know' certain players or mobs), thus:

   say bubba Do you like Richard?
   You say to Bubba 'Do you like Richard?'

From Bubba's point of view:

   "Do"      : He's asking a question.
   "you"     : He's talking about me.
   "like"    : He's asking my opinion about something.
   "Richard" : He's discussing a male with the forename 'Richard'.

Then, depending on various factors, you might get something like:

   "I hate him."
   "Which Richard?"
   "I don't know anyone called Richard!'

It wouldn't be particularly difficult for me to add all object types
to the list of words as well.  This would allow even more detail to
be added to the system.

Right now I'm not really worrying about the speech - I'm more
interested in throwing together a lightning-fast spellchecker,
which can check through a dictionary of several thousand words.

As far as implementation of the spellchecker is concerned, I am
considering using either a hash-table or a binary sorted tree.  A
while ago I wrote a piece of code to turn a single text-word into
a (most likely) unique 32bit integer - this would give me a good
means to scan through the list of words (it's faster than checking
strings, anyway).  Basically the idea is to take each word in the
string, convert it into a number, then sort through the list of 
words looking for a match.  Once a match is found, I could THEN do
a strcmp to ensure that the words did match completely.

What would people recommend as the fastest sorting method, assuming
roughly 10-30k words?

Does anyone know where I can get such a list, short of copying them
from a dictionary?

Can anyone see any obvious problems with such a system?

KaVir.

...

say heh laf d00d, this mud is KEWL for rp man!!!!
The following words were not recognised: heh, laf, d00d, KEWL, rp.
Please do not over-use exclaimation marks.

:)


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="01143" HREF="msg01143.html">[MUD-Dev] Re: Spellchecking</A></strong>
<ul compact><li><em>From:</em> "T. Alexander Popiel" &lt;popiel#snugharbor,com&gt;</li></ul>
<li><strong><A NAME="01117" HREF="msg01117.html">[MUD-Dev] Re: Spellchecking</A></strong>
<ul compact><li><em>From:</em> Travis Casey &lt;efindel#polaris,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01107.html">[MUD-Dev] Re: META: who are we?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01109.html">[MUD-Dev] Medievia</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01147.html">[MUD-Dev] Re: Medievia</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01117.html">[MUD-Dev] Re: Spellchecking</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01108"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01108"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="01109" HREF="msg01109.html">[MUD-Dev] Medievia</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Tue 22 Sep 1998, 23:47 GMT
<UL>
<LI><strong><A NAME="01110" HREF="msg01110.html">[MUD-Dev] Re: Medievia</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Wed 23 Sep 1998, 00:13 GMT
</LI>
<LI><strong><A NAME="01121" HREF="msg01121.html">[MUD-Dev] Re: Medievia</A></strong>, 
Ryan Prince <a href="mailto:jynx_ryn#mindless,com">jynx_ryn#mindless,com</a>, Wed 23 Sep 1998, 03:18 GMT
</LI>
<LI><strong><A NAME="01147" HREF="msg01147.html">[MUD-Dev] Re: Medievia</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Wed 23 Sep 1998, 18:50 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01108" HREF="msg01108.html">[MUD-Dev] Spellchecking</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Tue 22 Sep 1998, 23:39 GMT
<UL>
<LI><strong><A NAME="01117" HREF="msg01117.html">[MUD-Dev] Re: Spellchecking</A></strong>, 
Travis Casey <a href="mailto:efindel#polaris,net">efindel#polaris,net</a>, Wed 23 Sep 1998, 02:29 GMT
<UL>
<LI><strong><A NAME="01144" HREF="msg01144.html">[MUD-Dev] Re: Spellchecking</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Wed 23 Sep 1998, 17:37 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01143" HREF="msg01143.html">[MUD-Dev] Re: Spellchecking</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Wed 23 Sep 1998, 17:21 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01100" HREF="msg01100.html">[MUD-Dev] Re: Ugh, IS Diablo a mud?</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Tue 22 Sep 1998, 22:06 GMT
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>