Generate Vim's spell checker language file for Estonian: et.utf-8.spl
This short note shows how to generate Vim's spell file format from the .aff
and
.dic
files that Myspell uses. Myspell is distributed, inter alia, with
OpenOffice.org and many Mozilla products. The OpenOffice .oxt
files are zip
packed archives containing Myspells's .aff
and .dic
dictionary files.
As the Estonian spell file can not yet be downloaded automatically, we will
go through the manual compilation and installation of the Estonian spell checker
language file.
The below instructions are tested with Neovim; they should however, work with Vim in a similar way.
-
Download the wordlists:
Estonian spellchecking and hyphenation | Apache OpenOffice Extensions on the OpenOffice Website.
-
Unpack them:
$ unzip ~/Downloads/dict-et.oxt $ ls description.xml dict-et.oxt dictionaries.xcu et_EE.aff et_EE.dic hyph_et_EE.dic META-INF README_et_EE.txt README_hyph_et_EE.txt
-
Transcode the word lists:
In Neovim:
:mkspell! ~/.local/share/nvim/site/spell/et ~/Downloads/et_EE
-
Check success:
The file generation process lasts some minutes. When it succeeds you see:
Reading affix file ~/Downloads/et_EE.aff... Reading dictionary file ~/Downloads/et_EE.dic... Compressed case-folded of 14257651 nodes; 36657 (0%) remaining Compressed keep-case of 77 nodes; 42 (54%) remaining Compressed case-folded of 28467478 nodes; 14282249 (50%) remaining Compressed keep-case of 89 nodes; 81 (91%) remaining Compressed case-folded of 42646797 nodes; 28490019 (66%) remaining Compressed keep-case of 89 nodes; 89 (100%) remaining Compressed case-folded of 56800964 nodes; 42667649 (75%) remaining Compressed keep-case of 97 nodes; 90 (92%) remaining Compressed case-folded of 70928410 nodes; 56821483 (80%) remaining Compressed keep-case of 97 nodes; 97 (100%) remaining Compressed case-folded of 70928411 nodes; 70928406 (100%) remaining Compressed keep-case of 97 nodes; 97 (100%) remaining Compressing word tree... Compressed case-folded of 80559157 nodes; 70941624 (88%) remaining Compressed keep-case of 97 nodes; 97 (100%) remaining Writing spell file ~/.local/share/nvim/site/spell/et.utf-8.spl... Done! Estimated runtime memory use: 693100 bytes Press ENTER or type command to continue
Check the presence and date of the newly generated dictionary file:
$ ls -l ~/.local/share/nvim/site/spell/et.utf-8.spl -rw-r--r-- 1 user user 441075 Jul 15 13:32 /home/user/.local/share/nvim/site/spell/et.utf-8.spl
-
Use the dictionary:
In Neovim:
:set spelllang=et :set spell
For more information, consult Neovim's built-in help:
:help mkspell