emacs-devel
[Top][All Lists]
Advanced

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

Re: Building intermediate Chinese language romanization alists


From: Karl Fogel
Subject: Re: Building intermediate Chinese language romanization alists
Date: Tue, 15 Jan 2019 18:09:50 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eric Abrahamsen <address@hidden> writes:
>I might be able to get the map back out of quail somehow, but since this
>seems to be something that more than a few people would like access to,
>I wonder if it would be acceptable to add an intermediary step, creating
>(for instance) a defconst called `pinyin-map-alist' that holds the
>contents of pinyin.map, and then changing the `quail-define-rules' call
>to:

I think I've done the reverse-mapping you want.  In my .emacs 
(http://svn.red-bean.com/repos/kfogel/trunk/.emacs), start at the function 
`kf-pinyin-from-char'.  See also the code to build `kf-quail-inverted-map' 
right above it.

I'm happy to answer any questions, of course.

Best regards and 新年快乐,
-Karl

>(apply #'quail-define-rules pinyin-map-alist)
>
>The input method wouldn't be affected, but we'd have access to the
>mapping via the constant, which would be very useful.
>
>Pinyin would be the most useful romanization method to do this for, but
>it looks like the CTLau and possibly ziranma methods might benefit from
>similar treatment.
>
>(Another issue is that if the constant is written into PY.el, which
>isn't a library, it might be a bit difficult to get out again, but
>perhaps the defconst could be appended to one
>of./lisp/language/{chinese.el,china-util.el}. Or PY.el could be made a
>library.)
>
>I'm not entirely familiar with the language-related build process, but I
>hope there might be an appropriate stage at which to hang the alist on a
>variable name.
>
>Thanks,
>Eric
>
>[1]: https://github.com/tumashu/pyim/blob/master/pyim-pymap.el



reply via email to

[Prev in Thread] Current Thread [Next in Thread]