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 ➜ Bug reports ➜ 3.84 and Dictionaries

3.84 and Dictionaries

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


Posted by Balerion   (18 posts)  Bio
Date Tue 06 Feb 2007 12:19 PM (UTC)
Message
I've found that when I start MUSHclient, the old spellchecking is not enabled despite it being checked in Global Preferences > General. I have to go there, turn on the custom spellchecking, let it load the custom dictionaries, then go back and uncheck the custom box before I can use the default.

Is this a common problem, and is there any way to get around having to keep doing this?
Top

Posted by Balerion   (18 posts)  Bio
Date Reply #1 on Sat 17 Feb 2007 09:18 AM (UTC)
Message
Hrm .... I take it this is expected behavior? Could the next version change this, maybe? :)
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 17 Feb 2007 06:32 PM (UTC)
Message
Sorry for the slow reply.

Yes, it seems to do as you describe. There must be some sequencing problem in the way it handles the new and old spellcheck methods.

To be honest, I am thinking of phasing out the old spellchecker, as part of a program of ongoing improvements.

Is there any major reason why you don't simply use the new spellchecker?

- Nick Gammon

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

Posted by Balerion   (18 posts)  Bio
Date Reply #3 on Mon 19 Feb 2007 11:06 AM (UTC)
Message
The dictionaries aren't quite as good as the old spellchecker's, but that's mostly laziness on my part. That said, when I use the experimental spellchecker, most of my worlds hang on startup (I have it connect to worlds in my global list when it starts) and I think it's because of the process of loading the dictionaries for the spellchecker that does it. I have to disconnect and reconnect to get them to connect properly.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 19 Feb 2007 07:59 PM (UTC)
Message
I can't reproduce that. It should only load the dictionary once, as it is a global thing, not per-world. Does it load the dictionary successfully?

- Nick Gammon

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

Posted by Balerion   (18 posts)  Bio
Date Reply #5 on Mon 19 Feb 2007 08:03 PM (UTC)
Message
Yeah. It does load it once, but the window showing the progress of the dictionaries (which are the package you've pointed to) loading definitely seems to be affecting the connection the process. The worlds are stuck in a hung state. If I disable the spellchecker, close the client, and start again, the connections happen normally.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #6 on Mon 19 Feb 2007 08:30 PM (UTC)
Message
Try editing the file spellchecker.lua which implements the new spellchecker. This will be in the same directory as MUSHclient.exe. Near the bottom will be the following lines, delete (or comment out) the lines in bold:


  -- local dlg = progress.new ("Loading dictionaries ...")
  
  -- dlg:range (0, #files)
  -- dlg:setstep (1)
  
  for k, v in ipairs (files) do
    ok, result = pcall (function () 
                          read_dict (dlg, v) 
                        end)
    if not ok then 
      -- dlg:close ()
      error (result)
    end -- not ok
  end -- reading each file
  
  -- dlg:close ()



Also a bit further up, you need to delete or comment out some other lines:


-- read one of the dictionaries
local function read_dict (dlg, name)
 -- dlg:step ()
 -- dlg:status (directory .. name)
 -- if dlg:checkcancel () then
 --   error "Dictionary loading cancelled"
 -- end -- if
  for line in io.lines (directory .. name) do
     insert_word (line) 
  end 
end -- read_dict


I have commented them out (the "--" part will not be in the original). Then try again.

- Nick Gammon

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

Posted by Balerion   (18 posts)  Bio
Date Reply #7 on Thu 22 Feb 2007 10:08 PM (UTC)
Message
Does seem to have fixed the problem. Thanks. :)
Top

Posted by Balerion   (18 posts)  Bio
Date Reply #8 on Sun 01 Apr 2007 09:15 AM (UTC)
Message
Just to update here, 4.0 also still has the sequencing problem with the old spellchecker (first noted in the original post).

Is there any way to correct this bug so I don't have to load the custom dictionaries then uncheck it? Until someone updates the LUA-based spellchecker with some sort of configuration dialog and the ability to skip capitalized words, I'd prefer to use the old one.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #9 on Mon 02 Apr 2007 01:55 AM (UTC)
Message
I am not planning to continue supporting the proprietary spell checker. I suggest upgrading to version 4.01, and considering making changes to the spellchecker.lua file to skip capitalized words. You could edit spellchecker.lua, and around line 142, add the extra code in bold:


-- check for one word, called by spellcheck (invokes suggestion dialog)
local function checkword_and_suggest (word)

  -- ignore words starting in caps
  if string.find (word, "^[A-Z]") then
    return word, "ignore"
  end -- ignore word starting with A-Z

  uc_word = make_upper (word)  -- convert to upper-case if wanted



- Nick Gammon

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

Posted by Balerion   (18 posts)  Bio
Date Reply #10 on Tue 03 Apr 2007 12:12 PM (UTC)
Message
That's a shame. The proprietary spellchecker is (currently) better than the LUA script, in terms of ease of use and speed. I do hope someone develops dialogs for it once the source is released (or maybe someone will look into integrating something like Aspell -- that'd be very nice).

Is there any way to get MUSHclient to load and then unload the spellchecker automatically on startup, perhaps? That seems to work to make the proprietary spellchecker function, and it would be a minimal hassle for a user.
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.


29,040 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.