Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ Add Custom Words to Dictionary via a Function?

Add Custom Words to Dictionary via a Function?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by MattMc   USA  (54 posts)  Bio
Date Tue 31 Jan 2006 06:47 AM (UTC)
Message
Is there a function to add words to the spellchecker dictionary?


Thanks
Matt
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 31 Jan 2006 09:40 AM (UTC)
Message
There is no current provision to do so. You are the first to ask for it.

There appears to be support in the Sentry Spell Check Engine (which I use) to do such a thing, if I read it correctly.

However judging by the documentation the user dictionary is a simple text file with the format:


word	The word in the lexicon.
\t	A tab character.
action	Character representing the action associated with the word:a: SSCE_AUTO_CHANGE_ACTION
A: SSCE_AUTO_CHANGE_PRESERVE_CASE_ACTION
c: SSCE_CONDITIONAL_CHANGE_ACTION
C: SSCE_CONDITIONAL_CHANGE_PRESERVE_CASE_ACTION
e: SSCE_EXCLUDE_ACTION
i: SSCE_IGNORE_ACTION
otherWord	The alternate word associated with the word.


For example the default one is this:


#LID 24941
Beddington	i
Nepean	i
SSCE	i
Wintertree	i


If you wanted to add a lot of words to the user dictionary quickly, it would be pretty trivial to write a script (or use a spreadsheet or similar) to generate the required entries.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by MattMc   USA  (54 posts)  Bio
Date Reply #2 on Tue 31 Jan 2006 09:11 PM (UTC)
Message
Hi Nick,
My ultimate goal is to be able to find misspellings in a description, provide the user with a list of the words misspelled, and if they so choose (because realms these days often have non-English recognized words) they can click on the word, and then select that they wish that the word be aded to their custom dictionary.

The problem i seem to be facing with the additional information that you've given me is that the file is currently being used by Mush (or rather, the spellchecking engine?), so I can't dynamically write to it.

Using the info you just gave me, I was able to make a .temp file with the words I wanted added to the dictionary, close out of mushclient, open the temp and the .txl and append the data... but I'm hoping to be able to share this script, and this doesn't seem like a really good solution.

Any thoughts?

Matt
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 02 Feb 2006 08:42 PM (UTC)
Message
I have added a new script function AddSpellCheckWord to version 3.74 of MUSHclient.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,196 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.