Mailing List Archive

Support open source code!


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

Re: tlug: XEmacs 20.0 Wnn Input



--------------------------------------------------------
tlug note from Steve Dunham <dunham@example.com>
--------------------------------------------------------
Craig Oda <craig@example.com> writes:

> --------------------------------------------------------
> tlug note from Craig Oda <craig@example.com>
> --------------------------------------------------------
> Hi,
> thanks to Steve Dunham I've been using XEmacs 20.0 Japanese
> support.

> I got the source from ftp.xemacs.org.  

> I've compiled it with these switches:

>  --with-mule=yes \
>  --with-wnn=yes \
>  --wnn-includes=/usr/include/wnn

> I can display Japanese and get the EUC/Ja symbol in the lower
> left hand corner.  I can also use the edict.el interface to
> Jim Breene's EDICT dictionary in the w3 mode of XEmacs.  This
> is a lot better than mule since it supports inline graphics with
> clickable image maps and a bunch of other stuff.  

> My main challenge now is to get the input mode started.  In mule,
> I start input with C-\.  Unfortunately, this doesn't work in XEmacs.
> I can't get it to work with kinput2 either.   I have not tried
> canna or skk yet since I am more familiar with Egg and kinput2.
> I've tried C-o and a few other key combinations.  Does anyone
> have the magic string to get input mode started?  

Put this in your .emacs:

