Several tricky issues remain. I am also fixing some bugs as I write ;-) This will be pre-writing for documentation for the default spell checker.
User interfaceWhat, and when, to tell the user when the main spelling dict does not exit? Imo, the spell checker should not pollute the startup log warnings, nor would users notice such warnings. Otoh, silently ignoring the absence of the main spelling dict means that users will take awhile to notice that the spell checker doesn't know any words!
There at least two possibilities:
1. Disable the default spell checker if the main spelling dict can not be found. This is kinda a return to the status quo ante, except that the user only needs to install the main spelling dict to have a fully functional spell checker.
2. Warn the user that the main spelling dict can not be found just the first time the user clicks the "spell" button. This is more informative, but the spell checker is still essentially useless.
<aside>
The default check looks for the main spelling dict in one of two places:
- The path specified by @string main_spelling_dictionary
- In ~/.leo/main_spelling_dict.txt
Note that this issue does not exist for the pyenchant checker because the pyenchant module knows where its main dictionary is without being told.
Neither spell checker ever creates this file automatically, nor should they.
</aside>
A better main dictionaryWhen I awoke this morning I saw that bugs might prevent some words that are actually in the main dictionary from being recognized. I'll double check the code today.
However, I strongly suspect that the hunspell dict that has been uploaded to SourceForge is inadequate. That's not terribly surprising. I generated the .txt file from a script. Heh. Not sure where just now.
But when I awoke I also saw that it might be possible to generate a default main dict (a text file) from pyenchant's main dict! This file is compressed in the pyenchant folder, but it may be possible to iterate through all its contents using pyenchant's api. We shall see. If so, this would resolve
#711: Create bigger default spelling dicts.DistributionThe default dict on SourceForge is a plain text file. It should be compressed using a
standard compression scheme, not some shell script as is apparently needed when using hunspell compressed folders. The documentation will then have to explain how to unpack the file and where to put the result.
SummaryI closed
#700 a bit prematurely. Considerable work remains before the default spell checker is ready for prime time.
Edward