Mailing List Archive

Support open source code!


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

add a word to the Canna dictionaries (was: WXG Input method. q about canna)



David Eduardo Gomez Noguera <davidgn@example.com> writes:

[...]

> is there documentation on the canna on how to customize the dictionaries?
> i really wan to do it.

Similar as I explained in my previous mail, when using kinput2, hit
the "home" key after going into Japanese mode, select 「3部首入力」 
in the window which pops up and follow the instructions in the windows
which pop up.

There is a problem though which makes this sometimes very difficult.

During this procedure, you are asked to enter the word you want to
add to the dictionary:

   単語?[ ]

Now, if you want to enter 田邉 here, it can be a real pain, because
the hiragana たなべ which you enter don't convert yet easily to 田邉.
Making this conversion easy is the reason you want to record this word
into the dictionary after all.  And in this dialog, where you must
enter the word to record, you can't use radical input and you can't
cut and paste from some other application (at least it didn't work for
me). So it is sometimes very hard.

It is much easier to do it from XEmacs, because you can first input
the desired word by radical input, cut and paste, whatever ...,
then mark it as a region and call

   M-x canna-touroku-region

There are also commandline tools which come with Canna to add and
delete words from dictionaries. Have a look at the man pages of

    addwords delwords catdic cpdic lsdic mkdic

But to use these tools, you have to understand the format of the
entries in the dictionaries, because you have to give the input in
this format. For example, a dictionary might look like.

    mfabian@example.com:/var/lib/canna/dic/user/mfabian$ cat usr1.ctd 
    #*DIC user [Thu Feb  8 15:49:05 2001]
    たなべ #JN 田邉

Here, the "#JN" seems to mean that 田邉 is a person name.  When you
create such an entry from kinput2 or XEmacs, you will be asked some
questions interactively: is the word a noun, a person name, a place
name, a verb, ... etc. ?  In this case I did choose "person name"
and this resulted in the tag "#JN". So I think you can find out
the meaning of these tags by experimenting a little bit, and then
edit a file "newwords" containing entries in this format with your favorite
method and add the contents of this file to a Canna dictionary
as described in the "addwords" man-page:

  ~$ addwords user < newwords

For more detailed information, it is probably a good idea to read the
Canna documents available at

    http://www.nec.co.jp/japanese/product/computer/soft/canna/docs/index.html

    http://www.nec.co.jp/japanese/product/computer/soft/canna/docs/cannadoc.pdf
    http://www.nec.co.jp/japanese/product/computer/soft/canna/docs/canlisp.pdf
    http://www.nec.co.jp/japanese/product/computer/soft/canna/docs/protocol.pdf

These pdf files are in Japanese. They are also available in PostScript
somewhere, but I don't know where to download the PostScript version.
I can send you the PostScript versions by private mail, if it is easier
for you to read a Japanese PostScript document than a Japanese pdf
Document.

> And if i add entries, should i report them to somebody as a sor of
> patch or something?

I have no idea.

-- 
Mike Fabian   <mfabian@example.com>

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links