3.9.7. Creating word sources from Hunspell dictionaries
The easiest way to create comprehensive word lists is to import ready-made publicly available spellchecking dictionaries into an SQLite database. pycrossword provides a convenient tool called the Database Manager, which lets you review, install / uninstall and edit language-specific Hunspell dictionaries.
Hunspell dictionaries
A Hunspell dictionary is just a plain text file with words and part-of-speech data as discussed in Section 3.9.1. Such dictionaries typically have the *.dic file extension and are compiled for each language. For instance, a Hunspell dictionary for the English language might be stored as en.dic in the default location for word sources (pycross/assets/dic).
The source for the Hunspell dictionaries is the public repository on Github: https://github.com/wooorm/dictionaries You can read more about the Hunspell project following here.
pycrossword is able to download, parse and convert these dictionaries into SQLite databases with the default table / field names, so they can be used immediately as word sources for crossword generation.
Reviewing the installed and available dictionaries
To see which dictionaries can and are already installed, launch the Database Manager by pressing the button in the Source Manager Toolbar. The Database Manager main window is shown below:
Fig. 3.9.7.1. Database Manager: the dictionary list
Refresh dictionary list
Refresh the list of dictionaries from the remote server and re-read installed dictionary data.
When you have selected and configured the dictionaries you'd like to install / reinstall and those you want to uninstall, press this button to execute all these operations.
Unless you press this button, no changes will be made!If you want to cancel your planned operations, just refresh the list.
You can press this button when a dictionary is selected in the list to view its raw content (as it is in the original remote file), without actually downloading or installing it.
To cancel downloading / showing the file content, press this button again or deselect the current dictionary (click away from it).
Below is an example showing the content of the Breton dictionary in a separate viewing panel:
This is how an installed dictionary looks like. Note the block-like checkbox which means you can either leave it, check it (to reinstall) or uncheck it to uninstall.
"Installed" means that pycrossword has found an existing SQLite database file for that language (de.db in this case) in the default word source location.
The number in the third column is the total number of entries (words) in that database.