From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Let ispell use use multiple dictionaries stored in different files.
Date: Sun, 8 Aug 2021 12:22:22 +0800 [thread overview]
Message-ID: <CAGP6POKLzpdQK4jKwotLjw9vYjoX3Xj6yoD4rLQzvkGazeHZ_w@mail.gmail.com> (raw)
In-Reply-To: <87k0kwfugo.fsf@zoho.eu>
On Sun, Aug 8, 2021 at 12:10 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> 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?
Similar, but I'm using the following method:
$ apt source wamerican-insane
$ cd scowl-2018.04.16/
$ rg -uu -l american-insane .
./debian/control
./debian/wamerican-insane.info-wordlist
$ rg -uu -l _insane .
./.pc/applied-patches
./debian/patches/series
./debian/rules
> #!/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
>
>
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
next prev parent reply other threads:[~2021-08-08 4:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-07 12:20 Let ispell use use multiple dictionaries stored in different files Hongyi Zhao
2021-08-07 12:41 ` Eli Zaretskii
2021-08-07 13:46 ` Hongyi Zhao
2021-08-07 14:03 ` Eli Zaretskii
2021-08-07 15:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 3:10 ` Hongyi Zhao
2021-08-08 3:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 4:03 ` Hongyi Zhao
2021-08-08 4:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 4:22 ` Hongyi Zhao [this message]
2021-08-08 3:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 4:16 ` Hongyi Zhao
2021-08-08 4:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 4:52 ` Hongyi Zhao
2021-08-08 4:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 5:08 ` Hongyi Zhao
2021-08-08 5:19 ` Hongyi Zhao
2021-08-08 6:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 7:14 ` Hongyi Zhao
2021-08-08 7:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 7:43 ` Hongyi Zhao
2021-08-08 7:51 ` Hongyi Zhao
2021-08-08 8:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 8:27 ` Hongyi Zhao
2021-08-08 8:37 ` Hongyi Zhao
2021-08-08 10:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 13:09 ` Hongyi Zhao
2021-08-08 16:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09 0:06 ` Hongyi Zhao
2021-08-09 0:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09 1:31 ` Hongyi Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGP6POKLzpdQK4jKwotLjw9vYjoX3Xj6yoD4rLQzvkGazeHZ_w@mail.gmail.com \
--to=hongyi.zhao@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).