From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Huang\, Ying" Subject: Re: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration Date: Sat, 01 Apr 2017 19:29:05 +0800 Message-ID: <87r31cl62m.fsf@163.com> References: <20170330111334.8472-1-huang.ying.caritas@gmail.com> <87y3vlhxkb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuHDt-0006mX-0n for guix-devel@gnu.org; Sat, 01 Apr 2017 07:29:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuHDp-0001MO-Sw for guix-devel@gnu.org; Sat, 01 Apr 2017 07:29:37 -0400 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") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, 26308-done@debbugs.gnu.org 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’.