From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 07:14:14 2017 Received: (at submit) by debbugs.gnu.org; 30 Mar 2017 11:14:14 +0000 Received: from localhost ([127.0.0.1]:51963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctY1t-0004Ed-Ni for submit@debbugs.gnu.org; Thu, 30 Mar 2017 07:14:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctY1s-0004ER-58 for submit@debbugs.gnu.org; Thu, 30 Mar 2017 07:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctY1l-0004Kg-BK for submit@debbugs.gnu.org; Thu, 30 Mar 2017 07:14:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctY1l-0004KS-7m for submit@debbugs.gnu.org; Thu, 30 Mar 2017 07:14:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctY1g-0006Sh-T0 for guix-patches@gnu.org; Thu, 30 Mar 2017 07:14:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctY1f-0004FB-CX for guix-patches@gnu.org; Thu, 30 Mar 2017 07:14:00 -0400 Received: from m12-12.163.com ([220.181.12.12]:54783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctY1W-00048H-NA; Thu, 30 Mar 2017 07:13:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=G/DfP ZNHCcNk5BG5Tk/2NWe1oWoAdLOKy3nJlClW5vM=; b=DJRvFT/p/h8EOoOvENvH5 XFTQhmFeq+ydCdDhKj5mySQRUC6Y4asaALUwBIzDKRfjh8+8RiCBITxjJ8XCE5k2 VvjrzLV0HPc+fvsCABtPwwGdnD2yTNRWbrl+icP9KBVgOdGkJfGA7JDPqUJg1iV1 mT2VVqwzYjKy7GK1gEui2c= Received: from localhost (unknown [116.227.15.84]) by smtp8 (Coremail) with SMTP id DMCowABHn0No6NxYgSr7BA--.29585S3; Thu, 30 Mar 2017 19:13:45 +0800 (CST) From: Huang Ying To: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Subject: [PATCH -v2] services: dict.scm: Support more dicod configuration Date: Thu, 30 Mar 2017 19:13:34 +0800 Message-Id: <20170330111334.8472-1-huang.ying.caritas@gmail.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: DMCowABHn0No6NxYgSr7BA--.29585S3 X-Coremail-Antispam: 1Uf129KBjvJXoW3Jr4Dtr1fCr45tryxArW8JFb_yoWxCFW5p3 ykurWSyr17WF9I9Fn3ZFy09w15WFyrGr43trs3trW7Jw1UZry2vr4xt3ySkF4xAr17X3W7 Zr4Utr18urs8C37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jQ8n5UUUUU= X-Originating-IP: [116.227.15.84] X-CM-SenderInfo: xkxd0wxb1l0wxbfd2xxwdvqiywtou0bp/1tbiSgaqtlO-4iHGVwABsv X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit Cc: guix-devel@gnu.org, Huang Ying , guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) * gnu/services/dict.scm (): Add handlers to configure handlers (module instances). (): Add new record type to describe handler (module instance). (): Add more fields. (dicod-configuration-file): Support convert handlers and enhanced databases configuration to config file. * doc/guix.text: Add description of newly added dicod configuration. --- doc/guix.texi | 57 ++++++++++++++++++++++++++++++++++++++++++++++----- gnu/services/dict.scm | 52 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 96 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 57595b95e..f1a063581 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14370,25 +14370,49 @@ This is the list of IP addresses and ports and possibly socket file names to listen to (@pxref{Server Settings, @code{listen} directive,, dico, GNU Dico Manual}). +@item @code{handlers} (default: @var{'()}) +List of @code{} objects denoting handlers (module instances). + @item @code{databases} (default: @var{(list %dicod-database:gcide)}) List of @code{} objects denoting dictionaries to be served. @end table @end deftp -@deftp {Data Type} dicod-database -Data type representing a dictionary database. +@deftp {Data Type} dicod-handler +Data type representing a dictionary handler (module instance). @table @asis @item @code{name} -Name of the database, will be used in DICT commands. +Name of the handler (module instance). -@item @code{module} -Name of the dicod module used by this database +@item @code{module} (default: @var{#f}) +Name of the dicod module of the handler (instance). If it is @code{#f}, +the module has the same name as the handler. (@pxref{Modules,,, dico, GNU Dico Manual}). @item @code{options} List of strings or gexps representing the arguments for the module handler +@end table +@end deftp + +@deftp {Data Type} dicod-database +Data type representing a dictionary database. + +@table @asis +@item @code{name} +Name of the database, will be used in DICT commands. + +@item @code{handler} +Name of the dicod handler (module instance) used by this database (@pxref{Handlers,,, dico, GNU Dico Manual}). + +@item @code{complex} (default: @var{#f}) +Whether the database configuration complex. The complex configuration +will need a corresponding @code{} object, otherwise not. + +@item @code{options} +List of strings or gexps representing the arguments for the database +(@pxref{Databases,,, dico, GNU Dico Manual}). @end table @end deftp @@ -14397,6 +14421,29 @@ A @code{} object serving the GNU Collaborative International Dictonary of English using the @code{gcide} package. @end defvr +The following is an example @code{dicod-service} configuration. + +@example +(dicod-service #:config + (dicod-configuration + (handlers + (list + (dicod-handler + (name "wordnet") + (module "dictorg") + (options + '("dbdir=/gnu/store/xxxx-wordnet"))))) + (databases + (list + (dicod-database + (name "wordnet") + (complex #t) + (handler "wordnet") + (options + '("database=wn"))) + %dicod-database:gcide)))) +@end example + @subsubsection Version Control The @code{(gnu services version-control)} module provides the following services: diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index 303067037..596f901f3 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2017 Huang Ying ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:export (dicod-service dicod-service-type dicod-configuration + dicod-handler dicod-database %dicod-database:gcide)) @@ -46,21 +48,30 @@ (dico dicod-configuration-dico (default dico)) (interfaces dicod-configuration-interfaces ;list of strings (default '("localhost"))) - (databases dicod-configuration-databases - ;; list of + (handlers dicod-configuration-handlers ;list of + (default '())) + (databases dicod-configuration-databases ;list of (default (list %dicod-database:gcide)))) +(define-record-type* + dicod-handler make-dicod-handler + dicod-handler? + (name dicod-handler-name) + (module dicod-handler-module (default #f)) + (options dicod-handler-options (default '()))) + (define-record-type* dicod-database make-dicod-database dicod-database? (name dicod-database-name) - (module dicod-database-module) + (handler dicod-database-handler) + (complex dicod-database-complex (default #f)) (options dicod-database-options (default '()))) (define %dicod-database:gcide (dicod-database (name "gcide") - (module "gcide") + (handler "gcide") (options (list #~(string-append "dbdir=" #$gcide "/share/gcide") "idxdir=/var/run/dicod")))) @@ -76,22 +87,47 @@ (shell (file-append shadow "/sbin/nologin"))))) (define (dicod-configuration-file config) + (define handler->text + (match-lambda + (($ name #f '()) + `(" +load-module " ,name ";")) + (($ name #f options) + (handler->text (dicod-handler + (name name) + (module name) + (options options)))) + (($ name module options) + `(" +load-module " ,name " { + command \"" ,module (string-join (list ,@options) " " 'prefix) "\"; +}\n")))) + (define database->text (match-lambda - (($ name module options) + (($ name handler #f options) + (append + (handler->text (dicod-handler + (name handler))) + (database->text (dicod-database + (name name) + (handler handler) + (complex #t) + (options options))))) + (($ name handler complex options) `(" -load-module " ,module "; database { name \"" ,name "\"; - handler \"" ,module + handler \"" ,handler (string-join (list ,@options) " " 'prefix) "\"; }\n")))) (define configuration->text (match-lambda - (($ dico (interfaces ...) databases) + (($ dico (interfaces ...) handlers databases) (append `("listen (" ,(string-join interfaces ", ") ");\n") + (append-map handler->text handlers) (append-map database->text databases))))) (apply mixed-text-file "dicod.conf" (configuration->text config))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 31 18:49:12 2017 Received: (at 26308-done) by debbugs.gnu.org; 31 Mar 2017 22:49:12 +0000 Received: from localhost ([127.0.0.1]:54865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cu5Lz-0008AC-Ur for submit@debbugs.gnu.org; Fri, 31 Mar 2017 18:49:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cu5Lx-00089w-IF for 26308-done@debbugs.gnu.org; Fri, 31 Mar 2017 18:49:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cu5Lp-0001IC-Le for 26308-done@debbugs.gnu.org; Fri, 31 Mar 2017 18:49:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu5Lj-0001CN-ND; Fri, 31 Mar 2017 18:48:55 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:59896 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cu5Lj-0000Kz-0m; Fri, 31 Mar 2017 18:48:55 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Huang Ying Subject: Re: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration References: <20170330111334.8472-1-huang.ying.caritas@gmail.com> Date: Sat, 01 Apr 2017 00:48:52 +0200 In-Reply-To: <20170330111334.8472-1-huang.ying.caritas@gmail.com> (Huang Ying's message of "Thu, 30 Mar 2017 19:13:34 +0800") Message-ID: <87y3vlhxkb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26308-done Cc: guix-devel@gnu.org, 26308-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, Huang Ying skribis: > * gnu/services/dict.scm (): Add handlers to configure > handlers (module instances). > (): Add new record type to describe handler (module inst= ance). > (): Add more fields. > (dicod-configuration-file): Support convert handlers and enhanced datab= ases > configuration to config file. > > * doc/guix.text: Add description of newly added dicod configuration. I=E2=80=99ve committed with a few adjustments to the commit log and cosmetic changes: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D9af7ecd9591b4eff4= 1389291bbc586dcf09e2665 > +@example > +(dicod-service #:config > + (dicod-configuration > + (handlers > + (list > + (dicod-handler > + (name "wordnet") > + (module "dictorg") > + (options > + '("dbdir=3D/gnu/store/xxxx-wordnet"))))) I=E2=80=99ve changed this to use a real example instead of =E2=80=9Cxxx=E2= =80=9D. > (define-record-type* > dicod-database make-dicod-database > dicod-database? > (name dicod-database-name) > - (module dicod-database-module) > + (handler dicod-database-handler) > + (complex dicod-database-complex (default #f)) I changed that to =E2=80=98complex?=E2=80=99, to make it clear that it=E2= =80=99s a Boolean. While I was at it, I wrote a simple test for the dicod service: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D985a8599ed742053b= 52ac85f753c4feb54af93cb It uses the example handler that you gave in the doc, but I think this handler actually does nothing because WordNet does not provide data in the dict.org format AIUI (and its data is under =E2=80=9C/dict=E2=80=9D any= way.) Is that correct? Do you have another example in mind that could use a dict.org-formatted database? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 01 12:05:58 2017 Received: (at 26308-done) by debbugs.gnu.org; 1 Apr 2017 16:05:58 +0000 Received: from localhost ([127.0.0.1]:55898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuLXJ-0002rM-8N for submit@debbugs.gnu.org; Sat, 01 Apr 2017 12:05:58 -0400 Received: from m12-16.163.com ([220.181.12.16]:55623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuHDb-000140-MG for 26308-done@debbugs.gnu.org; Sat, 01 Apr 2017 07:29:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=HdogR vLN6LNFZ7CgzisW1BAdYtmUTqw5eofsa7Bit6k=; b=nGxT7Shdlhli4UFQvd3lt oD/DY4B1iEx7uIBfBYxe2wwPGpmkiESDew7hK5DEGR7SHo8f5TRb6Vpk3ia+swx8 ejGBSrJUuLzvUq/k7fFaVxk+ffLsuPV7hUswckDfGYzO1GaLD4FP8UujTbAwV8iR fbeVvAoNSXo8COTNbBdfsQ= Received: from yhuang-guixsd (unknown [116.227.15.84]) by smtp12 (Coremail) with SMTP id EMCowAC3RMICj99YcFuxNQ--.24606S2; Sat, 01 Apr 2017 19:29:07 +0800 (CST) From: "Huang\, Ying" To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration References: <20170330111334.8472-1-huang.ying.caritas@gmail.com> <87y3vlhxkb.fsf@gnu.org> Date: Sat, 01 Apr 2017 19:29:05 +0800 In-Reply-To: <87y3vlhxkb.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 01 Apr 2017 00:48:52 +0200") Message-ID: <87r31cl62m.fsf@163.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EMCowAC3RMICj99YcFuxNQ--.24606S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZF48GrW7JFW5XF13ZF43Jrb_yoW8ur1fp3 45uFWUKrZFqr9FvaykZFy09a43Aa9xGr4UXrn5trW2kw1DZFyavr4Ikw43CFs7Zr1qqw12 va1UXryFkr4DAa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bemhwUUUUU= X-Originating-IP: [116.227.15.84] X-CM-SenderInfo: xkxd0wxb1l0wxbfd2xxwdvqiywtou0bp/1tbiRQOstlWBVK2CCQAAs6 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26308-done X-Mailman-Approved-At: Sat, 01 Apr 2017 12:05:55 -0400 Cc: guix-devel@gnu.org, 26308-done@debbugs.gnu.org, Huang Ying X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 6.2 (++++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: ludo@gnu.org (Ludovic Courtès) writes: > Hello, > > Huang Ying skribis: > >> * gnu/services/dict.scm (): Add handlers to configure >> handlers (module instances). >> (): Add new record type to describe handler (module instance). >> (): Add more fields. >> (dicod-configuration-file): Support convert handlers and enhanced databases >> configuration to config file. >> >> * doc/guix.text: Add description of newly added dicod configuration. > > I’ve committed with a few adjustments to the commit log and cosmetic > changes: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9af7ecd9591b4eff41389291bbc586dcf09e2665 > >> +@example >> +(dicod-service #:config >> + (dicod-configuration >> + (handlers >> + (list >> + (dicod-handler >> + (name "wordnet") >> + (module "dictorg") >> + (options >> + '("dbdir=/gnu/store/xxxx-wordnet"))))) > > I’ve changed this to use a real example instead of “xxx”. > >> (define-record-type* >> dicod-database make-dicod-database >> dicod-database? >> (name dicod-database-name) >> - (module dicod-database-module) >> + (handler dicod-database-handler) >> + (complex dicod-database-complex (default #f)) > > I changed that to ‘complex?’, to make it clear that it’s a Boolean. > > While I was at it, I wrote a simple test for the dicod service: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=985a8599ed742053b52ac85f753c4feb54af93cb > > It uses the example handler that you gave in the doc, but I think this > handler actually does nothing because WordNet does not provide data in > the dict.org format AIUI (and its data is under “/dict” anyway.) Is > that correct? > > Do you have another example in mind that could use a dict.org-formatted > database? [...] Content analysis details: (6.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [220.181.12.16 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [220.181.12.16 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [220.181.12.16 listed in zen.spamhaus.org] 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [220.181.12.16 listed in psbl.surriel.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (huang_ying_caritas[at]163.com) -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid ludo@gnu.org (Ludovic Courtès) writes: > Hello, > > Huang Ying skribis: > >> * gnu/services/dict.scm (): Add handlers to configure >> handlers (module instances). >> (): Add new record type to describe handler (module instance). >> (): Add more fields. >> (dicod-configuration-file): Support convert handlers and enhanced databases >> configuration to config file. >> >> * doc/guix.text: Add description of newly added dicod configuration. > > I’ve committed with a few adjustments to the commit log and cosmetic > changes: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9af7ecd9591b4eff41389291bbc586dcf09e2665 > >> +@example >> +(dicod-service #:config >> + (dicod-configuration >> + (handlers >> + (list >> + (dicod-handler >> + (name "wordnet") >> + (module "dictorg") >> + (options >> + '("dbdir=/gnu/store/xxxx-wordnet"))))) > > I’ve changed this to use a real example instead of “xxx”. > >> (define-record-type* >> dicod-database make-dicod-database >> dicod-database? >> (name dicod-database-name) >> - (module dicod-database-module) >> + (handler dicod-database-handler) >> + (complex dicod-database-complex (default #f)) > > I changed that to ‘complex?’, to make it clear that it’s a Boolean. > > While I was at it, I wrote a simple test for the dicod service: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=985a8599ed742053b52ac85f753c4feb54af93cb > > It uses the example handler that you gave in the doc, but I think this > handler actually does nothing because WordNet does not provide data in > the dict.org format AIUI (and its data is under “/dict” anyway.) Is > that correct? > > Do you have another example in mind that could use a dict.org-formatted > database? There are dict.org dict for wordnet and foldoc in Debian. Some conversion tool is needed to convert the dict database file. Best Regards, Huang, Ying > Thank you! > > Ludo’. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 01 18:12:47 2017 Received: (at 26308-done) by debbugs.gnu.org; 1 Apr 2017 22:12:47 +0000 Received: from localhost ([127.0.0.1]:56019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuRGI-0004xc-W9 for submit@debbugs.gnu.org; Sat, 01 Apr 2017 18:12:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuRGH-0004xQ-HQ for 26308-done@debbugs.gnu.org; Sat, 01 Apr 2017 18:12:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuRG9-0000gR-5o for 26308-done@debbugs.gnu.org; Sat, 01 Apr 2017 18:12:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuRG9-0000gI-21; Sat, 01 Apr 2017 18:12:37 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:59868 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cuRG8-0005sO-8q; Sat, 01 Apr 2017 18:12:36 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: "Huang\, Ying" Subject: Re: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration References: <20170330111334.8472-1-huang.ying.caritas@gmail.com> <87y3vlhxkb.fsf@gnu.org> <87r31cl62m.fsf@163.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 02 Apr 2017 00:12:32 +0200 In-Reply-To: <87r31cl62m.fsf@163.com> (Ying Huang's message of "Sat, 01 Apr 2017 19:29:05 +0800") Message-ID: <8737drhj5b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26308-done Cc: guix-devel@gnu.org, 26308-done@debbugs.gnu.org, Huang Ying X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, "Huang, Ying" skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >> While I was at it, I wrote a simple test for the dicod service: >> >> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D985a8599ed7420= 53b52ac85f753c4feb54af93cb >> >> It uses the example handler that you gave in the doc, but I think this >> handler actually does nothing because WordNet does not provide data in >> the dict.org format AIUI (and its data is under =E2=80=9C/dict=E2=80=9D = anyway.) Is >> that correct? >> >> Do you have another example in mind that could use a dict.org-formatted >> database? > > There are dict.org dict for wordnet and foldoc in Debian. Some > conversion tool is needed to convert the dict database file. OK. Any idea of a DICT database file that we could use as an example and as a test? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 22:08:43 2017 Received: (at 26308-done) by debbugs.gnu.org; 3 Apr 2017 02:08:43 +0000 Received: from localhost ([127.0.0.1]:57995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1curQB-0006sK-4e for submit@debbugs.gnu.org; Sun, 02 Apr 2017 22:08:43 -0400 Received: from mail-qk0-f173.google.com ([209.85.220.173]:36709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1curQA-0006s7-3m for 26308-done@debbugs.gnu.org; Sun, 02 Apr 2017 22:08:42 -0400 Received: by mail-qk0-f173.google.com with SMTP id p22so103426230qka.3 for <26308-done@debbugs.gnu.org>; Sun, 02 Apr 2017 19:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1BmtQ6oBNxSAtgeTOdMwoE7kEDSPDBju4wTikKCDJaU=; b=n+RELN4pxx1xK/B1Jz4lpGDs2HUNnt3/5eOwvV1xbgVbqjsLsbInGsISCdLFFxTlXF QlSGrnvcmjfAeI442ggILZha/ARnohoSHrvrhYAm5sd6OwyKc23iOuC1VK3cQeXJZmXb Ew/K/R0fsGkafc7KSI64Sl2628svdhcSPYB12qJRcq73oOxOV5O1P0/ctA/bcArU6wrE FCVFbEXhgMdlUVVzF93EuvKBLdyGfWdgf/n+17OnC3o82bFSlbjAu4bRu2mWsVRMtkBy 3h2CBmPU8fFLhZxnQFsdDmH2CuZxjvzgMxZESiaH7Ad/iibJZWw2uMiivPxvt0Kz0QEO XpkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1BmtQ6oBNxSAtgeTOdMwoE7kEDSPDBju4wTikKCDJaU=; b=FIH0OZt6xwKyxvm9e7/qoFRjW2Gu061f83zAAbFJ8O5WuATXFJmAdr5ERwcOJ2v5SD 52h+icKi8dTRNNuoc2+SoD/MBUBmkVr1SsX/16YOEjDBocmSZe4RIZkfvqiaV5XQvscC OGOXzNVc9EJC3xqaxSqdvvfrovO6YzKeyGfapjte/rYObcnETL3b/N7InOtXp5S5sdxn sVGso8mxQ2pksMX8VoLD/dHKghBnh+h5J4AR7xXtqVYlJWvPjH1k4fxILpJBOZLzxy10 uPiUate3YIrNnLVe0kYySDndKdiEt90WQDCXxuZLemEwfUDKA5uQhaF5D9ULNOTEWxqO QUZQ== X-Gm-Message-State: AFeK/H2/4aJ1a3//rYgVE8LAOOBenxmGmCYp7vWMRycvMoLkyY5A43oBVgQTIVmt6lpqRbKALTVrTHst58N4+g== X-Received: by 10.55.120.194 with SMTP id t185mr14396303qkc.65.1491185316572; Sun, 02 Apr 2017 19:08:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.53.88 with HTTP; Sun, 2 Apr 2017 19:08:36 -0700 (PDT) In-Reply-To: <8737drhj5b.fsf@gnu.org> References: <20170330111334.8472-1-huang.ying.caritas@gmail.com> <87y3vlhxkb.fsf@gnu.org> <87r31cl62m.fsf@163.com> <8737drhj5b.fsf@gnu.org> From: huang ying Date: Mon, 3 Apr 2017 10:08:36 +0800 Message-ID: Subject: Re: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26308-done Cc: guix-devel@gnu.org, "Huang, Ying" , 26308-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Sun, Apr 2, 2017 at 6:12 AM, Ludovic Court=C3=A8s wrote: > Hello, > > "Huang, Ying" skribis: > >> ludo@gnu.org (Ludovic Court=C3=A8s) writes: > > [...] > >>> While I was at it, I wrote a simple test for the dicod service: >>> >>> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D985a8599ed742= 053b52ac85f753c4feb54af93cb >>> >>> It uses the example handler that you gave in the doc, but I think this >>> handler actually does nothing because WordNet does not provide data in >>> the dict.org format AIUI (and its data is under =E2=80=9C/dict=E2=80=9D= anyway.) Is >>> that correct? >>> >>> Do you have another example in mind that could use a dict.org-formatted >>> database? >> >> There are dict.org dict for wordnet and foldoc in Debian. Some >> conversion tool is needed to convert the dict database file. > > OK. Any idea of a DICT database file that we could use as an example > and as a test? I found there is freedict database file, for example, https://downloads.sourceforge.net/project/freedict/English%20-%20French/0.1= .4/freedict-eng-fra-0.1.4.tar.bz2?r=3Dhttps%3A%2F%2Fsourceforge.net%2Fproje= cts%2Ffreedict%2Ffiles%2FEnglish%2520-%2520French%2F0.1.4%2Ffreedict-eng-fr= a-0.1.4.tar.bz2%2Fdownload&ts=3D1491090445&use_mirror=3Dexcellmedia The home page is http://freedict.org/en/, the github page is http://freedict.org/en/, according to https://github.com/freedict/fd-dictionaries/blob/master/eng-fra/COPYING, the database file is released with GPL. Best Regards, Huang, Ying > Thanks, > Ludo=E2=80=99. From unknown Mon Aug 18 21:50:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 01 May 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator