Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Using JDIC from inside a text editor



Shawn <javajunkie@example.com> wrote:
>> Jerald Weinstein wrote:
>> > By emulating JWP I meant all the user had to do to check on the
>> > dictionary meaning of a word was a two step process of
>> > highliting the hiragana/kanji and then pressing a function key (F6)
>> > and the dictionary would open up immediately inside of the editor
>> > with a myriad of EDICT meanings.

It was relatively easy to do it JWP etc. because it was all in the one app.
Ditto for edict.el in emacs.

Things get *much* tougher when you want to make it work between apps, as
you bring in APIs and related text coding issues.

>> I used to use JWP and JWPce but now prefer http://jgloss.sourceforge.net/ 
>> (in part for the way it can morphologically analyze a sentence when 
>> looking up the kana/translations for it).

JGloss leaves me a bit cold, partly because it uses Chasen, and I don't think
a morphological analyzer is the right tool in this case. If I see, for
example 権力闘争 in some text, I'd like to be told it was けんりょくとうそう
(power struggle), not けんりょく ((political) power; authority; influence)
and とうそう (strife; conflict). Also, it tends to use limited lexicons.
In WWWJDIC's word-translator I use a prioritized file of 550k+ entries,
incl. ~400k proper names. Also JGloss marks up complete files. What people
really want is the odd word and phrase.

There are some good Windows apps that do all this. RobotWord and Dr Mouse
come to mind. A few years back I started on an app that did something
similar in Linux. It was combination of a resident Tcl app(*) with the 
dictionary lookup from xjdic. The Tcl app looped waiting for some thext to
appear in the cut buffer. If text appeared, and it was Japanese, it looked
it up in the dictionary and popped up a Tk window with the translation. The 
popup was killed when the mouse pointer was moved. No keystrokes needed.
I have a sample at http://www.csse.monash.edu.au/~jwb/jmdemo.gif when I 
highlighted問題. 

Why has this never seen the light of day? It turned out to be far too
fragile. Far too many apps do not follow X's text-coding rules. Some,
like Mozilla will work for a while, then mysteriously stop. kterm always
seemed to fail to pass on the first character af the string, etc. etc.
Eventually I gave up.

>> Otherwise you could use the jgloss api to look stuff up and then give the 
>> openoffice a whirl (say the  linguistic2 module) to try and get real 
>> integration. The jgloss api is easy enough to use and I use it to give a 
>> meaning to kanji pulled from a database, but I know little about the 
>> openoffice side other than the few minutes of quick reading I just did out 
>> of curiousity.

I wish you luck. If I was a whizz at X widgets I might get inspired to 
try again. Right now though I can cut-and-paste into xjdic using two 
mouse clicks, so there's no great drive to do it.

Cheers

Jim

(*) The smart part of the Tcl snippet came from Todd Rudick of Rikai fame.

-- 
Jim Breen                                http://www.csse.monash.edu.au/~jwb/
Computer Science & Software Engineering,                Tel: +61 3 9905 9554
Monash University, VIC 3800, Australia                  Fax: +61 3 9905 5146
(Monash Provider No. 00008C)                ジム・ブリーン@モナシュ大学

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links