annotate runtime/spell/README.txt @ 49:000769ce6c9d default tip

Added tag v7-3-618 for changeset 67300faee616
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 01 Aug 2012 18:08:37 +0900
parents c16898406ff2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 The spell files included here are in Vim's special format. You can't edit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 them. See ":help spell" for more information.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 COPYRIGHT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 The files used as input for the spell files come from the OpenOffice.org spell
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 files. Most of them go under the LGPL or a similar license.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 Copyright notices for specific languages are in README_??.txt. Note that the
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 files for different regions are merged, both to save space and to make it
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 possible to highlight words for another region different from bad words.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 Most of the soundslike mappings come from Aspell ??_phonet.dat files:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 GENERATING .SPL FILES
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 This involves downloading the files from the OpenOffice.org server, applying a
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 patch and running Vim to generate the .spl file. To do this all in one go use
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 the Aap program (www.a-a-p.org). It's simple to install, it only requires
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 Python.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24
39
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
25 Before generating spell files, verify your system has the required locale
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
26 support. Source the check_locales.vim script to find out. If something is
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
27 missing, see LOCALE below.
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
28
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
29
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 You can also do it manually:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 1. Fetch the right spell file from:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 2. Unzip the archive:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 unzip LL_RR.zip
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 3. Apply the patch:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 patch < LL_RR.diff
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 4. If the language has multiple regions do the above for each region. E.g.,
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 for English there are five regions: US, CA, AU, NZ and GB.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 5. Run Vim and execute ":mkspell". Make sure you do this with the correct
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 locale, that influences the upper/lower case letters and word characters.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 On Unix it's something like:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 env LANG=en_US.UTF-8 vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 mkspell! en en_US en_AU en_CA en_GB en_NZ
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 6. Repeat step 5 for other locales. For English you could generate a spell
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 file for latin1, utf-8 and ASCII. ASCII only makes sense for languages
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 that have very few words with non-ASCII letters.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 Now you understand why I prefer using the Aap recipe :-).
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 MAINTAINING A LANGUAGE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 Every language should have a maintainer. His tasks are to track the changes
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 in the OpenOffice.org spell files and make updated patches. Words that
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 haven't been added/removed from the OpenOffice lists can also be handled by
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 the patches.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 It is important to keep the version of the .dic and .aff files that you
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 started with. When OpenOffice brings out new versions of these files you can
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 find out what changed and take over these changes in your patch. When there
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 are very many changes you can do it the other way around: re-apply the changes
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 for Vim to the new versions of the .dic and .aff files.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 This procedure should work well:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 1. Obtain the zip archive with the .aff and .dic files. Unpack it as
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 explained above and copy (don't rename!) the .aff and .dic files to
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 .orig.aff and .orig.dic. Using the Aap recipe should work, it will make
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 the copies for you.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 2. Tweak the .aff and .dic files to generate the perfect .spl file. Don't
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 change too much, the OpenOffice people are not stupid. However, you may
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 want to remove obvious mistakes. And remove single-letter words that
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 aren't really words, they mess up the suggestions (English has this
39
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
80 problem). You can use the "fixdup.vim" Vim script to find duplicate words.
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 3. Make the diff file. "aap diff" will do this for you. If a diff would be
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 too big you might consider writing a Vim script to do systematic changes.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 Do check that someone else can reproduce building the spell file. Send the
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 result to Bram for inclusion in the distribution. Bram will generate the
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 .spl file and upload it to the ftp server (if he can't generate it you will
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 have to send him the .spl file too).
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 4. When OpenOffice makes a new zip file available you need to update the
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 patch. "aap check" should do most of the work for you: if there are
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 changes the .new.dic and .new.aff files will appear. You can now figure
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 5. Repeat step 4. regularly.
39
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
96
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
97
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
98 LOCALE
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
99
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
100 For proper spell file generation the required locale must be installed.
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
101 Otherwise Vim doesn't know what are letters and upper-lower case differences.
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
102 Modern systems use UTF-8, but we also generate spell files for 8-bit locales
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
103 for users with older systems.
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
104
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
105 On Ubuntu the default is to only support locales for your own language. To
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
106 add others you need to do this:
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
107 sudo vim /var/lib/locales/supported.d/local
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
108 Add needed lines from /usr/share/i18n/SUPPORTED
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
109 sudo dpkg-reconfigure locales
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
110
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
111 When using the check_locales.vim script, you need to exit Vim and restart it
c16898406ff2 synchorinize version 7.3.081
one@zeus.cr.ie.u-ryukyu.ac.jp
parents: 0
diff changeset
112 to pickup the newly installed locales.