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).
jdictdXX
(XX is the version number).
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
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
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:
DOC
under jdictdXX
foldoc.ini
in DOC
which contains the following lines:
java -cp jdictd.jar org.dict.server.JDictd Elements/elements.ini DOC/foldoc.ini
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: