Saturday Dec 22, 2007

Chinese learning tool in Java

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.

  1. Download DimSum.jar from http://www.mandarintools.com/download/DimSum.jar
  2. 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%)
  3. 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 &

  4. 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.




  5. 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
web/text file annotation is not the only function of DimSum. There's also 'Dictionary' and 'Flashcards'. I'm thinking about adding Japanese translation to the dictionary.
About

Personal View of a Sales Engineer in Tokyo.

Search

Archives
« May 2016
SunMonTueWedThuFriSat
1
3
4
6
7
8
9
10
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today