Chinese-English Dictionary (Lisp)

By gb

  This is a rudimentary Chinese-English dictionary written in Common Lisp. It can translate words in both directions, and also displays Chinese characters (hanzi) as ASCII drawings. Simplified characters instead of traditional characters are used for visual clarity, since the ASCII drawings are quite blocky.

  The code in this program uses the trusty CEDICT dictionary file for dictionary data, and determines the ASCII representation of hanzi glyphs from a Chinese font BDF file.  All data is loaded into RAM at startup.  The code uses a ‘#’ character for the ASCII drawing ‘pixels’.  On DOS/Windows machines, the DOS character 178 looks much better; a sample screenshot is below.

 Sample Screenshot of Hanzi with DOS-only Character

  This program was written as a fun initial experiment with the Lisp language, and violates a number of standard Lisp style guidelines.  The greatest violation is the use of end brace comments; the braces are commented because the editor used (TextPad) is not a Lisp development powerhouse (c.f. Emacs in Lisp mode), and the comments are a great help.

To execute:
 Open a Common Lisp environment.
 (load “starter.lisp”)
 (start)

Here is output from a sample run. 
Sample Output

Here is a link to the zipped source.  It is in standard Common Lisp, and has been tested in several different Lisp interpreters.
Source Code

References
CEDICT
gb16fs.bdf

Gnu Lisp Common Lisp for Windows
HTML stat counters