[Top][All Lists]

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

Re: Building intermediate Chinese language romanization alists

From: Eric Abrahamsen
Subject: Re: Building intermediate Chinese language romanization alists
Date: Tue, 15 Jan 2019 16:29:09 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Karl Fogel <address@hidden> writes:

>>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
>>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.
> Ah, I meant to preface that response with "I don't know if this is useful to 
> your purposes, but... [etc]"
> Basically I was just saying "Yes, you can get the map back out of quail", by 
> providing you an existence proof :-).  
> I totally agree with you that it would be better for Emacs to offer
> the bidirectional mapping by default. I don't know enough to comment
> on whether your proposed method is a good way to do this. (I wrote
> that inversion code in 2004, and although I use it often, I haven't
> had to hack on it since then or explore quail mappings further.)

My proposal would create a pinyin-to-character alist, that's all. If you
wanted character-to-pinyin you'd still have to reverse that, but it
would still be quite a bit simpler than pulling open the quail-map yourself!

reply via email to

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