By katsumii on Dec 22, 2007
I found a Chinese dictionary/annotation tool written in Java called DimSum. I ran it on Windows and Solaris. Here's how I ran it on Solaris 10 x86 8/07.
- Download DimSum.jar from http://www.mandarintools.com/download/DimSum.jar
- DimSum uses public-domain Chinese-English dictionary called CEDICT. The dictionary's was just updated last week. So, replace the one in DimSum.jar with the latest one.
$ curl http://www.mdbg.net/chindict/export/cedict/cedict_1_0_ts_utf-8_mdbg.txt.gz | gunzip > cedict_ds.u8
$ jar uvf DimSum.jar cedict_ds.u8
adding: cedict_ds.u8(in = 3481130) (out= 1436906)(deflated 58%)
- Now, I can run it just with 'java -jar'. But if one wants to annotate Chinese web page, start it like:
$ BROWSER=firefox PATH=/usr/dt/bin:$PATH java -jar DimSum.jar &
- I annotated http://cn.sun.com/. It opened a new tab in Firefox. Notice the URL below. cn.sun.com's page was processed locally and served up from local host's port 4445. When I hover the mouse over Chinese word, translation box appears.
- Now, there's a small glitch. When the DimSum.jar starts browser, it does it by via /usr/dt/bin/sdtwebclient. Problem is that sdtwebclient doesn't exit even after successful launch so DimSum.jar hangs. Workaround is to kill sdtwebclient like:
$ pkill sdtwebclient