Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Sun Jan 07, 2007 7:42 am   

Identifying misspelled words with spellcheck
 
I would like to make a log or database of misspelled words on mud output. My mud sends descriptions of rooms to me, and I would like to log from those descriptions misspelled words. I guess where the logging comes from doesnt make a difference... for purpose of this post lets just pretend that I have the entire room descripition loaded into the variable @roomdescription. I can figure out most of the process, but the key to it, is finding a function or command that will look at what is in @roomdescriptions, and set a flag or change a variable state when a spelling error is found. For instance if I have the room description
Quote:
The eerie dark silence of this chamber sends violent shivers running up
and down your spine. You can barely discern exits leading from this room in
the cardinal directtions.

I would like to create a log of some sort that would indicate 1. that there was an error in description which for this example would be true 2. preferably what the word was that is misspelled for this example would be directtions 3. The beginning position of the misspelled word within the descritption.
Any help would be appreicated.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jan 07, 2007 8:07 am   
 
Well the first thing you'll need is some sort of external routine or program you can call out to (Firefox, Word - not sure if you can hook into their APIs via COM interface) and then pass the room description to that and use what ever they return.

Barring that the brute force method is to come up with you own dictionary and and search word in your description against this and match that way. Of course, the former is the preferred solution.
_________________
Asati di tempari!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jan 07, 2007 8:20 am   
 
I didn't dig into it but you can look into Enchant (http://www.abisource.com/projects/enchant/), I came across it doing a quick search.
_________________
Asati di tempari!
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Jan 08, 2007 4:48 pm   
 
Or stop cheating and win your sphere's by hand Twisted Evil
_________________
Taz :)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon Jan 08, 2007 5:48 pm   
 
1. Highlight log.
2. Copy text to clipboard.
3. Paste into any spellcheck capable text editor, preferably one that flags misspelled words with a color indicator.

Voila!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Wed Jan 17, 2007 10:42 pm   
 
In the future I'll try to add an API to allow you to use the internal CMUD spellchecker routines.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net