From: Karl Fogel <kfogel@red-bean.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-devel@gnu.org
Subject: Re: Building intermediate Chinese language romanization alists
Date: Tue, 15 Jan 2019 18:09:50 -0600 [thread overview]
Message-ID: <87a7k1799t.fsf@red-bean.com> (raw)
In-Reply-To: <87h8e94o10.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 15 Jan 2019 13:19:23 -0800")
Eric Abrahamsen <eric@ericabrahamsen.net> 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
next prev parent reply other threads:[~2019-01-16 0:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 21:19 Building intermediate Chinese language romanization alists Eric Abrahamsen
2019-01-16 0:09 ` Karl Fogel [this message]
2019-01-16 0:26 ` Eric Abrahamsen
2019-01-16 0:23 ` Karl Fogel
2019-01-16 0:29 ` Eric Abrahamsen
2019-01-18 0:34 ` Karl Fogel
2019-01-20 6:01 ` Feng Shu
2019-01-27 5:50 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7k1799t.fsf@red-bean.com \
--to=kfogel@red-bean.com \
--cc=emacs-devel@gnu.org \
--cc=eric@ericabrahamsen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).