From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Changing dictionary while flyspell-buffer is running Date: Thu, 21 Feb 2019 16:53:38 +0200 Message-ID: <83zhqpfb0t.fsf@gnu.org> References: <874l8ztmgk.fsf@posteo.de> <838sy9hkgk.fsf@gnu.org> <87k1htsfpa.fsf@posteo.de> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="132474"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rms@gnu.org, emacs-devel@gnu.org To: Titus von der Malsburg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 15:54:19 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwpjs-000YH4-Do for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2019 15:54:16 +0100 Original-Received: from localhost ([127.0.0.1]:33326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwpjr-0001Hw-E3 for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2019 09:54:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwpjc-0001Cl-0d for emacs-devel@gnu.org; Thu, 21 Feb 2019 09:54:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwpjS-0005pO-3J; Thu, 21 Feb 2019 09:53:53 -0500 Original-Received: from [176.228.60.248] (port=2691 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gwpjH-0008AL-Ji; Thu, 21 Feb 2019 09:53:40 -0500 In-reply-to: <87k1htsfpa.fsf@posteo.de> (message from Titus von der Malsburg on Thu, 21 Feb 2019 09:34:09 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233518 Archived-At: > From: Titus von der Malsburg > Cc: rms@gnu.org, emacs-devel@gnu.org > Date: Thu, 21 Feb 2019 09:34:09 +0100 > > > Mayb I suggest to install Hunspell, then? It supports loading several > > dictionaries at once, and will eliminate the need to switch a > > dictionary while spell-checking a multi-lingual document. Emacs > > already supports that feature of Hunspell. > > Hunspell is a fantastic spell-checker. But this approach has two > downsides: 1. Hunspell is slow compared to ispell/aspell, which can be a > problem with larger documents. Hunspell is indeed about twice slower than Aspell, but: . both are very fast, so a factor of 2 doesn't matter in practice . speed only matters if you spell-check a large document with no misspellings at all -- as soon as there's a single misspelled word, marking it and selecting the correction will render any speed differences irrelevant. And my typical use cases, spell-checking technical text, usually show quite a few "typos", words that are from jargon or abbreviations, which no speller will know about. > 2. If you set multiple dictionaries, you > will get false negatives since a typo in one language might be a word > in another language. Depending on the set of languages used, this could > be a real problem. It could be. IME, it never is, as of the 3 languages I write fluently and frequently each uses a different script, so no false negative is ever possible. Even when using several languages that use the same script, say, Latin, the accented letters usually prevent false negatives. Of course, you also get false negatives when writing in a single language, because some typos are actually a valid word. The larger the dictionary used by the speller, the higher your chances of getting such false negatives. Finally, guessing a language is also not 100% correct, especially when short phrases from some language are inserted into text written in another language, something that happens a lot in email correspondence, for example. The advantage of using several dictionaries simultaneously is that no guessing is involved.