GNU bug report logs - #26308
[PATCH -v2] services: dict.scm: Support more dicod configuration

Previous Next

Package: guix-patches;

Reported by: Huang Ying <huang.ying.caritas <at> gmail.com>

Date: Thu, 30 Mar 2017 11:15:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Huang\, Ying" <huang_ying_caritas <at> 163.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: guix-devel <at> gnu.org, 26308-done <at> debbugs.gnu.org, Huang Ying <huang.ying.caritas <at> gmail.com>
Subject: bug#26308: [PATCH -v2] services: dict.scm: Support more dicod configuration
Date: Sat, 01 Apr 2017 19:29:05 +0800
ludo <at> gnu.org (Ludovic Courtès) writes:

> Hello,
>
> Huang Ying <huang.ying.caritas <at> gmail.com> skribis:
>
>> * gnu/services/dict.scm (<dicod-configuration>): Add handlers to configure
>>   handlers (module instances).
>>   (<dicod-handler>): Add new record type to describe handler (module instance).
>>   (<dicod-database>): 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>
>>    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’.





This bug report was last modified 8 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.