DICT

DICT
Communication protocol
PurposeAllow clients access to remote dictionaries
DeveloperDICT Development Group
IntroductionOctober 1997; 29 years ago (1997-10)
OSI layerApplication layer (7)
Port2628 (TCP)
RFC2229 A Dictionary Server Protocol

The Dictionary Server Protocol, better known as DICT, is a dictionary network protocol created in 1997. It is described in RFC 2229, which was authored by Rickard E. Faith and Bret Martin while the latter was a student at Yale.: sec. 12 

DICT was created to supersede an older method of searching natural language definitions: the Webster protocol. The Webster protocol was limited in that it allowed clients to search only one dictionary or thesaurus at a time. Further, by the mid-1990s, the Webster protocol had seen a dwindling number of publicly-available servers. DICT, by contrast, allows clients to access many dictionaries at once via a uniform interface, and takes advantage of the increasing number of freely-available databases on the Internet.: sec. 1 

As of 2010, the project has been led by Aleksey Cheusov and Rickard Faith.

Queries

Queries and definitions using the DICT protocol are sent in clear-text, meaning that there is no encryption.: sec. 5  Nevertheless, various forms of authentication (sans encryption) are supported, including Kerberos version 4.: sec. 3.1 

The protocol consists of a few commands a server must recognize so a client can access the available data and lookup word definitions. DICT servers and clients use TCP port 2628 by default. Queries are captured in the following URL scheme:

dict://⟨user⟩;⟨auth⟩@⟨host⟩:⟨port⟩/⟨c⟩:⟨word⟩:⟨database⟩:⟨strategy⟩:⟨n⟩

Dictionaries using the DICT protocol

Repositories of source files for the DICT Development group's dict protocol server (with a few sample dictionaries) are available online.

Dictionaries of English

Bilingual dictionaries

  • Big English–Russian Dictionary
  • English–French dictionary
  • Freedict provides a collection of over 85 translating dictionaries, as XML source files with the data, mostly accompanied by databases generated from the XML files in the format used by DICT servers and clients. These are available from the Freedict project web site at.
  • FREELANG Dictionary
  • Lingvo English–Russian and Russian–English dictionaries are not free, but when purchased, can easily be converted into DICT format
  • Mueller's English–Russian dictionary
  • Slovak-English legal dictionary
  • Slovak-Italian legal dictionary

DICT servers

DICT clients

A dictd server can be used from Telnet. For example, to connect to the DICT server on localhost, on a Unix system one can normally type:

telnet localhost dict

and then enter the command "help" to see the available commands. The standard dictd package also provides a "dict" command for command-line use.

More sophisticated DICT clients include:

There are also programs that read the DICT file format directly. For example, S60Dict, is a dictionary program for Symbian Series 60 that uses DICT dictionaries. Additionally, some DICT clients, such as Fantasdic, are also capable of reading the DICT format directly.

Dict file format

The standard dictd server made by the DICT Development Group uses a special dict file format. It comprises two files, a .index file and a .dict file (or .dict.dz if compressed). These files are usually generated by a program called dictfmt. For example, the Unix command:

$ dictfmt --utf8 --allchars -s "My Dictionary" -j mydict < mydict.txt

will compile a Unicode-compatible DICT file called mydict, with heading My Dictionary, from mydict.txt which is in Jargon File format i.e.:

:word1:definition 1
:word2:definition 2
etc.

Once the dictionary file has been produced, it can be easily installed on a server with commands similar to this:

# mv mydict.dict mydict.index /usr/share/dictd/
# /usr/sbin/dictdconfig—write
# /etc/init.d/dictd restart

Format converters

  • Linguae Software is able to convert from/to wb, dict (stardict and dictd) csv, xdxf, txt, ini and ling (native) file formats, Linux, Windows and Mac OS X.
  • XDXF XML Dictionary Exchange Format converts between various dictionary formats using pluggable codec architecture.

dictzip

In order to efficiently store dictionary data, dictzip, an extension to the gzip compression format (also the name of the utility), can be used to compress a .dict file. Dictzip compresses file in chunks and stores the chunk index in the gzip file header, thus allowing random access to the data.

See also