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 12:52:59 +0800 Message-ID: References: <874kc1i72n.fsf@zoho.eu> <87o8a8fuzv.fsf@zoho.eu> <87fsvkft1t.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="36676"; 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 06:53:44 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 1mCaoi-0009JI-7O for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 06:53:44 +0200 Original-Received: from localhost ([::1]:57096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCaog-00037r-HH for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 00:53:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCaoE-00036U-FN for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 00:53:16 -0400 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:36834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCaoC-00078Q-S2 for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 00:53:14 -0400 Original-Received: by mail-lj1-x22a.google.com with SMTP id y7so7533885ljp.3 for ; Sat, 07 Aug 2021 21:53:12 -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=iPwniS4+7B20Yx9lBVBV1uVM/sb/ZefokwB5hc9EzM0=; b=gPK4TetiO0ncjZxpG00q0LK8lyPApnvCHw5pthscQ8uJ1gWT6ThxFTVK5rf3ADATbV Cj8LkXvyMf1KhUb+d6eogO6Ny8+q8fOgpZNQJmss3x0rbQujKjDNAfZYnW0irkHCrsKo jOV6Y7o0575Nwf8j6eTsUKuPKXK2g5V8fzxO+kf3AkGtQRiBc1dG2AS65jHvepL9pDxy cnnbhoetblk71loO/e/Lh+vT7dWas98S3wi+6NSODRZ4hv0c5m1OhYDbNwxjCdKZvNCr Qlj0w1b9Hw4G6OzoRX8xlORAoariEMYfts4GHyWonfPcaiKs009vItn5+MXsVH2QVigT 2x1A== 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=iPwniS4+7B20Yx9lBVBV1uVM/sb/ZefokwB5hc9EzM0=; b=fyWBtAaFXLkVunJi7QQARxj2elHE6IRjxvwQZKqaoEA2jRdHvKmbF18AXMBjcY8ucv sfAXTLKhtJzGJ1kuuRfhCcvGpzqJnZcQnA3CMir8V0q8bv7ciFndpHAmCq/TH2TcSDYb cVgdyMD4AbIZSWbiQ5C1Gv3Jgpcnw/ezMqE9aq9XKMPw3bNEu4RhU4zdHKB7uTn8vO43 5V0tfMX69uASlpFG/79c8ML3NQUe8Wo0HVSaGx2xF3Wf+wVM2gPZ9DIDePNPgeL/rf6g MTTM+eiQNIwPaIQ26Ii6XN8ApYQUMUOEqNV3AVVdLc+2YxtnC18H1Snd+/sa5KcYWL4n Bm4w== X-Gm-Message-State: AOAM530xk6nY/+R1xChQDFlPEiQxsdK786btdeIJN1VkQXMk/pMF6TS5 vzY5SsrEmGB1MZZUd2hCQdo/grfhR58VpywOnLg= X-Google-Smtp-Source: ABdhPJyp1cOWawgfuI4ATUulgmpGi456H3GekPNjd+P0JjJBXY5gsKFYWCNkWso3PuVyo2cgdLzbTJa96tnwF90HOOo= X-Received: by 2002:a05:651c:1307:: with SMTP id u7mr3869215lja.413.1628398390940; Sat, 07 Aug 2021 21:53:10 -0700 (PDT) In-Reply-To: <87fsvkft1t.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x22a.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:132405 Archived-At: On Sun, Aug 8, 2021 at 12:40 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > But the sort command will sort them accordingly. Keep in > > mind that the ispell and any autocompletion tools/frameworks > > needs the already well sorted word list file for achieving > > affordable performance when the word list file is huge, at > > least this is the case for Emacs's ispell initialization > > stage. Out of this consideration, I don't want to change the > > occurrences order of the words given in the original word > > list files. > > They are sorted, here are the first 10 words of > /usr/share/dict/american-english-insane > > A > A'asia > A's > AATech > AATech's > AAeE > AAeE's > AAgr > AAgr's > AAvTech > AAvTech's > ABEd > > so one just needs to find the correct sort(1) options to do > that :) (And if you can't, just sort and see what happens...) > > "awk '!a[$0]++' A B" doesn't sort, but that's what you want as > you say. Yes, considering that the input word list files have already well sorted in lexicographically order, I just want to delete duplicates and leave the rest in their original order. Best regards, -- 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