[Dict-common-dev] Re: implementing aspell hash generation at
install time
Agustin Martin
agustin.martin at hispalinux.es
Thu Jan 12 18:14:09 UTC 2006
On Thu, Jan 12, 2006 at 01:08:02PM +0200, Martin-Éric Racine wrote:
> ke, 2006-01-11 kello 12:51 +0100, Agustin Martin kirjoitti:
> > You just need to use the wordlist you used to build the hash,
>
> Which hash? The ispell hash? To get a better idea of what I mean,
> please check the "ispell-et" source package.
The aspell hash (the .rws file)
> What about word-list-compress?
prezip seems to work better and is more recent, but Brian surely can give
more details on this. The script uses precat, so use prezip.
> Except that I have no WL to begin with. This is generated from ispell.
You have one, the ispell WL. aspell accepts either plain wordlists or affix
compressed wordlists in the ispell format (but the affix file needs to be in
myspell format)
I have played a bit with ispell-et sources. Please see attached patch for
some suggestions. It is untested, and will not work for myspell as is,
since the et.aff file you create lacks the myspell header which must be
manually provided and will contain some info about the dict (charset, allowed
chars sorted by frequency ...) and I do not speak estonian. I suggest you to
also put there the license from the original aff file (# is a comment) and a
statement that it comes from it. Since aspell info in the .dat file might
also provide the required info, I am not sure if it will work for aspell.
Also emacs will need some info about casechars/not-casechars before you
can properly use ispell/aspell with non 7bit chars.
--
Agustin
-------------- next part --------------
diff -Naur ispell-et-20030606.2.martin/debian/aspell-et.install ispell-et-20030606.2/debian/aspell-et.install
--- ispell-et-20030606.2.martin/debian/aspell-et.install 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/aspell-et.install 2006-01-12 18:46:41.000000000 +0100
@@ -1,4 +1,6 @@
*.multi usr/lib/aspell
*.alias usr/lib/aspell
*.dat usr/lib/aspell
-*.rws usr/lib/aspell
+*.rws var/lib/aspell
+et.compat var/lib/aspell
+*.cwl.gz usr/share/aspell
diff -Naur ispell-et-20030606.2.martin/debian/aspell-et.links ispell-et-20030606.2/debian/aspell-et.links
--- ispell-et-20030606.2.martin/debian/aspell-et.links 1970-01-01 01:00:00.000000000 +0100
+++ ispell-et-20030606.2/debian/aspell-et.links 2006-01-12 18:37:40.000000000 +0100
@@ -0,0 +1 @@
+/var/lib/aspell/et.rws /usr/lib/aspell/et.rws
diff -Naur ispell-et-20030606.2.martin/debian/aspell-et.postinst ispell-et-20030606.2/debian/aspell-et.postinst
--- ispell-et-20030606.2.martin/debian/aspell-et.postinst 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/aspell-et.postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-aspell
-SCRIPT="/usr/sbin/update-dictcommon-aspell"
-if [ "$1" = "configure" ] ; then
- if [ -x "$SCRIPT" ]; then
- $SCRIPT
- else
- echo "Error: $SCRIPT not present or executable. Missing dependency on dictionaries-common?" >&2
- exit 1
- fi
-fi
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/aspell-et.postrm ispell-et-20030606.2/debian/aspell-et.postrm
--- ispell-et-20030606.2.martin/debian/aspell-et.postrm 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/aspell-et.postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-aspell
-case "$1" in abort-install|remove)
-
- if [ -x /usr/sbin/update-dictcommon-aspell ]; then
- /usr/sbin/update-dictcommon-aspell
- fi
-esac
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/changelog ispell-et-20030606.2/debian/changelog
--- ispell-et-20030606.2.martin/debian/changelog 2006-01-07 11:11:44.000000000 +0100
+++ ispell-et-20030606.2/debian/changelog 2006-01-12 18:40:29.000000000 +0100
@@ -1,3 +1,9 @@
+ispell-et (20030606.2.1) unstable; urgency=low
+
+ * Playing with aspell autobuild
+
+ -- Agustin Martin Domingo <agmartin at debian.org> Thu, 12 Jan 2006 18:40:29 +0100
+
ispell-et (20030606.2) unstable; urgency=low
* Upgraded myspell-et Suggests for OOo2, as suggested by Rene Engelhard.
diff -Naur ispell-et-20030606.2.martin/debian/iestonian.postinst ispell-et-20030606.2/debian/iestonian.postinst
--- ispell-et-20030606.2.martin/debian/iestonian.postinst 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/iestonian.postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-ispell
-. /usr/share/debconf/confmodule
-SCRIPT="/usr/sbin/update-default-ispell"
-if [ "$1" = "configure" ] ; then
- if [ -x "$SCRIPT" ]; then
- $SCRIPT --rebuild
- else
- echo "Error: $SCRIPT not present or executable. Missing dependency on dictionaries-common?" >&2
- exit 1
- fi
-fi
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/iestonian.postrm ispell-et-20030606.2/debian/iestonian.postrm
--- ispell-et-20030606.2.martin/debian/iestonian.postrm 2005-12-24 02:43:40.000000000 +0100
+++ ispell-et-20030606.2/debian/iestonian.postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-ispell
-case "$1" in abort-install|remove)
-
- /usr/sbin/remove-default-ispell iestonian
-
- if [ -e /usr/share/debconf/confmodule ] ; then
- . /usr/share/debconf/confmodule
- db_purge
- fi
-esac
-# End automatically added section
-# Automatically added by dh_installdebconf
-if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
- . /usr/share/debconf/confmodule
- db_purge
-fi
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/myspell-et.postinst ispell-et-20030606.2/debian/myspell-et.postinst
--- ispell-et-20030606.2.martin/debian/myspell-et.postinst 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/myspell-et.postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-myspell
-if [ "$1" = "configure" ]; then
- update-openoffice-dicts
-fi
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/myspell-et.postrm ispell-et-20030606.2/debian/myspell-et.postrm
--- ispell-et-20030606.2.martin/debian/myspell-et.postrm 2005-12-22 12:12:09.000000000 +0100
+++ ispell-et-20030606.2/debian/myspell-et.postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Automatically added by installdeb-myspell
-if [ "$1" = "remove" ]; then
- update-openoffice-dicts
-fi
-# End automatically added section
diff -Naur ispell-et-20030606.2.martin/debian/rules ispell-et-20030606.2/debian/rules
--- ispell-et-20030606.2.martin/debian/rules 2006-01-07 04:47:21.000000000 +0100
+++ ispell-et-20030606.2/debian/rules 2006-01-12 18:53:39.000000000 +0100
@@ -18,8 +18,11 @@
ispellaff2myspell --charset=latin0 $(ILANGUAGE).aff > $(LANG_COUNTRY).aff
# Generate aspell dictionary
cp $(LANG_COUNTRY).aff $(DICT_LANG)_affix.dat
- #word-list-compress c < $(ILANGUAGE).dict > $(DICT_LANG).cwl
- aspell --lang=$(DICT_LANG) create master ./$(DICT_LANG).rws < $(LANG_COUNTRY).dic
+ cp $(ILANGUAGE).dict $(DICT_LANG).wl
+ prezip $(DICT_LANG).wl
+ gzip $(DICT_LANG).cwl
+ touch $(DICT_LANG).rws
+ touch $(DICT_LANG).compat
echo "add $(DICT_LANG).rws" > ./$(DICT_LANG).multi
echo "add $(DICT_LANG).multi" > ./$(ILANGUAGE).alias
@@ -29,7 +32,7 @@
# Clean myspell files
rm -f $(LANG_COUNTRY).aff $(LANG_COUNTRY).dic
# Clean aspell files
- rm -f *.alias *_affix.dat *.cwl *.multi *.rws
+ rm -f *.alias *_affix.dat *.cwl.gz *.multi *.rws $(DICT_LANG).compat
install/i$(ILANGUAGE)::
installdeb-ispell --package=i$(ILANGUAGE)
More information about the Dict-common-dev
mailing list