blob: 40837a60052772bdd849180c29de32042cc84e62 [file] [log] [blame]
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00001The spell files included here are in Vim's special format. You can't edit
2them. See ":help spell" for more information.
3
4
Bram Moolenaar53180ce2005-07-05 21:48:14 +00005COPYRIGHT
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00006
7The files used as input for the spell files come from the OpenOffice.org spell
8files. Most of them go under the LGPL or a similar license.
9
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +000010Copyright notices for specific languages are in README_??.txt. Note that the
11files for different regions are merged, both to save space and to make it
12possible to highlight words for another region different from bad words.
Bram Moolenaar53180ce2005-07-05 21:48:14 +000013
Bram Moolenaarf25fd512005-09-30 21:15:37 +000014Most of the soundslike mappings come from Aspell ??_phonet.dat files:
15ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
16
Bram Moolenaar53180ce2005-07-05 21:48:14 +000017
18GENERATING .SPL FILES
19
20This involves downloading the files from the OpenOffice.org server, applying a
21patch and running Vim to generate the .spl file. To do this all in one go use
22the Aap program (www.a-a-p.org). It's simple to install, it only requires
23Python.
24
25You can also do it manually:
261. Fetch the right spell file from:
27 http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
28
292. Unzip the archive:
30 unzip LL_RR.zip
31
323. Apply the patch:
33 patch < LL_RR.diff
34
354. If the language has multiple regions do the above for each region. E.g.,
36 for English there are five regions: US, CA, AU, NZ and GB.
37
385. Run Vim and execute ":mkspell". Make sure you do this with the correct
39 locale, that influences the upper/lower case letters and word characters.
40 On Unix it's something like:
41 env LANG=en_US.UTF-8 vim
42 mkspell! en en_US en_AU en_CA en_GB en_NZ
43
446. Repeat step 5 for other locales. For English you could generate a spell
45 file for latin1, utf-8 and ASCII. ASCII only makes sense for languages
46 that have very few words with non-ASCII letters.
47
48Now you understand why I prefer using the Aap recipe :-).
49
50
51MAINTAINING A LANGUAGE
52
53Every language should have a maintainer. His tasks are to track the changes
54in the OpenOffice.org spell files and make updated patches. Words that
55haven't been added/removed from the OpenOffice lists can also be handled by
56the patches.
57
58It is important to keep the version of the .dic and .aff files that you
59started with. When OpenOffice brings out new versions of these files you can
60find out what changed and take over these changes in your patch. When there
61are very many changes you can do it the other way around: re-apply the changes
62for Vim to the new versions of the .dic and .aff files.
63
64This procedure should work well:
65
661. Obtain the zip archive with the .aff and .dic files. Unpack it as
67 explained above and copy (don't rename!) the .aff and .dic files to
68 .orig.aff and .orig.dic. Using the Aap recipe should work, it will make
69 the copies for you.
70
712. Tweak the .aff and .dic files to generate the perfect .spl file. Don't
72 change too much, the OpenOffice people are not stupid. However, you may
73 want to remove obvious mistakes. And remove single-letter words that
74 aren't really words, they mess up the suggestions (English has this
Bram Moolenaar5c736222010-01-06 20:54:52 +010075 problem). You can use the "fixdup.vim" Vim script to find duplicate words.
Bram Moolenaar53180ce2005-07-05 21:48:14 +000076
773. Make the diff file. "aap diff" will do this for you. If a diff would be
78 too big you might consider writing a Vim script to do systematic changes.
79 Do check that someone else can reproduce building the spell file. Send the
80 result to Bram for inclusion in the distribution. Bram will generate the
81 .spl file and upload it to the ftp server (if he can't generate it you will
82 have to send him the .spl file too).
83
844. When OpenOffice makes a new zip file available you need to update the
85 patch. "aap check" should do most of the work for you: if there are
86 changes the .new.dic and .new.aff files will appear. You can now figure
87 out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff
88 files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
89
905. Repeat step 4. regularly.