JDictd User guide

What is JDictd?

JDictd is a set of Java programs that implement the Dictionary Server Protocol (DICT) as specified in RFC 2229. It is used to access dictionary definitions from a set of natural language dictionary databases. The software (including binaries and source code) is distributed under the terms of the GNU General Public License.

To use JDictd you need the Java Runtime Environment (JRE) version 1.1 or higher to run it. JRE can be downloaded from Sun's Website. Also, you need to get the databases you would like to use. A list of freely available dictionary databases can be found on the Website of the DICT Development Group. (Included in the distribution is a small sample dictionary to test that the server is working).

Features

Quick Installation

  1. Download the distribution
  2. Unpack the downloaded file, keeping the directory structure. You shall get a directory jdictdXX (XX is the version number).
  3. From the directory jdictdXX, run the following command:

    java -cp jdictd.jar org.dict.server.JDictd Elements/elements.ini

    (This assumes that you run JDK1.2 or higher. If you run JDK1.1, please replace the command 'java' with 'jre'). You should get a message like the following:

    Mon Feb 25 23:49:08 CET 2002: JDictd started at 2628
    Mon Feb 25 23:49:08 CET 2002: HTTP server started at 2626
    
  4. Start your favorite Web browser and open the address http://localhost:2626
    You should see an input form. Enter some word and see the result from the server.
If you get an error message when starting the server, please consult the Trouble-shooting guide. Otherwise the DICT server is up and running. You can access it either by using the Web interface as described above or using one of the available DICT clients (see http://www.dict.org). Included in the distribution of JDictd is a very simple Java client. You can run it as follows:

java -cp jdictd.jar org.dict.server.JDict uranium

You should see the following output:
220 dict.org Ho Ngoc Duc's DICT server 1.2 <1014720519315@dict.org>
250 OK
150 1 definitions found: list follows
151 "uranium" elements "Elements database 20001107": text follows
uranium
Symbol: U
Atomic number: 92
Atomic weight: (231)
...
.
250 Command complete
221 Closing connection

Adding further databases

After downloading other dictionary databases you can tell the JDictd server to use them. The simplest way is to put the data and index file into a subdirectory of your installation directory (jdictdXX), create a configuration file for that new dictionary, and then (re)start the server with the name of that configuration file as an additional command-line argument. For example, if you want to add the Free Online Dictionary of Computing then you should proceed as follow:

Database configuration file

A configuration file contains information about certain dictionary databases. It typically looks as follows:

# Configuration for WordNet
wn.data=wn.dict.dz
wn.index=wn.index
wn.morph=org.dict.kernel.EnglishMorphAnalyzer
wn.html=vietdict.server.WordnetPrinter

# Configuration for FolDoc
fd.data=foldoc.dict.dz
fd.index=foldoc.index
fd.morph=org.dict.kernel.EnglishMorphAnalyzer
fd.name=Computing Dictionary
fd.encoding=latin1

Lines beginning with # are comments. There are two mandatory entries: db.data and db.index specify the location of the data and the index file for the database db. A number of optional configurable properties are supported:

  • db.name: the database name
  • db.encoding: encoding of the database (default: UTF-8)
  • db.morph: the morphological function used to detect variations of a word. For example, if EnglishMorphAnalyzer is used, one can look for "detects" (that is not in the dictionary) and get the base form "detect"
  • db.html: the HTML formatter for the output. When the client receives the entries from the dictionary, it may use an HTML formatter to generate nice HTML output for displaying the entry in some browser.
  • For programmer

    Included in the distribution is the source code and some documentation.
    Ho Ngoc Duc <duc@informatik.uni-leipzig.de>