Updated runtime files.

This commit is contained in:
Bram Moolenaar
2019-01-26 17:41:47 +01:00
parent 8e59a1e127
commit 2a953fcf10
17 changed files with 2375 additions and 2176 deletions

View File

@ -17,10 +17,10 @@ ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
GENERATING .SPL FILES
This involves downloading the files from the OpenOffice.org server, applying a
This involves downloading the files from the github server, applying a
patch and running Vim to generate the .spl file. To do this all in one go use
the Aap program (www.a-a-p.org). It's simple to install, it only requires
Python.
Python (http://www.a-a-p.org/download.html)
Before generating spell files, verify your system has the required locale
support. Source the check_locales.vim script to find out. If something is
@ -29,7 +29,7 @@ missing, see LOCALE below.
You can also do it manually:
1. Fetch the right spell file from:
http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
https://github.com/LibreOffice/dictionaries
2. Unzip the archive:
unzip LL_RR.zip
@ -56,12 +56,11 @@ Now you understand why I prefer using the Aap recipe :-).
MAINTAINING A LANGUAGE
Every language should have a maintainer. His tasks are to track the changes
in the OpenOffice.org spell files and make updated patches. Words that
haven't been added/removed from the OpenOffice lists can also be handled by
the patches.
in the spell files and make updated patches. Words that haven't been
added/removed from the LibreOffice lists can also be handled by the patches.
It is important to keep the version of the .dic and .aff files that you
started with. When OpenOffice brings out new versions of these files you can
started with. When LibreOffice brings out new versions of these files you can
find out what changed and take over these changes in your patch. When there
are very many changes you can do it the other way around: re-apply the changes
for Vim to the new versions of the .dic and .aff files.
@ -79,20 +78,25 @@ This procedure should work well:
aren't really words, they mess up the suggestions (English has this
problem). You can use the "fixdup.vim" Vim script to find duplicate words.
3. Make the diff file. "aap diff" will do this for you. If a diff would be
3. Include needed parts from the aspell phonetic dictionary to the aff files. For
example add the relevant SAL lines to the .aff file (this is needed to make good
suggestions). The aspell dictionaries can be found here:
https://ftp.gnu.org/gnu/aspell/dict/0index.html
4. Make the diff file. "aap diff" will do this for you. If a diff would be
too big you might consider writing a Vim script to do systematic changes.
Do check that someone else can reproduce building the spell file. Send the
result to Bram for inclusion in the distribution. Bram will generate the
.spl file and upload it to the ftp server (if he can't generate it you will
have to send him the .spl file too).
4. When OpenOffice makes a new zip file available you need to update the
5. When OpenOffice makes a new zip file available you need to update the
patch. "aap check" should do most of the work for you: if there are
changes the .new.dic and .new.aff files will appear. You can now figure
out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff
files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
5. Repeat step 4. regularly.
6. Repeat step 5. regularly.
LOCALE

View File

