This section describes the features in the New QuanPin and New ShuangPin input methods, and how to use some of the features in the zh
and zh.GBK locales.
PinYin is a popular input method in PRC, and there are various PinYin-based input methods. Two of them, New QuanPin and New ShuangPin, contain the following features:
Supports user-defined phrases for later use.
Dynamically adjusts the frequency of candidates.
Accepts PinYin strings up to 222 characters long.
Supports input by ShengMu.
Supports GBK Chinese.
These features are described in detail in the following sections.
The following example shows how to define the phrase "ke lin dun" and store it for later use.
Type the phrase kelindun without spaces.
The New QuanPin and New ShuangPin input methods will insert spaces for you automatically.
Type the number representing the first character you want to select.
The following example shows the second character selected.
Select Chinese for the second and third parts of the phrase.
The new phrase is defined and added to the user dictionary file. The next time you type ke lin dun, you will see the phrase you defined in the candidate area.
In these input methods, candidates that have been selected are moved to the start of the list to facilitate repeated use.
Type sh yi.
Notice the order of the five available candidates.
Select the fifth candidate.
Type sh yi again.
Notice that the fifth candidate has moved to the first position because you previously selected it. Frequently-used candidates are promoted for faster selection.
The New QuanPin input methods accepts PinYin strings up to 222 characters long. The following illustrations use the string below:
>>meiguozhongtongkelindunzhengzaitaolunhaiwanjushiwenti<< |
The result is the following Chinese string:
The New ShuangPin input method supports up to 30-character strings.
You can also type ShengMu only. Candidates are supplied for ShengMu, as shown in the following illustrations:
The zh.GBK locale supports GBK by default, as shown in the following illustrations:
The second Chinese character in the following illustration is defined only in the GBK standard.
Single GBK candidates are placed at the end of the list of candidates. Press Return to scroll to the GBK area. For easier selection next time, you can define the GBK candidate as a phrase (for more information, see "Defining Phrases for Later Use"). Once a phrase is defined, you can insert it easily, as shown in the following illustrations:
Both New QuanPin and New ShuangPin support GBK Hanzi by default in the zh.GBK locale. However, because several Hanzi have the same ShengMu (the first part of Pinyin), New QuanPin and New ShuangPin do not display GBK candidates if you provide only the ShengMu.
For example, typing the string rong will display GBK candidates because it is a complete Pinyin string. However, typing r alone will not display any GBK candidates because it is only a ShengMu.
The following table shows the definitions of the edit keys.
The preedit line is a normal X text field.
Key |
Definition |
---|---|
[a-z] |
PinYin character |
Home |
Moves to the start of the preedit line |
End |
Moves to the end of the preedit line |
Left |
Moves the caret in the preedit line to the left. If left is Hanzi, the original PinYin is recovered. |
Right |
Moves the caret in the preedit line to the right. |
Delete |
Deletes the PinYin character following the caret on the preedit line. |
Backspace |
Deletes the PinYin character preceding the caret on the preedit line. |
The candidates of a Pinyin string belong to the following groups:
G1 - Highest frequency Hanzi + Long (3 or more) Cizu + Double Chinese Cizu
G2 - GB Single Hanzi
G3 - GBK Single Hanzi (in the zh.GBK locale)
Some Pinyin strings may have more candidates than can be displayed in the same window. In that case, use the keys described in the following table to scroll through the candidates.
Table 4-3 Page Scroll Key Definitions
Key |
Definition |
---|---|
- = |
Scrolls to previous/next candidate(s) |
[ ] |
Scrolls to previous/next candidate(s) |
, . |
Scrolls to previous/next candidate(s) |
Return |
Quickly scrolls through all candidates |
New QuanPin and New ShuangPin do not support selection by typing letter keys. If you see candidates prefixed with letter keys (A, B, C, and so on), set htt again using the numeric selection keys.
In accord with the national Pinyin standard, the separator (') is supported to avoid ambiguous interpretations of Pinyin strings. For example, the Pinyin string [jiang] can be interpreted as [jiang] or [ji][ang]; both are valid. In New QuanPin, however, [jiang] is interpreted only as [jiang]. You must use the separator and enter [ji'ang] for it to be interpreted as [ji] and [ang]. New ShuangPin does not require the use of separators.
New QuanPin and New ShuangPin share two dictionary files: PyCiku.dat and Ud.Ciku.dat. In the zh locale, the default path names are /usr/openwin/lib/locale/zh/xim/data/PyCiku.dat and /usr/openwin/lib/locale/zh/xim/data/UdCiku.dat. In the zh.GBK locale, the default path names are /usr/openwin/lib/locale/zh.GBK/xim/data/PyCiku.dat and /usr/openwin/lib/locale/zh.GBK/xim/data/UdCiku.dat.
Users cannot normally write to these files. However, since users can affect the way New QuanPin and New ShuangPin work through features such as frequency adjustment and user-defined phrases, it is necessary to update the dictionary files frequently.
A user's dictionary is normally located in ~/.Xlocale/PyCiku.dat or ~/.Xlocale/UdCiku.dat (~ indicates the home directory of the user who starts the htt command). When New QuanPin and New ShuangPin are started, they locate and read the dictionary files in the user's home directory. If a dictionary file is not found, the system default path is used (that is, /usr/openwin/lib/locale/...).
ShuangPin is an abbreviated form of QuanPin. It is faster but more difficult to use than QuanPin. New ShuangPin supports all of the features, keyboard definitions, and dictionary files of New QuanPin.
There are various ShuangPin keyboard mapping designs in PRC. The most popular three are ZiRanMa, Chinese Star, and Intelligent_ABC. The New ShuangPin input method supports all three of these keyboard mappings. The default keyboard mapping is located in one of the following files:
/usr/openwin/lib/locale/zh.GBK/xim/IM.prop (for the zh.GBK locale)
/usr/openwin/lib/locale/zh/xim/IM.prop (for the zh locale)
~/.Xlocale/IM.prop
The following tables contain keyboard mappings for the ZiRanMa, Chinese Star, and Intelligent_ABC keyboards.
Table 4-4 ZiRanMa Keyboard Mapping
Key |
Definition |
---|---|
i |
ch |
u |
sh |
v |
zh |
A |
a |
B |
ou |
C |
iao |
D |
uang, iang |
E |
e |
F |
en |
G |
eng |
H |
ang |
I |
i |
J |
an |
K |
ao |
L |
ai |
M |
ian |
N |
in |
O |
o, uo |
P |
un |
Q |
iu |
R |
uan, er |
S |
iong, ong |
T |
ue |
U |
u |
V |
v, ui |
W |
ua, ia |
X |
ie |
Y |
uai, ing |
Z |
ei |
Table 4-5 CStar2.97 Keyboard Mapping
Key |
Definition |
---|---|
u |
ch |
i |
sh |
v |
zh |
A |
a |
B |
ia, ua |
C |
uan |
D |
ao |
E |
e |
F |
an |
G |
ang |
H |
iang, uang |
I |
i |
J |
ian |
K |
iao |
L |
in |
M |
ie |
N |
iu |
O |
o, uo |
P |
ou |
Q |
er, ing |
R |
en |
S |
ai |
T |
eng |
U |
u |
V |
v, ui |
W |
ei |
X |
uai, ue |
Y |
iong, ong |
Z |
un |
Table 4-6 Intelligent ABC Keyboard Mapping
Key |
Definition |
---|---|
i |
ch |
u |
sh |
v |
zh |
A |
a |
B |
ou |
C |
in, uai |
D |
ua, ia |
E |
e |
F |
en |
G |
eng |
H |
ang |
I |
i |
J |
an |
K |
ao |
L |
ai |
M |
ue, ui |
N |
un |
O |
o, uo |
P |
uan |
Q |
ei |
R |
iu, er |
S |
ong, iong |
T |
uang, iang |
U |
u |
V |
v |
W |
ian |
X |
ie |
Y |
ing |
Z |
iao |