3. The dicod daemon.

The main component of GNU Dico is dicod daemon. It is responsible for serving client requests and for coordinating the work of dictionary modules.

Dicod operates on a set of databases. Each database contains a set of headwords with corresponding articles, therefore it can be regarded as a dictionary, in which articles supply definitions (or translations) for headwords.

Each database has a unique name – a string of characters that serves to identify this particular database in a set of available databases. Two more pieces of textual data are associated with a database. A database information string (or info, for short), supplies a short description of the database. It is a sentence, tersely describing the database, e.g. ‘English-German Dictionary’. A database description provides full description of the dictionary, with author credits and copyright information. The length of this description is not limited.

Both pieces of information can be requested by the remote user. The command SHOW DB lists all available databases along with their descriptions:

 
SHOW DB
110 3 databases present
jargon "Jargon File (4.3.1, 29 Jun 2001)"
deu-eng "German-English Freedict dictionary"
en-pl-naut "English-Polish dictionary of nautical terms"
.
250 ok

Each line of output lists a name of the dictionary, and the corresponding description.

The SHOW INFO command displays full information about a database, whose name is given as its argument:

 
SHOW INFO en-pl-naut
112 information for en-pl-naut
An English-Polish dictionary of nautical terms

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover and Back-Cover Texts
.
250 ok

A definition for any given headword can be requested using the DEFINE command. It takes two arguments, the name of the database and the headword to look for in that database, e.g.:

 
DEFINE en-pl-naut sprit

If the headword is found in the database, its definition will be displayed, otherwise a diagnostic message will be returned, telling that the headword was not found.

There are two operation modes: ‘daemon’ and ‘inetd’.