@ -1,5 +1,5 @@
*** de_19.orig.aff Thu Aug 25 11:22:08 2005
--- de_19.aff Thu Sep 29 11:43:46 2005
*** de_19.orig.aff 2019-01-19 18:45:26.468520305 +0100
--- de_19.aff 2019-01-19 18:45:26.472520278 +0100
***************
*** 3,4 ****
--- 3,21 ----
@ -501,8 +501,8 @@
+ SAL ZUR<55>CK^^ ZURIK
+ SAL ZUVER^^ ZUFA # x
+ SAL Z Z
*** de_19.orig.dic Thu Aug 25 11:22:08 2005
--- de_19.dic Sat Jan 7 12:32:09 2006
*** de_19.orig.dic 2019-01-19 18:45:26.468520305 +0100
--- de_19.dic 2019-01-19 18:45:26.476520252 +0100
***************
*** 76258,76259 ****
zynismusf<73>rdernd/A

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
#
# Since there is a big discussion about whether to use the old or the new
# spelling rules, both have been included.
# "de": all possible words allowed
# "de": new German spelling
# "de_de": old and new German spelling
# "de_19": old German spelling
# "de_20": new German spelling
@ -21,14 +21,21 @@ DE_REGIONS = de_$*REGIONS
SPELLDIR = ..
FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
ZIPFILE_DE = de_DE_comb.zip
ZIPFILE_19 = de_OLDSPELL.zip
ZIPFILE_20 = de_DE_neu.zip
ZIPFILE_AT = de_DE.zip
ZIPFILE_CH = de_CH.zip
ZIPFILES = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
# The de_20 is the same as de_DE dictionary and only uses the
# new revised orthography
FILE_DE_AFF = de_DE_frami.aff
FILE_DE_DIC = de_DE_frami.dic
FILE_20_AFF = de_DE_frami.aff
FILE_20_DIC = de_DE_frami.dic
FILE_AT_AFF = de_AT_frami.aff
FILE_AT_DIC = de_AT_frami.dic
FILE_CH_AFF = de_CH_frami.aff
FILE_CH_DIC = de_CH_frami.dic
#ZIPFILES = $ZIPFILE_DE $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
ZIPFILE_19 = de_OLDSPELL.zip # unmaintained
DICT_FILES = $FILE_20_AFF $FILE_20_DIC $FILE_AT_AFF $FILE_AT_DIC $FILE_CH_AFF $FILE_CH_DIC
READMES = README_de_$*(REGIONS).txt
READMES = README_de_DE_frami.txt README_extension_owner.txt
all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
@ -41,46 +48,39 @@ $SPELLDIR/de.utf-8.spl : $FILES
$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
../README_de.txt: $READMES
:print de_DE (combined) >! $target
:cat README_de_DE.txt >> $target
:fetch $READMES
:print de_DE_frami.txt >! $target
:cat README_de_DE_frami.txt >> $target
:print =================================================== >>$target
:print de_19 (old) >> $target
:cat README_de_19.txt >> $target
:print =================================================== >>$target
:print de_20 (new) >> $target
:cat README_de_20.txt >> $target
:print =================================================== >>$target
:print de_AT (Austria) >> $target
:cat README_de_AT.txt >> $target
:print =================================================== >>$target
:print de_CH (Swiss) >> $target
:cat README_de_CH.txt >> $target
:print extension_owner >> $target
:cat README_extension_owner.txt >> $target
#
# Fetching the files from the OpenOffice.org site.
# Fetching the files from the LibreOffices github repository.
# The OLDSPELL file comes from elsewhere
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
OODIR = https://github.com/LibreOffice/dictionaries/raw/master/de
DEDIR = http://www.j3e.de/myspell
:attr {fetch = $OODIR/%file%} $ZIPFILES
:attr {fetch = $OODIR/%file%} $DICT_FILES
:attr {fetch = $OODIR/%file%} $READMES
:attr {fetch = $DEDIR/%file%} $ZIPFILE_19
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
de_DE.aff de_DE.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_DE
:sys $UNZIP $ZIPFILE_DE
:delete $ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:move README_de_DE_comb.txt README_de_DE.txt
de_DE.aff de_DE.dic de_20.aff de_20.dic: {buildcheck=}
:assertpkg patch
:fetch $FILE_DE_AFF
:fetch $FILE_DE_DIC
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
@if not os.path.exists('de_DE.orig.aff'):
:copy de_DE.aff de_DE.orig.aff
@if not os.path.exists('de_DE.orig.dic'):
:copy de_DE.dic de_DE.orig.dic
@if os.path.exists('de_DE.diff'):
:sys patch <de_DE.diff
:copy de_DE.aff de_20.aff
:copy de_DE.dic de_20.dic
de_19.aff de_19.dic: {buildcheck=}
:assertpkg unzip patch
@ -89,8 +89,6 @@ de_19.aff de_19.dic: {buildcheck=}
:delete $ZIPFILE_19
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
# there is no README file
:print There is no README file for the old spelling >!README_de_19.txt
@if not os.path.exists('de_19.orig.aff'):
:copy de_19.aff de_19.orig.aff
@if not os.path.exists('de_19.orig.dic'):
@ -98,54 +96,12 @@ de_19.aff de_19.dic: {buildcheck=}
@if os.path.exists('de_19.diff'):
:sys patch <de_19.diff
de_20.aff de_20.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_20
:sys $UNZIP $ZIPFILE_20
:delete $ZIPFILE_20
:move de_DE_neu.aff de_20.aff
:move de_DE_neu.dic de_20.dic
:move README_de_DE_neu.txt README_de_20.txt
@if not os.path.exists('de_20.orig.aff'):
:copy de_20.aff de_20.orig.aff
@if not os.path.exists('de_20.orig.dic'):
:copy de_20.dic de_20.orig.dic
@if os.path.exists('de_20.diff'):
:sys patch <de_20.diff
# The de_AT.dic is included in de_DE.zip. We rename the files and concatenate
# them. Complication is that de_AT.dic is missing a newline at the end.
# And the de_DE.dic file is used for something else.
de_AT.aff de_AT.dic: {buildcheck=}
:assertpkg unzip patch
# Move de_DE files out of the way.
@if os.path.exists('de_DE.aff'):
:move de_DE.aff de_DE.temp.aff
@if os.path.exists('de_DE.dic'):
:move de_DE.dic de_DE.temp.dic
@if os.path.exists('README_de_DE.txt'):
:move README_de_DE.txt README_de_DE.temp.txt
:fetch $ZIPFILE_AT
:sys $UNZIP $ZIPFILE_AT
:delete $ZIPFILE_AT
:print >>de_AT.dic
# delete the first line, the word count
:sys $VIM -u NONE de_DE.dic -e -c 1delete -c wq
:cat de_DE.dic >>de_AT.dic
:delete de_DE.dic
:move de_DE.aff de_AT.aff
:move README_de_DE.txt README_de_AT.txt
@if os.path.exists('de_DE.temp.aff'):
:move de_DE.temp.aff de_DE.aff
@if os.path.exists('de_DE.temp.dic'):
:move de_DE.temp.dic de_DE.dic
@if os.path.exists('README_de_DE.temp.txt'):
:move README_de_DE.temp.txt README_de_DE.txt
:assertpkg patch
:fetch $FILE_AT_AFF
:fetch $FILE_AT_DIC
:move $FILE_AT_AFF de_AT.aff
:move $FILE_AT_DIC de_AT.dic
@if not os.path.exists('de_AT.orig.aff'):
:copy de_AT.aff de_AT.orig.aff
@if not os.path.exists('de_AT.orig.dic'):
@ -154,10 +110,11 @@ de_AT.aff de_AT.dic: {buildcheck=}
:sys patch <de_AT.diff
de_CH.aff de_CH.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_CH
:sys $UNZIP $ZIPFILE_CH
:delete $ZIPFILE_CH
:assertpkg patch
:fetch $FILE_CH_AFF
:fetch $FILE_CH_DIC
:move $FILE_CH_AFF de_CH.aff
:move $FILE_CH_DIC de_CH.dic
@if not os.path.exists('de_CH.orig.aff'):
:copy de_CH.aff de_CH.orig.aff
@if not os.path.exists('de_CH.orig.dic'):
@ -174,12 +131,11 @@ diff:
:sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
:sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff
:sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff
:sys {force} diff -a -C 1 de_20.orig.aff de_20.aff >de_20.diff
:sys {force} diff -a -C 1 de_20.orig.dic de_20.dic >>de_20.diff
:sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff
:sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff
:sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff
:sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff
:copy de_DE.diff de_20.diff
# Check for updated OpenOffice spell files. When there are changes the
@ -187,36 +143,24 @@ diff:
check:
:assertpkg unzip patch
:fetch $ZIPFILES
:mkdir tmp
:cd tmp
:fetch $ZIPFILE_19
:fetch $DICT_FILES
@try:
# Do the _AT one first, it overwrites the _DE files.
:sys $UNZIP ../$ZIPFILE_AT
:print >>de_AT.dic
# delete the first line, the word count
:sys ../$VIM -u NONE de_DE.dic -e -c 1delete -c wq
:cat de_DE.dic >>de_AT.dic
:delete de_DE.dic
:move de_DE.aff de_AT.aff
:move README_de_DE.txt README_de_AT.txt
:sys $UNZIP ../$ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:move README_de_DE_comb.txt README_de_DE.txt
:mkdir tmp
:cd tmp
:sys $UNZIP ../$ZIPFILE_19
:copy ../*.aff .
:copy ../*.dic .
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
# there is no README file
:print There is no README file for the old spelling >!README_de_19.txt
:sys $UNZIP ../$ZIPFILE_20
:move de_DE_neu.aff de_20.aff
:move de_DE_neu.dic de_20.dic
:move README_de_DE_neu.txt README_de_20.txt
:sys $UNZIP ../$ZIPFILE_CH
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
:move de_AT_frami.dic de_AT.dic
:move de_AT_frami.aff de_AT.aff
:move de_CH_frami.dic de_CH.dic
:move de_CH_frami.aff de_CH.aff
:copy de_DE.dic de_20.dic
:copy de_DE.aff de_20.aff
@import stat
@for nm in ['de_DE', 'de_19', 'de_20', 'de_AT', 'de_CH']:
@ -225,12 +169,8 @@ check:
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy $(nm).$ext ../$(nm).new.$ext
:sys {force} diff ../README_$(nm).txt README_$(nm).txt >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy README_$(nm).txt ../README_$(nm).new.txt
@finally:
:cd ..
:delete {r}{f}{q} tmp
:delete $ZIPFILES
# vim: set sts=4 sw=4 :

View File

@ -15,6 +15,9 @@ while lnum <= line('$')
continue " don't increment lnum, it's already at the next word
endif
endif
if lnum%1000 == 0
echon "\r Processing line ".lnum. printf(" [ %02d%%]", lnum*100/line('$'))
endif
let lnum += 1
endwhile