(when (featurep 'wnn)
  (require 'egg-wnn)
  (setq egg-default-startup-file "eggrc-wnn"))

You will also need to do:

(setenv "JSERVER" "localhost")

That should do it. (Apart from choosing Options/Language Environment/Japanese
in the menu.)

I really like the Egg input method that is built in to XEmacs.  After
you press C-\, you will see [あ] in the status line.  Then whatever
you type will appear in hiragana, between two fences, e.g.:

   |わたし| 

press space to convert:

   |私|

and return to remove the fences: 私

Note that after you hit return, you are still in hiragana mode: [あ],
you can enter more japanese, or press C-\ to switch back to normal
mode. 

> I'm using mule to write e-mail in Japanese and mainly plan to 
> use XEmacs to read Japanese web pages since it has better w3
> support.  However, I can imagine cases where I'm reading usenet
> with gnus in XEmacs and want to reply or ask a question in
> Japanese.  

VM (or whatever you prefer) works in XEmacs, you might want to try it
out...After all, what good is japanese email without inline images. :)

I'll include a tutorial from the XEmacs mailing list below. 


Steve
dunham@example.com


     -- below is a message from the XEmacs beta Mailing list --


>From: <jhod@example.com>
Date: Wed, 12 Feb 1997 22:31:35 +0900

>>>>> "Steven" == Steven L Baur <steve@example.com> writes:

    Steven> Jareth Hein writes:
    >> Steven L Baur wrote:
    >>>  (Did I lose some email?)
    >>> 
    >>> Somebody uploaded Wnn4.2.tar.gz to incoming and I moved it to
    >>> ftp.xemacs.org:/pub/beta/contrib/Wnn4.2.tar.gz
    >>> 
    >>> Is there English documentation to any of the input methods?
    >>> 
    >>> The recent Wnn patches will be integrated into 20.1-beta1.

    >> Well, I thought I sent you some mail regarding my upload...
    >> After I get things relativly stable (probably after the 20th or
    >> so) I intend to go through an comment all my changes and write
    >> some docs in English. What kind of docs do we need?

    Steven> How to build the Wnn library (I've already tried once and
    Steven> failed miserably), maybe the version you put on xemacs.org
    Steven> will work better.

The big problem with Wnn4.2 as distributed is that the imake files are
slightly broken. The quick fix is to take the Project.tmpl file in the
config dir and paste all of the lines after the line that contains the
comment 'OMRON' to your Project.tmpl in /usr/X11R6/lib/X11/config (or
whereever). I've sent a message about this to the authors, but have
not recieved a reply yet. Maybe I should just create a patched version...

    Steven> How to use it at a rudimentary level.  It would help if I
    Steven> could test a build by just typing at it.  Right now I can
    Steven> only test a canna link and I have no way of knowing
    Steven> whether it actually does anything.

I've never used canna with Mule or XEmacs, but here is a quick way of
checking wnn/egg. After doing the setup I explained in my first
message/patch, create a new buffer and type the following (minus quotes):
<C-\>
watashinonamaehanoharadesu.<space><return>
<C-\>

This should transform into the following:
私の名前は野原です。

(translated, 'My name is Nohara' This is the historical sentance that
Wnn was created for (and where the name came from. Wnn's big claim to
fame is it not only includes a rather comprehensive Kana-to-Kanji
dictionary, but also does rudamentary lexical parsing and probability
analysis to come up with a fitting conversion at the sentance level.) 

    Steven> I went out and bought a Japanese/English dictionary.  Can
    Steven> you easily explain how I can type Japanese in?

Well, real easy doesn't exist, but here's a quick runthrough: Japanese
sylablry are mostly single-pheneme, which means that all sounds (there
are roughly 50) are created with a consonant, followed by a vowel, with
the exception with the sound 'n' which can stand by itself, and the
fact that all vowels are also stand alone. The Hepburn system of
romanizing Japanese (the most common, and one of the ones used by Egg
to input Japanese from a roman keyboard) comes out thusly: 

 あ か が さ  ざ た  だ な ま は ば ぱ ら や わ
 ア カ ガ サ  ザ タ  ダ ナ マ ハ バ パ ラ ヤ ワ
  a ka ga sa  za ta  da na ma ha ba pa ra ya wa

 い き ぎ し  じ ち  ぢ に み ひ び ぴ り
 イ キ ギ シ  ジ チ  ヂ ニ ミ ヒ ビ ピ リ
  i ki gi shi zi chi di ni mi hi bi pi ri

 う く ぐ す  ず つ  づ ぬ む ふ ぶ ぷ る ゆ           ん
 ウ ク グ ス  ズ ツ  ヅ ヌ ム フ ブ プ ル ユ           ン
  u ku gu su  zu tsu du nu mu hu bu pu ru yu            n

 え け げ せ  ぜ て  で ね め へ べ ぺ れ
 エ ケ ゲ セ  ゼ テ  デ ネ メ ヘ ベ ペ レ
  e ke ge se  ze te  de ne me he be pe re

 お こ ご そ  ぞ と  ど の も ほ ぼ ぽ ろ よ を
 オ コ ゴ ソ  ゾ ト  ド ノ モ ホ ボ ポ ロ ヨ ヲ
  o ko go so  zo to  do no mo ho bo po ro yo wo

(the top characters are hiragana characters [used for native words]
and the lower ones are katakana characters [used for foriegn words])

There are also combinants that use a consonant plus 'ya' 'yu' or 'yo',
therefore coming out as 'kya'(きゃ), 'kyu'(きゅ), 'kyo'(きょ), etc.
(the 's' row comes out a little differently, 'sha' 'shu' 'sho', since
that's the way it sounds to Western ears) Lastly, there is a doubled
consonant sound that is symbolized by a small version of the character
'tsu'(つ) that is entered by simply typing the doubled consonant. An
example is the Japanization of the english word 'apple' which comes
out 'appuru'(アップル).

Egg uses C-\ to switch in and out of 'its:' mode (shown by a character
inside the [--] on the modeline), where the its: maps
that are loaded control which grouping of keys produce which
character. The default its: map is hiragana ([あ]), followed by
katakana ([ア]), zenkaku lowercase ([a]), and zenkaku upercase
([A]). The zenkaku are mappings to the full-width roman characters. Once
in its: mode, entering text will put you into 'fence' submode ([漢]),
where vertical bars appear around the characters you are currently
entering. Inside fence mode, M-C-k will switch to katakana entry,
M-C-h switches to hiragana, M-z switches to zenkaku (full-width)
lowercase and M-Z switches to zenkaku uppercase. Spacebar will send
the contents of the fence to the jserver process for lookup in the
dictionary, hitting it again will send it again (getting the next
lookup, if there is one) and return accepts the entry and takes you
out of fence. I am currently working on extending the functionality to
allow user overides of 'word' breakage, as well a mousable mode line
menu and finding the source of the damn problem with deleting
characters in fence mode (THAT is new and XEmacs specific... I wonder
where it's comming from)

(btw: there are its: maps for hangul (Korean) pinyin & zhuyin (Chinese) as
well, but I've not played with them)

Hope this helps some.

    Steven> I don't know much of anything about how these input
    Steven> methods work, so *any* English documentation would be
    Steven> helpful.  It does not have to be elaborate, since a real
    Steven> user would be able to read the documentation as it exists.

I'll try and write up some stuff on input methods in general (covering
the differences between XEmacs/Mule specific and XIM based stuff) here
in about a month.

p.s. Lemme know if the Japanese chars get bolluxed. This is the first
time I've tried to use XEmacs to send mail...

--Jareth

-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links