From: luy@cayley.math.rpi.edu (Ya Yan Lu ~{B=QEQT~})
Subject: faster PinYin Chinese input method
Organization: Rensselaer Polytechnic Institute, Troy NY
Date: Mon, 17 Aug 1992 02:37:23 GMT


Many of us are really tired of typing 1,2,3,4,5 (or other letters like in
CWP) for the tones of pinyin. I have a method to aviod this trouble 
by mapping the second letter of a slightly modified pinyin scheme and the
tones to ONE letter. Therefore, I can save the trouble of tones but still
keep the information. 

First, I want to make the second letter of the pinyin of any Chinese 
character be one of the five: a,e,i,o,u.  We do the following:
	1. zh ==> Z, ch ==> C, sh ==> S
	2. add v infront of pinyins starting with a, e, o (nothing
	starts with i, u).  For example:  an ==> van
	The letter v has no role in standard pinyin, we add it here
	to aviod some confusion. That is one small drawback 
	consedering the fact that you can save the tones later.

Second, we want to map the 25 combinations: a, e, i, o, u + 1, 2, 3, 4, 5
tones into 25 letters. The important thing is we do not want to 
remember yet another stupid table! Because if you do not mind to remember
some stable, then you can use other short hand schemes for pinyin such as
the one used in CCDOS. But very fewo of us arewilling to spend the time
and remeber the table. So we want this mapping very natrual and has 
nothing to remember. I tell you that the following table is SIMPLE:

        Tones:     1     2     3     4     5
        -------------------------------------
          a    ==> 1     q     a     z     A
          e    ==> 3     e     d     c     E
          i    ==> 9     i     j     n     I
          o    ==> 0     o     k     m     O
          u    ==> 8     u     h     b     U

	Now why this is easy to remember (or you do not need to remember)?
The answer is: it may not be unless your keyboard is standard. Look at your
standard keyboard for the letter "a". The column that a belongs to is:
(1,q,a,z). These four letters are on the left side, 1 is on the top, q is
the next row, a is the third row and z is the last row. So natrually, 
we use "a" to represent "a + tone 3", "q" to represent "a + tone 2" and the
rest is quite obvious. For the 5-th tone, since the number of characters
is small, so we do not mind type "SHIFT" to use "A" to represent "a + tone
5".  This is for the letter "a", there is no difference for e,i,o,u. 
Of course, you will notice that the columns for a and e are tilted toward
right, while the columns for u,i,o are tilted toward left. Look at your
keyboard. 

	So lets have some examples: 
	lu4 ya3 yan2 ==> lb ya yqn 
	zhong1 guo2  ==> Z0ng guo
	an1 hui1     ==> v1n h8i

	Well, it certain looks ugly, but who cares if the chinese
characters jump to your screen. 

	If you are interested in the above scheme, and you are using 
cxterm on your workstation, then can build a new input method by modifying
the TONEPY.tit file. I have the following silly shell script to do the 
transformation. It will creat the file LUYY.tit and the rest is up to 
you to finger out. 

	Good luck!
				ya yan 


#!/bin/sh
#	
#	First get the dictionary from TONEPY.tit
#
awk '{
	n=length($1)
	t=substr($1,n,1)
	if ( t == "1" || t == "2" || t == "3" || t == "4" || t == "5")
		print $0
}'   TONEPY.tit > TMP1.tit

#
#	We first map ch -> C, sh -> S, zh -> Z
#
sed s/ch/C/g TMP1.tit  > TMP.tit
sed s/sh/S/g TMP.tit > TMP1.tit
sed s/zh/Z/g TMP1.tit > TMP.tit

#
#	Next we add v in front of pinyin starting with a, e, o
#	(no pinyin starts with the letters i, u)
#
awk  '{
	h=substr($1,1,1)
	if (h == "a" || h == "e" || h == "o") 
		printf "%s\t%s\n", "v" $1, $2
        else
		print $0
}'  TMP.tit > TMP1.tit

#
#	Now, map second letter (a,e,i,o,u) and tone into one letter
#	a --> 1,q,a,z,A		1 == a + tone 1, A == a + tone 5, etc
#	e --> 3,e,d,c,E
#	i --> 9,i,j,n,I
#	o --> 0,o,k,m,O
#	u --> 8,u,h,b,U
awk '{
   if ( length($2) != 0 ) {	
	n=length($1)
	scnd=substr($1,2,1)
	tail=substr($1,n,1)
	if ( scnd == "a" && tail =="1") out="1"
	if ( scnd == "a" && tail =="2") out="q"
	if ( scnd == "a" && tail =="3") out="a"
	if ( scnd == "a" && tail =="4") out="z"
	if ( scnd == "a" && tail =="5") out="A"
	if ( scnd == "e" && tail =="1") out="3"
	if ( scnd == "e" && tail =="2") out="e"
	if ( scnd == "e" && tail =="3") out="d"
	if ( scnd == "e" && tail =="4") out="c"
	if ( scnd == "e" && tail =="5") out="E"
	if ( scnd == "i" && tail =="1") out="9"
	if ( scnd == "i" && tail =="2") out="i"
	if ( scnd == "i" && tail =="3") out="j"
	if ( scnd == "i" && tail =="4") out="n"
	if ( scnd == "i" && tail =="5") out="I"
	if ( scnd == "o" && tail =="1") out="0"
	if ( scnd == "o" && tail =="2") out="o"
	if ( scnd == "o" && tail =="3") out="k"
	if ( scnd == "o" && tail =="4") out="m"
	if ( scnd == "o" && tail =="5") out="O"
	if ( scnd == "u" && tail =="1") out="8"
	if ( scnd == "u" && tail =="2") out="u"
	if ( scnd == "u" && tail =="3") out="h"
	if ( scnd == "u" && tail =="4") out="b"
	if ( scnd == "u" && tail =="5") out="U"
	if ( scnd == "a" || scnd =="e" || scnd =="i" || scnd == "o" || scnd == "u" )
		printf "%s\t%s\n",substr($1,1,1) out substr($1,3,n-3), $2
	else 
		printf "%s\t%s\n", $1, $2
	}
}'   TMP1.tit > TMP.tit

#
#   sort the directionary
#
sort < TMP.tit > TMP1.tit

#
#	Change the VALIDINPUTKEY line of TONEPY.tit
#

awk '{
	n=length($1)
	t=substr($1,n,1)
	if ( t != "1" && t != "2" && t != "3" && t != "4" && t != "5"){
	if ( $1 == "VALIDINPUTKEY:" )
	printf "%s\t%s\n", $1, "01234589:ACEIOSUZabcdefghijklmnopqrstuvwxyz"
	else
	print $0
	}
}'   TONEPY.tit > LUYY.tit

#
#
#
cat TMP1.tit >> LUYY.tit
rm TMP1.tit TMP.tit




      



-- 
*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*
Ya Yan Lu   Phone:(518)276-2677   Fax:(518)276-4824   E-mail:luy@rpi.edu
~{B=QEQT~}  Dept of Mathematical Sciences,  Rensselaer Polytechnic Institute
*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*
Newsgroups: alt.chinese.text