From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Let ispell use use multiple dictionaries stored in different files. Date: Sun, 8 Aug 2021 11:10:11 +0800 Message-ID: References: <874kc1i72n.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28277"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 08 05:11:06 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 1mCZDO-00079f-5U for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 05:11:06 +0200 Original-Received: from localhost ([::1]:42438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCZDM-0002Bb-3O for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Aug 2021 23:11:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCZCl-0002B8-PB for help-gnu-emacs@gnu.org; Sat, 07 Aug 2021 23:10:27 -0400 Original-Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:43979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCZCj-00047H-R1 for help-gnu-emacs@gnu.org; Sat, 07 Aug 2021 23:10:27 -0400 Original-Received: by mail-lj1-x22c.google.com with SMTP id x7so6733743ljn.10 for ; Sat, 07 Aug 2021 20:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=tvs60IuIJwRgIjcmRPmf7tiYxv7by+5MjDl/UFMMD2w=; b=CKnnwJr+O+0faKwEPf2xr2IBffWBk0eXzKCysqY3NqEN41bYiF7IGmIV1rUrNjScyY 687Onj/6VHEnoUGuOITSowx006HaETSuIYfnLjRyxZwGr1ni0MYbw0Or/PffYEH0xoF/ Y36xuZMqiVHvvMTKSYu2pLxplVSZWZOJq0k/FvoDocBlbdqstsvYC10C0IRm3ivHSulm dwxDpPiULPtfhEw9AoSxpiBiUxNBM+3PA3MtTziq4mg449/0jysOKqZS6v6bWznRZdVh ZRRT8oaO/+egPusztaWthkWbHAFYtxLfory/Er+EKOhwaA2uSl6ttx/RvKcyoLlyUuNc OQcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=tvs60IuIJwRgIjcmRPmf7tiYxv7by+5MjDl/UFMMD2w=; b=H7Cyq41K5Uki7WPEmSqImwNvnbyH/gpraRqY1M5C4zsP7B2kd35fWmMUoAuQ/QP6mJ Jsfnbr+dhc06ZYvl5WhfZUnklwyW9FmBFpmcUDqRPJxK9d9m8/VYINY6GtupXLIPaeW9 bBYNE5hXPJqPflZICl39FS+N2Z7zHp1W/ZlUnU4JRgHbgUR4Xsi4X9HNsaTxBXBNwi2m EBYKHQ/cfbQJI6k8g680GMrE9lFq+s9UZqeYljiQ38KuM5j6Hfu//RdlQeQhgYQg9asN vFDatRI3ZouhRkDjEiriB3mdO1e3eBPYVaTEp5Mwd7vNFX3OSxvaz04wCIL7Bon6+2sB 5YLQ== X-Gm-Message-State: AOAM530pj1LXx1mC02bIYbfQkWp3+RyOyYBgqvUTOUFLIRg5yLpYh8Mz 2BAT9dyHxXGB3IwQzoRZHRowQa1XpDW04iSgsNs= X-Google-Smtp-Source: ABdhPJwcGaxah79IROFX942GNSIHLuGyyaCKhySCsJiaOOTuYg9Y+skJwuBCsDJFnaPhsdkd1SlYV3vCs04vPslEMJQ= X-Received: by 2002:a05:651c:1307:: with SMTP id u7mr3706161lja.413.1628392223519; Sat, 07 Aug 2021 20:10:23 -0700 (PDT) In-Reply-To: <874kc1i72n.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:132397 Archived-At: On Sat, Aug 7, 2021 at 11:54 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > On Ubuntu 20.04, I noticed that ispell use the following > > file as its completion dictionary: "/usr/share/dict/words", > > which comes from wamerican package: > > > > $ apt-file search /usr/share/dict/words wamerican: > > /usr/share/dict/words > > > > But I want to know if ispell can use multiple dictionaries > > stored in different files for this purpose. > > Install wamerican-insane - that should be the biggest ... then > just start type and spell, insert everything that is correct, > using the interface. It should be more than enough > pretty soon. In fact, I have already installed this package some time ago. Here are some additional comments: There are 3 similar packages available in Ubuntu, and they all come from wordlist project [1], as shown below: $ apt-cache pkgnames | grep -- '^w.*-insane' wbritish-insane wamerican-insane wcanadian-insane But I still haven't figured out the convenient way to build/create the latest insane version of English dictionary words lists from its upstream repo, for which I've filed an issue there [2]. In my case, I first create a word list based on Webster_s_Unabridged_3, see here [3] for more detailed steps. Then I combine the wamerican-insane and Webster_s_Unabridged_3 into one even bigger word list file, which includes 790592 entries at the moment: $ awk '!a[$0]++' /usr/share/dict/american-english-insane Webster_s_Unabridged_3.txt | tee ~/american-english-insane-Webster_s_Unabridged | wc 790592 892589 8649982 [1] https://github.com/en-wl/wordlist [2] https://github.com/en-wl/wordlist/issues/329 [3] https://github.com/company-mode/company-mode/issues/1146#issuecomment-886172208 > As for using multiple files, you can do a little Elisp loop > that iterates the dictionaries. Thank you for your instruction. > Another alternative is this, see this discussion of virtual > files on Linux: > > https://unix.stackexchange.com/questions/94041/a-virtual-file-containing-the-concatenation-of-other-files > > But I think it is overkill for this purpose (could be cool to > try tho), if I wanted to use several files, I'd just have > a simple script or Makefile that merged them into a new, > regular file, and then that's what I would use. I agree, and thank you again for sharing your views. Hongyi -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province