From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Let ispell use use multiple dictionaries stored in different files. Date: Sun, 08 Aug 2021 06:09:43 +0200 Message-ID: <87k0kwfugo.fsf@zoho.eu> References: <874kc1i72n.fsf@zoho.eu> <87sfzkfw1j.fsf@zoho.eu> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4863"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:007ofS23YpUlxVl0PFIQm9cSMlU= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 08 06:10:41 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCa92-0000zG-67 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 06:10:40 +0200 Original-Received: from localhost ([::1]:51580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCa90-0003UO-Bl for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 00:10:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCa8K-0003UG-Rz for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 00:09:56 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:59436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCa8I-0004Op-PM for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 00:09:56 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mCa8G-000AeM-Bv for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 06:09:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_C=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132401 Archived-At: Hongyi Zhao wrote: >> you can get the source with >> >> $ git clone https://github.com/en-wl/wordlist >> >> but 'make' (as it says "To build simply type [...] make" in >> the README.md) gives me just errors. > > I can run make without any errors, but the insane word list > file is created by a Debian package rule, which is not > available directly from the GitHub repo. This one? #!/usr/bin/make -f # -*- Makefile -*- $Id: rules,v 1.18 2005/10/15 03:03:48 david Exp $ # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Customized 27 Oct 1999 by David Coe for wenglish, later moved to scowl # This version is for packages that are architecture independent. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS # In addition to the scowl binary package, we create wamerican-small, wamerican, wamerican-large, wamerican-huge, and the # corresponding packages for wbritish and wcanadian. # The medium size packages have no -size part in their names # These are the scowl extensions (complexity numbers?) that contribute to each word list (i.e. each size); # the -size parts "-small", "", "-large", and "-huge" correspond to the end of the binary package name: empty:= SIZES=small "" large huge insane SIZE_EXTENSIONS_small:=10 20 35 SIZE_EXTENSIONS:=$(SIZE_EXTENSIONS_small) 40 50 SIZE_EXTENSIONS_large:=$(SIZE_EXTENSIONS) 55 60 70 SIZE_EXTENSIONS_huge:=$(SIZE_EXTENSIONS_large) 80 SIZE_EXTENSIONS_insane:=$(SIZE_EXTENSIONS_huge) 95 export SIZE_EXTENSIONS_small export SIZE_EXTENSIONS export SIZE_EXTENSIONS_large export SIZE_EXTENSIONS_huge export SIZE_EXTENSIONS_insane SPELLINGS:= american british canadian # These are the scowl word list classes we use: CLASSES:=words proper-names upper contractions VARIANTS:=1 2 include /usr/share/dpkg/pkg-info.mk %: dh $@ override_dh_auto_build: set -e; \ mkdir -p final_utf8;\ for file in final/*.[0-9][0-9]; do\ iconv -f 'iso8859-1' -t 'utf-8' < $${file} > final_utf8/$$(basename $${file}); \ done; set -e;\ for SPELLING in $(SPELLINGS); do\ for SIZE in $(SIZES); do\ if [ -n "$$SIZE" ]; then SIZE_NAME="_$$SIZE"; SIZE="-$$SIZE"; else SIZE_NAME=""; SIZE=""; fi; \ echo "The following SCOWL word lists were concatenated and sorted (with duplicates" > w$$SPELLING$$SIZE.scowl-word-lists-used;\ echo "removed) to create this word list (see README.Debian for more details):" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ for CLASS in $(CLASSES); do\ for EXT in $$(eval echo "\$$""SIZE_EXTENSIONS$$SIZE_NAME"); do\ echo "class $$CLASS ext $$EXT size name $$SIZE_NAME"; \ if [ -f final/english-$$CLASS.$$EXT ]; then\ echo "cat final/english-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted";\ cat final/english-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted;\ echo " english-$$CLASS.$$EXT" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ fi;\ for VARIANT in $(VARIANTS); do\ VARIANT_FILE="$${SPELLING}_"; \ if [ "$$VARIANT_FILE" = "american_" ]; then \ VARIANT_FILE=""; \ fi; \ if [ -f final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT ]; then\ echo "cat final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted";\ cat final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted;\ echo " $${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ fi;\ done;\ if [ "$$SIZE" = "insane" ]; then\ for VARIANT in $(VARIANTS); do\ for VARIANT_FILE in $(SPELLINGS); do \ VARIANT_FILE="$${VARIANT_FILE}_"; \ if [ "$$VARIANT_FILE" = "american_" ]; then \ VARIANT_FILE=""; \ fi; \ if [ -f final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT ]; then\ echo "cat final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted";\ cat final/$${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted;\ echo " $${VARIANT_FILE}variant_$$VARIANT-$$CLASS.$$EXT" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ fi;\ done; \ done; \ for special in final/special_*.$$CLASS; do \ echo "cat $$special >> $$SPELLING-english$$SIZE.unsorted";\ cat $$special >> $$SPELLING-english$$SIZE.unsorted;\ echo " $$special" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ done;\ fi;\ if [ -f final/$$SPELLING-$$CLASS.$$EXT ]; then\ echo "cat final/$$SPELLING-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted";\ cat final/$$SPELLING-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted;\ echo " $$SPELLING-$$CLASS.$$EXT" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\ fi;\ done;\ done;\ echo "cat $$SPELLING-english$$SIZE.unsorted | LC_ALL=C sort -u | iconv -t 'utf-8' > $$SPELLING-english$$SIZE; rm $$SPELLING-english$$SIZE.unsorted";\ cat $$SPELLING-english$$SIZE.unsorted | LC_ALL=C sort -u | iconv -f 'iso8859-1' -t 'utf-8' > $$SPELLING-english$$SIZE; rm $$SPELLING-english$$SIZE.unsorted;\ done;\ done cd speller && $(MAKE) hunspell override_dh_auto_clean: rm -rf final_utf8; set -e;\ for SIZE in $(SIZES); do\ if [ -n "$$SIZE" ]; then SIZE="-$$SIZE"; fi; \ for SPELLING in $(SPELLINGS); do\ rm -f $$SPELLING-english$$SIZE.unsorted $$SPELLING-english$$SIZE $$SPELLING-english$$SIZE.5 w$$SPELLING$$SIZE.scowl-word-lists-used;\ done;\ done cd speller && $(MAKE) clean INSTALL_WORDLISTS=$(patsubst %-"",%,$(foreach spelling,$(SPELLINGS),$(foreach size,$(SIZES),install-w$(spelling)-$(size)))) override_dh_auto_install: install-scowl install-hunspell $(INSTALL_WORDLISTS) installdeb-wordlist -pwamerican --noscripts installdeb-wordlist --no-package=wamerican --no-package=scowl --no-package=hunspell-en-us --no-package=hunspell-en-au --no-package=hunspell-en-ca installdeb-hunspell -phunspell-en-ca -phunspell-en-au -phunspell-en-us install-scowl: dh_installdirs --package=scowl dh_install --package=scowl final_utf8/*.[0-9][0-9] usr/share/dict/scowl dh_installdocs --package=scowl README debian/README.Debian install-hunspell: dh_install --package=hunspell-en-us dh_install --package=hunspell-en-au dh_install --package=hunspell-en-ca override_dh_auto_test: echo "doing nothing"; override_dh_gencontrol: dh_gencontrol -Nhunspell-en-us -Nhunspell-en-au -Nhunspell-en-ca dh_gencontrol -phunspell-en-us -phunspell-en-au -phunspell-en-ca -- -v1:$(DEB_VERSION) WORDLIST=$(shell echo $(*)|sed -re 's/^w([a-z]*)(-*[a-z]*)/\1-english\2/') $(INSTALL_WORDLISTS): install-%: install-scowl dh_testdir dh_testroot dh_installdirs --package=$(*) usr/share/dict dh_install --package=$(*) $(shell echo $(*)|sed -re \ 's/^w([a-z]*)(-*[a-z]*)/\1-english\2/') usr/share/dict dh_installdocs --package=$(*) $(*).scowl-word-lists-used debian/README.Debian sed "s/WORDLIST/$(WORDLIST)/g" < debian/wordlist_manpage_template > $(WORDLIST).5 dh_installman --package=$(*) $(WORDLIST).5 # this is the install-w$(SPELLING)-$(VARIANT) rule .PHONY: $(foreach spelling,$(SPELLINGS),$(foreach size,$(SIZES),install-w$(spelling)-$(size))) -- underground experts united https://dataswamp.org/~incal