From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Titus von der Malsburg Newsgroups: gmane.emacs.devel Subject: Re: Changing dictionary while flyspell-buffer is running Date: Thu, 21 Feb 2019 22:19:53 +0100 Message-ID: <87ef80dekm.fsf@posteo.de> References: <874l8ztmgk.fsf@posteo.de> <838sy9hkgk.fsf@gnu.org> <87k1htsfpa.fsf@posteo.de> <83zhqpfb0t.fsf@gnu.org> <87ftsh3p42.fsf@fastmail.fm> <83mumogaza.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50635"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 26.1.91 Cc: Joost Kremers , rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 22:20:10 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 1gwvlJ-000D3K-K9 for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2019 22:20:09 +0100 Original-Received: from localhost ([127.0.0.1]:40085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwvlI-0003lK-Ht for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2019 16:20:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwvlC-0003lF-Jv for emacs-devel@gnu.org; Thu, 21 Feb 2019 16:20:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwvlB-0005Oj-Jg for emacs-devel@gnu.org; Thu, 21 Feb 2019 16:20:02 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:47821) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwvlB-0005Me-8H for emacs-devel@gnu.org; Thu, 21 Feb 2019 16:20:01 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6414716005F for ; Thu, 21 Feb 2019 22:19:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1550783995; bh=TuwAQSf1luHYvqDucLNYzH6GRFbPCUumsmdxVlEyXTo=; h=From:To:Cc:Subject:Date:From; b=fJ9TCb/9yLBPFJUNyk4O16M3J3IBLESTnLhuZ72a0UdKtv+UbXtmN0F1Zx8pgnQJm bo612EI6lPKD3GZyVSZoushSlamskuK/Ua99Qd7UcxPYGY+eG3unIFF2q3D2t/NpD4 fUrt2QbLVvdJnvdI5CNwvowu7G4M3eIm+eAoEN5+zG/nMns2IxMbhpb4QiXCTuczP6 JN7GGtaGZuPIPu2oTmeH8ezdIg+mKw90mRHyaF9dMhBFoCbpx5eV7MTACtWVpv7AsN /ZQDgT8/LuleL9mrQ7P6v+cfDp4Qy854BgvhWOD0EzcWDZVLaMlwb1+rfYEGPZ/udS PnRqMCHpS1heg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4456n63cXQz6tmD; Thu, 21 Feb 2019 22:19:54 +0100 (CET) In-reply-to: <83mumogaza.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.65 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:233524 Archived-At: On 2019-02-21 Thu 21:09, Eli Zaretskii wrote: >> From: Joost Kremers >> Date: Thu, 21 Feb 2019 20:42:21 +0100 >> Cc: Titus von der Malsburg , rms@gnu.org >> >> > 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 method Titus' package employs is quite reliable, IME. > > It needs at least 30 letters to guess right, which is quite a few. The number of letters depends on the configured languages, it could be less than 30 when the scripts are different but for English, Dutch, and German 30 works well in my experience and languages don=E2=80=99t get m= uch more similar than that (except if you want to distinguish between US English and UK English). Regarding Hunspell: I agree with Eli that we should consider alternative solutions such as using Hunspell and multiple dictionaries. If that does the job, great! However, I just tried it and noticed one downside: Flyspell offers possible corrections for unknown words and when multiple languages are configured, these suggestions come from all configured dictionaries. Many of them are of course not relevant because they are not in the language of the paragraph. Flyspell also has an autocorrection feature (which I=E2=80=99m not using) and this feature would= also largely stop being useful with multiple dictionaries. I think that this makes the Hunspell solution less appealing. Titus -- Dr. Titus von der Malsburg Department of Linguistics University of Potsdam, Germany https://tmalsburg.github.io