0
|
1 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
3 ┃ Chapter 5 ENVIRONMENT SETUP ┃
|
|
4 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
5 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
6
|
|
7
|
|
8 ┏━━━━━━━━┓
|
|
9 ┃ 5.1 OVERVIEW ┃
|
|
10 ┗━━━━━━━━┛
|
|
11
|
|
12 All the user input environments and operation environments in cWnn are defined in
|
|
13 the system environment files. The system supports various input methods. Through the
|
|
14 environment setup, users are able to set their own environments.
|
|
15 The setup of an environment includes the following :
|
|
16
|
|
17 1. cserverrc ─ The initialization file for the server.
|
|
18 2. uumrc ─ The initialization file for the front-end processor "cuum".
|
|
19 3. wnnenvrc ─ The environment setup file for forward conversions.
|
|
20 4. wnnenvrc_R ─ The environment setup file for reverse conversions.
|
|
21 5. uumkey ─ The keyboard definition file for the front-end processor.
|
|
22 6. cvt_key_tbl ─ The conversion file for keyboard input code
|
|
23
|
|
24
|
|
25 We will now explain how an environment may be set, and how its parameter values
|
|
26 may be updated manually.
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50 - 5-1 -
|
|
51 ┏━━━━━━━━━━━━━━━━━━━┓
|
|
52 ┃ 5.2 ENVIRONMENT OPERATION FUNCTIONS ┃
|
|
53 ┗━━━━━━━━━━━━━━━━━━━┛
|
|
54
|
|
55 The cserver manages several resources such as dictionaries and grammar files.
|
|
56 Besides, it creates individual environments for every user (client). A user may have
|
|
57 more than one environment. In each input mode, the environment defines its own
|
|
58 dictionaries, the corresponding usage frequency files and the grammar files.
|
|
59
|
|
60 When a user starts up cuum (front-end processor), cserver will set the specified
|
|
61 dictionaries for the user while creating the environment. After setup, the user is able
|
|
62 to obtain the usage status of the dictionaries in his environment from the system at any
|
|
63 time.
|
|
64
|
|
65 The followings are the operation functions available in every environment. The
|
|
66 user may update his environment by using these functions. For example, he may need to
|
|
67 add another dictionary, or need to change the values for certain conversion parameter.
|
|
68
|
|
69
|
|
70 1. Environment Operation
|
|
71 ━━━━━━━━━━━━
|
|
72 When function key PF6 (OR 前面キ- together with 呼出し key) is pressed, the following
|
|
73 menu will be displayed. Move the cursor to the particular option and press the return
|
|
74 key. The corresponding function will then be carried out.
|
|
75
|
|
76 ┌────────────────────────────────┐
|
|
77 │ 0.词典追加 1.词典一览 2.登录 3.检索 4.参数变更 5.频度保存 ....│
|
|
78 └────────────────────────────────┘
|
|
79
|
|
80 0.词典追加 (Add dictionary) : To add a dictionary to the current environment
|
|
81 1.词典一览 (View dictionary) : To view all the dictionaries in the current
|
|
82 environment, as well as their current states.
|
|
83 2.登录 (Word/Character add) : To add a word into a dynamic dictionary.
|
|
84 3.检索 (Word/Character search) : To check if a word/character exists in the
|
|
85 dictionary under the current environment. If it
|
|
86 exists, the system will show the information of
|
|
87 the word/character.
|
|
88 4.参数变更 (Parameter update) : To enquire or change the parameters for the
|
|
89 Pinyin-Hanzi conversion under the current
|
|
90 environment. Different environments will have
|
|
91 different parameters. (Refer to (4). below)
|
|
92 5.频度保存 : Save all the usage frequency files under the
|
|
93 (Save usage frequency) current environment.
|
|
94 6.词典情报 : To inquire the information of the dictionaries
|
|
95 (Dictionary information) under the current environment. For example the
|
|
96 dictionary name, type and priority etc.
|
|
97 7.文法变更 (Grammar change) : To change the grammar file used in the environment.
|
|
98 8.结束 (Exit) : To exit the environment operation function.
|
|
99
|
|
100 - 5-2 -
|
|
101 NOTE:
|
|
102 - PF6 is the default keyboard definition in cWnn, it may be redefined.
|
|
103 - Another way to activate this menu is by pressing the <前面キ-> together
|
|
104 with the <呼出し> key.
|
|
105 - These keys follow the keyboard layout given in Section 3.4.
|
|
106
|
|
107
|
|
108 2. How to Use the Environment Operations
|
|
109 ━━━━━━━━━━━━━━━━━━━━
|
|
110 We will now explain how to use each of the above environment operations. Every
|
|
111 instruction will be given in steps.
|
|
112
|
|
113 NOTE:
|
|
114 - Press the return key after each step.
|
|
115 - To quit, press 前面キ- together with the ↓arrow key.
|
|
116
|
|
117
|
|
118 (0).词典追加 (Add dictionary)
|
|
119 This enables user to add a dictionary after the front-end processor has been
|
|
120 started.
|
|
121 (a). First, select the option 0.词典追加, after which, enter the dictionary
|
|
122 name. If the name of the dictionary is in ASCII, simply change the input
|
|
123 mode to "半角".
|
|
124 (b). A message "新的词典 >" will be displayed. Enter the dictionary name.
|
|
125 (c). Another message "频度文件名 >" is displayed. This is the usage frequency
|
|
126 file that is automatically created. If you do not want the given default
|
|
127 name, you may change it.
|
|
128 (d). A message "请指定词典的优先度的数字。> 5 " will be displayed next. "5" is
|
|
129 the default priority value given to the dictionary. You may also change
|
|
130 this value.
|
|
131 (e). The next message displayed is "使用词典更新模式吗? (Y or Newline / N)".
|
|
132 This is to determine whether the dictionary may or may not be updated.
|
|
133 (f). If the dictionary to be added can be updated, answer with a "Y" to the
|
|
134 above question and the dictionary will be created. Follows this is a
|
|
135 message: "字典文件 "dict_name" 没有。创建?(Y/N)". You may now answer
|
|
136 the questions respectively.
|
|
137 (g). If you have answered with a "N" to the message in (e), and the specified
|
|
138 dictionary does not exist, a message will be displayed:
|
|
139 "文件不存在。 (怎么办)".
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148
|
|
149
|
|
150 - 5-3 -
|
|
151 (1).词典一览 (View dictionary)
|
|
152 This enables user to browse through the current dictionaries that are being
|
|
153 used.
|
|
154 (a). First, select the option 1.词典一览, after which, use the up and down
|
|
155 arrow keys to view the dictionaries.
|
|
156
|
|
157 NOTE: You may delete the usage of a dictionary by using ^D, or remove
|
|
158 the dictionary temporary by using ^U.
|
|
159 For example, to delete a dictionary "level_2.dic".
|
|
160 - select option 1.词典一览, and the dictionary information will be
|
|
161 given as "sys/level_2.dic(usr/aty/level_2.h) 使用中 1/4".
|
|
162 - You may press ^D to remove it. This dictionary will be removed.
|
|
163 However, when the user terminate "cuum" and re-start again, the
|
|
164 dictionary will be restored.
|
|
165 - If you need to reuse the dictionary without terminating "cuum",
|
|
166 you may use ^U to remove the dictionary temporarily. In this
|
|
167 case, a message "字典「sys/level_2.dic」的使用中止。(Y/N)" will
|
|
168 be displayed. Answer "Y".
|
|
169 To restore the dictionary, select 1.词典一览 again, and you will
|
|
170 see the information of the dictionary as:
|
|
171 "sys/level_2.dic(usr/aty/level_2.h) 中断中 2/4". Now, press ^U
|
|
172 again to restore, and a message will be displayed:
|
|
173 "字典「sys/level_2.dic」重新使用。(Y/N)". Answer "Y".
|
|
174
|
|
175
|
|
176
|
|
177
|
|
178
|
|
179
|
|
180
|
|
181
|
|
182
|
|
183
|
|
184
|
|
185
|
|
186
|
|
187
|
|
188
|
|
189
|
|
190
|
|
191
|
|
192
|
|
193
|
|
194
|
|
195
|
|
196
|
|
197
|
|
198
|
|
199
|
|
200 - 5-4 -
|
|
201 (2).登录 (Word/Character add)
|
|
202 This enables user to register a word into a dictionary. This dictionary must
|
|
203 be dynamic (can be updated).
|
|
204 (a). First, select the option 2.登录.
|
|
205 (b). A message "登录开始:" will be displayed. Enter the word that you want to
|
|
206 register.
|
|
207 (c). Bring the cursor to the beginning of the word. Press the return key.
|
|
208 (d). A message "登录结束:" will be displayed. Bring the cursor to the end of
|
|
209 the word, press the return key.
|
|
210 (e). Another message "读法:" will be displayed. You may now enter the
|
|
211 pronunciation of the word. It may be input using different input modes.
|
|
212 For example, if you want it to be in Pinyin, change the input mode to 全拼,
|
|
213 and input the Pinyin. If you want it to be in ASCII, simply change the
|
|
214 mode to 半角.
|
|
215 (f). You will now see a list of grammatical attributes (词性) which may describe
|
|
216 the word. They include: 名词, 动词, 形容词, 数词, .... etc. Choose the
|
|
217 most appropriate attirbute.
|
|
218 (g). Another list of attirbutes is displayed, such as 普通名词, 抽象名, 时间名,
|
|
219 处所名 ..etc. Again, choose the most appropriate one.
|
|
220 (h). Following this is another list. Choose the most appropriate attribute.
|
|
221 (i). You will now see a list of dictionary. You may choose to register the
|
|
222 word in any dictionary. These are the dictionaries that may be updated.
|
|
223 (j). A message "注释:" is displayed. You may enter any comments if you wish.
|
|
224 (k). If the pronunciation entered is empty, a message "读音的长度是0。(怎么办)"
|
|
225 is displayed. You may re-enter the pronunciation of the word.
|
|
226
|
|
227 NOTE:
|
|
228 - Another way to activate 登录 is to press 前面キ- together with the
|
|
229 消去 key.
|
|
230
|
|
231 (3). 检索 (Word/Character search)
|
|
232 This enables user to check whether a word is registered in the dictionary. If
|
|
233 this word exists, all the information of this word will be shown.
|
|
234 (a). First, select the option 3.检索.
|
|
235 (b). A message "读取:" is displayed. Enter the pronunciation of the word.
|
|
236 It may be input via Pinyin, ASCII etc by using the different input modes.
|
|
237 (c). The information of the word is shown. For example, the word 好.
|
|
238 好 (sys/level_1.dic:1195) 0 ( 305) 普通形容 1/23
|
|
239
|
|
240 "sys/level_1.dic" ─ the dictionary name
|
|
241 "1195" ─ the serial number of this word in the dictionary
|
|
242 "0" ─ the user usage frequency value
|
|
243 "305" ─ the system usage frequency value
|
|
244 "普通形容" ─ the grammatical attribute
|
|
245 "1/23" ─ there are 23 words that have the same
|
|
246 pronunciation as what has been input. This is
|
|
247 the first candidate.
|
|
248
|
|
249
|
|
250 - 5-5 -
|
|
251 NOTE:
|
|
252 Another way to view the information of a word or character is to use
|
|
253 the ^V command. For example,
|
|
254 - input a character 好 using Pinyin.
|
|
255 - press ^V now, and the information of this character will be shown.
|
|
256
|
|
257
|
|
258 (4). 参数变更 (Parameter Update)
|
|
259 This allows user to change the values of the parameters. In Section 4.4, the
|
|
260 default parameter values are given. These values may be updated by using the
|
|
261 function provided.
|
|
262 (a). Select the option 4.参数变更, a menu will be displayed as shown:
|
|
263 ┌────────────────────────────────┐
|
|
264 │ 0.解析词组个数[n] 1.词组中词的最大个数[n] 2.频度权值[n] . . . │
|
|
265 └────────────────────────────────┘
|
|
266 These are the assessment parameters for multi-phrase conversion mentioned
|
|
267 in Section 4.4. The number in the square bracket indicates the current
|
|
268 parameter value. To change the value, simply move the cursor to the
|
|
269 parameter and press return, then enter the new parameter value.
|
|
270
|
|
271 (b). To change the value of the parameter, move the cursor to the parameter by
|
|
272 using the arrow keys, and press the return key.
|
|
273 (c). The current value will be given. You may now enter the new value.
|
|
274
|
|
275 As mentioned, input at the input line is not only restricted to Pinyin. Other
|
|
276 characters are also allowed. For example, numbers, alphabets, symbols and
|
|
277 parentheses. These characters will undergo conversion together with the Pinyin
|
|
278 input. Just like Pinyin, these characters have parameters which can be defined
|
|
279 externally. The parameters are classified into the following categories.
|
|
280
|
|
281 * Usage frequency for numerals
|
|
282 This includes 0,1,2,3,4,5,6,7,8,9. Besides, the system has the
|
|
283 facility to change the numbers into other format. For example,
|
|
284 "1234567" can be changed to 1,234,567, 一百二十三万四千五百六十七
|
|
285 and 1234567 etc.
|
|
286 * Usage frequency for alphabets
|
|
287 * Usage frequency for punctuations
|
|
288 * Usage frequency for open parentheses
|
|
289 * Usage frequency for close parentheses
|
|
290
|
|
291 The default values for these parameters are given in Section 4.4.
|
|
292
|
|
293
|
|
294 (5). 频度保存 (Save usage frequency)
|
|
295 This allows user to save all the user usage frequency under the current
|
|
296 environment.
|
|
297 (a). Select the option 5.频度保存.
|
|
298 (b). A message "现在、字典的频度和用户字典正在保存。" will be displayed to
|
|
299 indicate that the frequency is saved.
|
|
300 - 5-6 -
|
|
301 (6). 词典情报 (Dictionary information)
|
|
302 This allows user to view the information of the current dictionaries.
|
|
303 (a). Select the option 6.词典情报. Information about the dictionary will
|
|
304 be shown. For example,
|
|
305 5 拼音 sys/basic.dic usr/aty/basic.h 10004 7 No Yes 使用中 1/8
|
|
306
|
|
307 "5" ─ the dictionary number
|
|
308 "拼音" ─ the dictionary type
|
|
309 " " ─ the comments (omitted here)
|
|
310 "sys/basic.dic" ─ the dictionary filename
|
|
311 "usr/aty/basic.h" ─ the usage frequency file name
|
|
312 "10004" ─ the number of tuples (词条) in the dictionary
|
|
313 "7" ─ the dictionary priority
|
|
314 "No" ─ to indicate whether the dictionary is dynamic
|
|
315 "Yes" ─ to indicate whether the usage frequency may be
|
|
316 updated
|
|
317 "使用中" ─ to show if the dictionary is used currently
|
|
318 " " ─ the password during registration (omitted)
|
|
319 " " ─ the password during usage frequency update (omitted)
|
|
320 "1/8" ─ the current total number of dictionaries
|
|
321 (b). Use the arrow keys to view.
|
|
322
|
|
323
|
|
324 (7). 文法变更 (Grammar change)
|
|
325 This enables user to change the grammar file used in the environment.
|
|
326 (a). First, select the option 7.文法变更, after which, enter the grammar file
|
|
327 name. If the name of the file is in ASCII, simply change the input mode
|
|
328 to "半角".
|
|
329 (b). A message "文法文件名 >" will be displayed. Enter the grammar file name.
|
|
330 If the file does not exist, a message "文件不存在。 (怎么办)" will be
|
|
331 displayed.
|
|
332
|
|
333
|
|
334 (8). 文字消除 (Word/Character delete)
|
|
335 This enables user to delete a word or character from the dictionary. However
|
|
336 word/character can only be deleted from dynamic dictionaries.
|
|
337 (a). First, select the option 3.检索, after which, search for the character
|
|
338 as in (3). For example the character 好.
|
|
339 (b). After the word is found, press ^D to delete the word permanently, or
|
|
340 press ^U to delete it temporarily.
|
|
341 (c). If ^D is used, a message "「好」消除。(Y/N)" is displayed. Enter "Y" to
|
|
342 confirm or "N" to cancel.
|
|
343 If the word is found in a static dictionary, it cannot be deleted, hence
|
|
344 a message "只读的词典的条目不能消除。(怎么办)" will be displayed.
|
|
345 (d). If ^U is used, a message "「好」的使用中止。(Y/N)" is displayed. Enter
|
|
346 "Y" to confirm or "N" to cancel.
|
|
347 To re-use the character, repeat (a) and press ^U again. Now a message
|
|
348 "「好」重新使用。(Y/N)" is displayed. Confirm as before.
|
|
349
|
|
350 - 5-7 -
|
|
351 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
352 ┃ 5.3 INITIALIZATION FILE FOR SERVER - cserverrc ┃
|
|
353 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
354
|
|
355 * Description
|
|
356 cserverrc - The cserver initialization file
|
|
357
|
|
358 * Default Path
|
|
359 /usr/local/lib/wnn/zh_CN/cserverrc
|
|
360
|
|
361 * Function
|
|
362 During the startup of cserver (ie. during execution of "cserver" command), the file
|
|
363 "cserverrc" is read. According to the definitions in "cserverrc", the corresponding
|
|
364 initializations are made.
|
|
365
|
|
366 * Content
|
|
367 In "cserverrc", several settings are made. They include the followings:
|
|
368
|
|
369 1. Files that are read during the startup of cserver
|
|
370 There are three categories of file, including the dictionaries, grammar file,
|
|
371 and the usage frequency files. Refer to Chapter 8.
|
|
372
|
|
373 - Format
|
|
374 readfile <cwnn_file>
|
|
375 <cwnn_file> is the name of the file which is read in during cserver startup,
|
|
376 and this file is maintained until the termination of cserver.
|
|
377
|
|
378 2. Maximum client allowed
|
|
379 - Format
|
|
380 max_client <n>
|
|
381 <n> is the maximum number of front-end processors (client) that are allowed
|
|
382 to be connected at any one time. Default value of <n> is 32.
|
|
383
|
|
384 3. Maximum environment
|
|
385 - Format
|
|
386 max_sticky_env <n>
|
|
387 <n> is the maximum number of permanent environments allowed. A permanent
|
|
388 environment remains in the server even after the termination of the front-
|
|
389 end processor. This helps in reducing the startup time of each front-end
|
|
390 processor. Default value of <n> is 10.
|
|
391
|
|
392 4. Path of dictionaries that are maintained by the server.
|
|
393 - Format
|
|
394 jserver_dir <path>
|
|
395 <path> defines the path of the system dictionaries maintained by the server.
|
|
396 Usage frequency files and dictionaries of the user are also maintained here.
|
|
397 If <path> is not given, the default path "/usr/local/lib/wnn/zh_CN/" will
|
|
398 be taken.
|
|
399
|
|
400 - 5-8 -
|
|
401 5. The default parameters values for Pinyin-Hanzi conversions.
|
|
402 - Format
|
|
403 def_param <parameter 0> <parameter 1> <parameter 2>
|
|
404 <parameter 3> <parameter 4> <parameter 5>
|
|
405 <parameter 6> <parameter 7> <parameter 8>
|
|
406 <parameter 9> <parameter 10> <parameter 11>
|
|
407 <parameter 12> <parameter 13> <parameter 14>
|
|
408 <parameter 15> <parameter 16>
|
|
409
|
|
410 <parameter x> are values of parameters. All parameter values are integers.
|
|
411 During conversion, server will perform the conversion evaluation based on
|
|
412 these parameter values. Refer to Section 4.4 for detailed explanations for
|
|
413 each parameter.
|
|
414
|
|
415 <parameter 0> : number of phrase "n" to be assessed
|
|
416 <parameter 1> : number of words "m" in phrase
|
|
417 <parameter 2> : usage frequency weight
|
|
418 <parameter 3> : word length weight
|
|
419 <parameter 4> : tone correctness weight
|
|
420 <parameter 5> : last used weight
|
|
421 <parameter 6> : dictionary priority weight
|
|
422 <parameter 7> : average word assessment value weight
|
|
423 <parameter 8> : phrase length weight
|
|
424 <parameter 9> : number of words in phrase weight
|
|
425 <parameter 10> : weight of numerals
|
|
426 <parameter 11> : weight of alphabets
|
|
427 <parameter 12> : weight of symbols
|
|
428 <parameter 13> : weight of open parentheses
|
|
429 <parameter 14> : weight of close parentheses
|
|
430 <parameter 15> : maximum number of candidates allowed during conversion
|
|
431 <parameter 16> : not used
|
|
432
|
|
433 The following are the default values :
|
|
434 1 5 2 750 10 80 10 5 1000 50 0 -200 0 0 0 16 0
|
|
435
|
|
436 6. Definition of Xuni (quasi) grammatical category (虚拟词性) for alphabets
|
|
437 - Format
|
|
438 set_giji_ascii <char> <char> ...
|
|
439 All words and characters have their own grammatical attributes (词性).
|
|
440 Alphabets, numerals and some defined characters can be classified as Xuni
|
|
441 (虚拟) type in the Pinyin-Hanzi conversion and Hanzi-Pinyin conversion.
|
|
442
|
|
443 <char> can be represented in hexadecimal, decimal, octal as well as
|
|
444 enclosed between single quotation marks.
|
|
445
|
|
446
|
|
447
|
|
448
|
|
449
|
|
450 - 5-9 -
|
|
451 * Example
|
|
452 jserver_dir /usr/local/lib/wnn/zh_CN/dic
|
|
453 readfile sys/basic.dic
|
|
454 readfile sys/level_1.dic
|
|
455 readfile sys/level_2.dic
|
|
456 ;readfile sys/computer.dic
|
|
457 readfile sys/WuBi.dic
|
|
458 readfile sys/QianMa.dic
|
|
459
|
|
460 readfile sys/full.con
|
|
461
|
|
462 max_client 32
|
|
463 max_sticky_env 10
|
|
464
|
|
465 def_param 1 5 2 750 10 80 10 5 1000 50 0 -200 0 0 0 16 0
|
|
466 ; N M 频 长 四 刚 优 值 组 个 数 英 记 开 闭 最 备
|
|
467
|
|
468 ; N: 解析词组个数 变换规模参数
|
|
469 ; M: 词组中词的最大个数
|
|
470
|
|
471 ; 频: 频度权值 词评价参数
|
|
472 ; 长: 词长度权值
|
|
473 ; 四: 四声正确度权值
|
|
474 ; 刚: 刚才用过权值
|
|
475 ; 优: 字典优先级权值
|
|
476
|
|
477 ; 值: 词评价均值权值 词组评价参数
|
|
478 ; 组: 词组长权值
|
|
479 ; 个: 词组中词个数权值
|
|
480
|
|
481 ; 数: 数字的频度 其他参数
|
|
482 ; 英: 英文字母的频度
|
|
483 ; 记: 记号的频度
|
|
484 ; 开: 开括弧的频度
|
|
485 ; 闭: 闭括弧的频度
|
|
486 ; 最: 最大候补个数
|
|
487 ; 备: 备用
|
|
488
|
|
489
|
|
490 * Note
|
|
491 A semicolon ";" at the beginning of the line means that the whole statement
|
|
492 is treated as comment.
|
|
493
|
|
494
|
|
495
|
|
496
|
|
497
|
|
498
|
|
499
|
|
500 - 5-10 -
|
|
501 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
502 ┃ 5.4 INITIALIZATION FILE FOR FRONT-END PROCESSOR - uumrc ┃
|
|
503 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
504
|
|
505 * Description
|
|
506 uumrc - The front-end processor (cuum) initialization file
|
|
507
|
|
508 * Default Paths
|
|
509 /usr/local/lib/wnn/zh_CN/uumrc
|
|
510
|
|
511 * Function
|
|
512 This is the initialization file for the startup of the front-end processor.
|
|
513 It is read in during the execution of "cuum" command. The initialization
|
|
514 includes:
|
|
515 - Specify the path for each of the environment setup files, the keyboard
|
|
516 definition file etc.
|
|
517 - Specify the initial state of the front-end processor after startup.
|
|
518 - Specify the different conversion parameters.
|
|
519
|
|
520 * Content
|
|
521 In "uumrc", several settings are made. They include the followings:
|
|
522
|
|
523 1. include
|
|
524 - Format
|
|
525 include <path>
|
|
526 This is to read in all other initialization files defined in <path>.
|
|
527 This will be used only when additional user definitions are needed.
|
|
528
|
|
529
|
|
530
|
|
531
|
|
532
|
|
533
|
|
534
|
|
535
|
|
536
|
|
537
|
|
538
|
|
539
|
|
540
|
|
541
|
|
542
|
|
543
|
|
544
|
|
545
|
|
546
|
|
547
|
|
548
|
|
549
|
|
550 - 5-11 -
|
|
551 2. setenv
|
|
552 - Format
|
|
553 setenv <env_type> <path> [sticky]
|
|
554 setenv <env_type> <host> <path> [sticky]
|
|
555 This is to set the forward conversion environment, based on the contents in
|
|
556 the environment definition files indicated by <path>.
|
|
557 <host> is the machines hostname. If <host> is given, the server will be
|
|
558 that of the specified hostname, and the environment will be created by
|
|
559 this server.
|
|
560
|
|
561 [sticky] is a flag that implies a permanent environment. If [sticky] is
|
|
562 specified, every time a front-end processor is connected to the cserver, it
|
|
563 will increase by one. The environment created will remain in the cserver
|
|
564 even though the front-end processor has terminated. This environment will
|
|
565 be used during the next startup of front-end processor, hence improving the
|
|
566 speed of startup time. The [ ] means that it may be omitted. If [sticky]
|
|
567 is not specified, the environment created will be deleted from the cserver
|
|
568 after the front-end processor has exited.
|
|
569
|
|
570 <env_type> indicates the environment type. This includes Pinyin/Zhuyin
|
|
571 input and the encoded input environment.
|
|
572 Pinyin/Zhuyin input environment is represented by "PZ". The encoded input
|
|
573 environment corresponds to first alphabet of the respective input method
|
|
574 name. For example, Wubi input environment is represented by "W" and Qianma
|
|
575 input environment is "Q".
|
|
576
|
|
577 - Default Path
|
|
578 /usr/local/lib/wnn/zh_CN/
|
|
579
|
|
580 3. setenv_R
|
|
581 - Format
|
|
582 setenv_R <env_type> <path> [sticky]
|
|
583 setenv_R <env_type> <host> <path> [sticky]
|
|
584 Similar to "2. setenv" above. The only difference is that "setenv_R"
|
|
585 is meant for reverse conversion.
|
|
586 For example, Pinyin-Hanzi conversion is a forward conversion, while the
|
|
587 reverse conversion is Hanzi-Pinyin conversion. The reverse conversion of
|
|
588 Bianma-Hanzi conversion is Hanzi-Bianma conversion.
|
|
589
|
|
590 - Default Path
|
|
591 /usr/local/lib/wnn/zh_CN/
|
|
592
|
|
593
|
|
594
|
|
595
|
|
596
|
|
597
|
|
598
|
|
599
|
|
600 - 5-12 -
|
|
601 4. setuumkey
|
|
602 - Format
|
|
603 setuumkey <path>
|
|
604 To specify the path for keyboard definition file of the front-end processor.
|
|
605 <path> is the path of the keyboard definition file "uumkey". For details
|
|
606 on uumkey, refer to Section 5.7
|
|
607
|
|
608 - Default Path
|
|
609 /usr/local/lib/wnn/zh_CN/uumkey
|
|
610
|
|
611
|
|
612 5. setrkfile
|
|
613 - Format
|
|
614 setrkfile <path>
|
|
615 To specify the input mode definition files.
|
|
616 <path> is the directory of the input mode definition files. All input
|
|
617 modes under this directory will be read. Input mode includes Pinyin
|
|
618 input mode, Zhuyin input mode, Wubi input mode etc.
|
|
619
|
|
620 - Default Path
|
|
621 /usr/local/lib/wnn/zh_CN/rk/mode ─ combination of Pinyin/Zhuyin
|
|
622 input environment
|
|
623 /usr/local/lib/wnn/zh_CN/rk_p/mode ─ Pinyin centred input environment
|
|
624 /usr/local/lib/wnn/zh_CN/rk_z/mode ─ Zhuyin centred input environment
|
|
625
|
|
626 6. setconvkey
|
|
627 - Format
|
|
628 setconvkey [<tty>] <path>
|
|
629 To specify a keyboard to cWnn's default keyboard definition.
|
|
630 The terminal name [<tty>] must correspond to that defined in the environment
|
|
631 variable TERM, else the definitions will be invalid.
|
|
632 The wildcard character "*" may be used in the terminal name.
|
|
633 <path> is the path of this keyboard definition file, which shows the different
|
|
634 key bind between terminals.
|
|
635
|
|
636 - Default Path
|
|
637 /usr/local/lib/wnn/zh_CN/cvt_key_tbl/
|
|
638
|
|
639 7. setdicpath
|
|
640 - Format
|
|
641 setdicpath <path>
|
|
642 To specify the path of the dictionary added dynamically to the system. By
|
|
643 having set this path, any dictionary added during the environment operation
|
|
644 function "Dictionary Add" will be added to this directory.
|
|
645
|
|
646
|
|
647
|
|
648
|
|
649
|
|
650 - 5-13 -
|
|
651 8. setfrepath
|
|
652 - Format
|
|
653 setfreqpath <path>
|
|
654 To specify the path of the usage frequency files when a dictionary is added
|
|
655 dynamically to the system. By having set this path, any dictionary added
|
|
656 during the environment operation function "Dictionary Add" will have its
|
|
657 usage frequency files added in this directory.
|
|
658
|
|
659 9. setgrammarpath
|
|
660 - Format
|
|
661 setgrammarpath <path>
|
|
662 To specify the path of the grammar files when a dictionary is added
|
|
663 dynamically to the system. By having set this path, any dictionary added
|
|
664 during the environment operation function "Dictionary Add" will have its
|
|
665 grammar files added in this directory.
|
|
666
|
|
667 10. not_send_ascii_char
|
|
668 When the input line is empty, and the input is ASCII characters, these
|
|
669 ASCII characters will NOT be sent to the cursor position, but will be sent
|
|
670 to the conversion buffer. (Default)
|
|
671
|
|
672 11. send_ascii_char
|
|
673 When the input line is empty, and the input is ASCII characters, these
|
|
674 ASCII characters will be sent directly to the cursor position, bypassing
|
|
675 the conversion buffer.
|
|
676
|
|
677 12. waking_up_in_convert_mode
|
|
678 To set the conversion mode to ON after the startup of the front-end
|
|
679 processor.
|
|
680
|
|
681 13. waking_up_no_convert_mode
|
|
682 To set the conversion mode to OFF after the startup of the front-end
|
|
683 processor. (Default)
|
|
684
|
|
685 14. setmaxchg <number>
|
|
686 Indicates the maximum number of characters allowed for conversion at one
|
|
687 time. Default value for <number> is 80.
|
|
688
|
|
689 15. setmaxbunsetsu <number>
|
|
690 Indicates the maximum number of words allowed for conversion at one time.
|
|
691 The maximum value is 400 and default value of <number> is 80.
|
|
692
|
|
693 16. setmaxichirankosu <number>
|
|
694 Indicates the number of candidates to be displayed at one time. This will
|
|
695 depend on the width of the screen. Default <number> value is 36.
|
|
696
|
|
697
|
|
698
|
|
699
|
|
700 - 5-14 -
|
|
701 17. setmaxhistory <number>
|
|
702 Indicates the maximum number of entries for the conversion history.
|
|
703 Default <number> value is 10.
|
|
704
|
|
705 18. simple_delete
|
|
706 Once the user input string is mapped to its corresponding standard
|
|
707 Pinyin, the standard Pinyin will be deleted as a single unit instead of
|
|
708 character by character.
|
|
709
|
|
710 19. flow_control_on
|
|
711 To set the flow control of tty to ON. (Default)
|
|
712
|
|
713 20. flow_control_off
|
|
714 To set the flow control of tty to OFF.
|
|
715
|
|
716 21. convkey_not_always_on
|
|
717 When the input mode is set to OFF, all related conversion function keys
|
|
718 are invalid. (Default)
|
|
719
|
|
720 22. convkey_always_on
|
|
721 When the input mode is set to ON, all related conversion function keys
|
|
722 are still valid.
|
|
723
|
|
724 23. remove_cs
|
|
725 To remove cs from termcap.
|
|
726
|
|
727 24. not_remove_cs
|
|
728 Do not remove cs from termcap.
|
|
729
|
|
730 25. touroku_comment
|
|
731 During the addition of a new word, comments are allowed to be input.
|
|
732
|
|
733 26. touroku_no_comment
|
|
734 During the addition of a new word, comments are not allowed to be input.
|
|
735
|
|
736
|
|
737 * During path setting, the following abbreviations can be used :
|
|
738 (1) ~ The value of environment variable HOME.
|
|
739 (2) ~usrname The home directory of the user registered in the password
|
|
740 file.
|
|
741 (3) @HOME The value of environment variable HOME.
|
|
742 (4) @LIBDIR The path "/usr/local/lib/wnn/zh_CN".
|
|
743 (5) @USR The current value of environment variable LOGNAME.
|
|
744
|
|
745
|
|
746
|
|
747
|
|
748
|
|
749
|
|
750 - 5-15 -
|
|
751 * Example
|
|
752 setenv PZ /usr/local/lib/wnn/@LANG/wnnenvrc
|
|
753 setenv_R PZ /usr/local/lib/wnn/@LANG/wnnenvrc_R
|
|
754
|
|
755 setenv W /usr/local/lib/wnn/@LANG/wnnenvrc_Wu
|
|
756 setenv_R W /usr/local/lib/wnn/@LANG/wnnenvrc_WuR
|
|
757 setenv Q /usr/local/lib/wnn/@LANG/wnnenvrc_Qi
|
|
758 setenv_R Q /usr/local/lib/wnn/@LANG/wnnenvrc_QiR
|
|
759
|
|
760 setuumkey /usr/local/lib/wnn/@LANG/uumkey
|
|
761 setrkfile /usr/local/lib/wnn/@LANG/rk
|
|
762
|
|
763 setconvkey /usr/local/lib/wnn/cvt_key_tbl
|
|
764 setconvkey ST* /usr/local/lib/wnn/cvt_key_tbl.ST
|
|
765 setconvkey gmw* /usr/local/lib/wnn/cvt_key_tbl.gmw
|
|
766 setconvkey kterm* /usr/local/lib/wnn/cvt_key_tbl.kt
|
|
767 setconvkey PIC* /usr/local/lib/wnn/cvt_key_tbl.ST
|
|
768 setconvkey om* /usr/local/lib/wnn/cvt_key_tbl.ST
|
|
769
|
|
770 setmaxhistory 20
|
|
771
|
|
772 waking_up_no_henkan_mode
|
|
773 flow_control_on
|
|
774 touroku_comment
|
|
775 not_send_ascii_char
|
|
776 simple_delete
|
|
777
|
|
778
|
|
779 * Note
|
|
780 - A semicolon ";" at the beginning of the line means that the whole statement
|
|
781 is treated as comment.
|
|
782 - During the startup of the front-end processor, files such as dictionaries,
|
|
783 grammar files and usage frequency files that are specified in "uumrc" will
|
|
784 be read in by the server if they have not been read in during cserver
|
|
785 startup.
|
|
786 - During the front-end processor startup, if the usage frequency files do not
|
|
787 exist, the server will create a new frequency file.
|
|
788
|
|
789
|
|
790
|
|
791
|
|
792
|
|
793
|
|
794
|
|
795
|
|
796
|
|
797
|
|
798
|
|
799
|
|
800 - 5-16 -
|
|
801 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
802 ┃ 5.5 INITIALIZATION FILE FOR FORWARD CONVERSION ENVIRONMENT - wnnenvrc ┃
|
|
803 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
804
|
|
805 * Description
|
|
806 wnnenvrc - The initialization file for forward conversion environment
|
|
807
|
|
808 * Default Path
|
|
809 (1) The corresponding file defined in uumrc
|
|
810 (2) /usr/local/lib/wnn/zh_CN/wnnenvrc
|
|
811
|
|
812 * Function
|
|
813 Defines the forward conversion environment for the user. This file is specified
|
|
814 in "uumrc". If the file is re-specified, the latest version is valid.
|
|
815
|
|
816 * Content
|
|
817 The settings in "wnnenvrc" include the followings:
|
|
818
|
|
819 1. include
|
|
820 - Format
|
|
821 include <wnnenvrc_filename>
|
|
822 To read in other wnnenvrc files.
|
|
823
|
|
824
|
|
825
|
|
826
|
|
827
|
|
828
|
|
829
|
|
830
|
|
831
|
|
832
|
|
833
|
|
834
|
|
835
|
|
836
|
|
837
|
|
838
|
|
839
|
|
840
|
|
841
|
|
842
|
|
843
|
|
844
|
|
845
|
|
846
|
|
847
|
|
848
|
|
849
|
|
850 - 5-17 -
|
|
851 2. setdic
|
|
852 - Format
|
|
853 setdic <p1> <p2> <p3> <p4> <p5> <p6> <p7> <p8>
|
|
854 To set a dictionary in the current environment.
|
|
855 "setdic" command can be used to specify several dictionaries in the same
|
|
856 environment.
|
|
857 <p1> ─ Specify the dictionary filename.
|
|
858 <p2> ─ Specify the usage frequency filename of the specified dictionary.
|
|
859 * <p2> may be represented by "-" as default.
|
|
860 By default, the usage frequency filename of the specified
|
|
861 dictionary will be used.
|
|
862 * When specifying the usage frequency file <p2>, <p2> must
|
|
863 correspond to the usage frequency filename of <p1>.
|
|
864 <p3> ─ Specify the access priority of the dictionary.
|
|
865 * It is represented in decimal
|
|
866 <p4> ─ Specify whether the dictionary is static or dynamic.
|
|
867 * 1: dictionary is read only
|
|
868 * 0: dictionary can be updated
|
|
869 <p5> ─ Specify whether the usage frequency file is static or dynamic.
|
|
870 * 1: usage frequency file is read only
|
|
871 * 0: usage frequency file can be updated
|
|
872 <p6> ─ Specify the password filename of the specified dictionary.
|
|
873 * <p6> may be represented by "-" as default.
|
|
874 <p7> ─ Specify the password filename of the usage frequency file.
|
|
875 * <p7> may be represented by "-" as default.
|
|
876 <p8> ─ Specify whether it is a forward of reverse dictionary
|
|
877 * 1: Forward
|
|
878 * 0: Reverse
|
|
879
|
|
880 - Example
|
|
881 setdic basic.dic - 5 0 0 - - 0
|
|
882
|
|
883 3. setgrammar
|
|
884 - Format
|
|
885 setgrammar <file_name>
|
|
886 Specify the grammar file.
|
|
887
|
|
888
|
|
889
|
|
890
|
|
891
|
|
892
|
|
893
|
|
894
|
|
895
|
|
896
|
|
897
|
|
898
|
|
899
|
|
900 - 5-18 -
|
|
901 4. setparam
|
|
902 - Format
|
|
903 setparam <c0> <c1> <c2> <c3> <c4> <c5> <c6> <c7> <c8>
|
|
904 <c9> <c10> <c11> <c12> <c13> <c14> <c15> <c16>
|
|
905
|
|
906 To set the parameter values for Pinyin-Hanzi conversion. The paramters
|
|
907 are explained in Section 5.3. If these are not set, the system will
|
|
908 follow the parameter values set via "def_param" during cserver startup.
|
|
909 The parameters should be integers. During conversion, the server uses
|
|
910 these parameter values to determine the conversion result.
|
|
911
|
|
912 5. confirm
|
|
913 When the usage frequency files, or the user dictionaries set via "setdic"
|
|
914 do not exist, the system confirms with the user on whether he wants to
|
|
915 create his new individual files.
|
|
916
|
|
917 6. confirm1
|
|
918 When the usage frequency files, or the user dictionaries set via "setdic"
|
|
919 do not exist, the system confirm only ONCE with the user on whether he
|
|
920 wants to create ALL the new files at one time.
|
|
921
|
|
922 7. create_without_confirm
|
|
923 When the usage frequency files of the dictionary, or the user dictionaries
|
|
924 set via "setdic" do not exist, new files will be created automatically.
|
|
925
|
|
926 8. no_create
|
|
927 When the usage frequency files of the dictionary, or the user dictionaries
|
|
928 set via "setdic" do not exist, new files will NOT be created automatically.
|
|
929 In this case, the startup of the front-end processor "cuum" will fail.
|
|
930
|
|
931 * Example
|
|
932 confirm1
|
|
933 setdic sys/level_1.dic usr/@USR/level_1.h 4 1 0 - - 0
|
|
934 setdic sys/level_2.dic usr/@USR/level_2.h 1 1 0 - - 0
|
|
935 setdic sys/basic.dic usr/@USR/basic.h 7 1 0 - - 0
|
|
936 setdic sys/basic.dic usr/@USR/basic.h 7 1 0 - - 0
|
|
937 setdic usr/@USR/ud - 5 0 0 - - 0
|
|
938
|
|
939 setfuzokugo sys/full.con
|
|
940
|
|
941 setparam 1 5 2 750 10 80 10 5 1000 50 0 -200 0 0 0 16 0
|
|
942 ; N M 频 长 四 刚 优 值 组 个 数 英 记 开 闭 最 备
|
|
943
|
|
944
|
|
945
|
|
946
|
|
947
|
|
948
|
|
949
|
|
950 - 5-19 -
|
|
951 * Note
|
|
952 - The environment setup files for Wubi(五笔) and Qianma(钱码) have the same
|
|
953 format as Pinyin(拼音).
|
|
954 Environment setup file for Wubi is "wnnenvrc_Wu", and that for Qianma is
|
|
955 "wnnenvrc_Qi".
|
|
956
|
|
957 - During path specification, the following abbreviations may be used.
|
|
958 (1) ~ The current value of environment variable HOME.
|
|
959 (2) ~username The home directory of the username registered in the password
|
|
960 file.
|
|
961 (3) @HOME The value of environment variable HOME.
|
|
962 (4) @LIBDIR The default path "/usr/local/lib/wnn/zh_CN/" of cWnn's
|
|
963 environment file.
|
|
964 (5) @USR The current value of environment variable LOGNAME.
|
|
965
|
|
966
|
|
967
|
|
968
|
|
969
|
|
970
|
|
971
|
|
972
|
|
973
|
|
974
|
|
975
|
|
976
|
|
977
|
|
978
|
|
979
|
|
980
|
|
981
|
|
982
|
|
983
|
|
984
|
|
985
|
|
986
|
|
987
|
|
988
|
|
989
|
|
990
|
|
991
|
|
992
|
|
993
|
|
994
|
|
995
|
|
996
|
|
997
|
|
998
|
|
999
|
|
1000 - 5-20 -
|
|
1001 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
1002 ┃ 5.6 INITIALIZATION FILE FOR REVERSE CONVERSION ENVIRONMENT - wnnenvrc_R ┃
|
|
1003 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
1004
|
|
1005 * Description
|
|
1006 wnnenvrc_R - The initialization file for reverse conversion environment.
|
|
1007
|
|
1008 * Default Path
|
|
1009 (1) The corresponding file defined in uumrc
|
|
1010 (2) /usr/local/lib/wnn/zh_CN/wnnenvrc_R
|
|
1011
|
|
1012 * Function
|
|
1013 Defines the reverse conversion environment for the user. This file is specified
|
|
1014 in "uumrc". If the file is re-specified, the latest version is valid.
|
|
1015
|
|
1016 * Content
|
|
1017 The settings in "wnnenvrc_R" is similar to "wnnenvrc". For details, refer to
|
|
1018 Section 5.5.
|
|
1019
|
|
1020 * Example
|
|
1021 confirm1
|
|
1022 setdic sys/level_1.dic usr/@USR/level_1.h 4 1 0 - - 1
|
|
1023 setdic sys/level_2.dic usr/@USR/level_2.h 1 1 0 - - 1
|
|
1024 setdic sys/basic.dic usr/@USR/basic.h 7 1 0 - - 1
|
|
1025 ;setdic sys/computer.dic usr/@USR/computer.h 4 1 0 - - 1
|
|
1026
|
|
1027 setdic usr/@USR/ud - 5 0 0 - - 1
|
|
1028
|
|
1029 setfuzokugo sys/full.conR
|
|
1030
|
|
1031 setparam 1 5 2 750 10 80 10 5 1000 50 0 -200 0 0 0 16 0
|
|
1032 ; N M 频 长 四 刚 优 值 组 个 数 英 记 开 闭 最 备
|
|
1033
|
|
1034
|
|
1035 * Note
|
|
1036 - The value of the 8th parameter is "1". This implies that the dictionary is used
|
|
1037 for reverse conversion.
|
|
1038
|
|
1039 - The environment setup files for Wubi(五笔) and Qianma(钱码) have the same format
|
|
1040 as Pinyin(拼音).
|
|
1041 Environment setup file for Wubi is "wnnenvrc_WuR", and that for Qianman is
|
|
1042 "wnnenvrc_QiR".
|
|
1043
|
|
1044
|
|
1045
|
|
1046
|
|
1047
|
|
1048
|
|
1049
|
|
1050 - 5-21 -
|
|
1051 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
1052 ┃ 5.7 KEYBOARD DEFINITION FILE FOR FRONT-END PROCESSOR - uumkey ┃
|
|
1053 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
1054
|
|
1055 * Description
|
|
1056 uumkey - The keyboard definition file for the front-end processor
|
|
1057
|
|
1058 * Default Path
|
|
1059 /usr/local/lib/wnn/zh_CN/uumkey
|
|
1060
|
|
1061 * Function
|
|
1062 In Chinese input, commands for conversion, selection and other user operations
|
|
1063 are implemented via the keyboard input.
|
|
1064 "uumkey" is the keyboard definition file. The relation between the code of an
|
|
1065 input key and its command is defined in the "uumkey" file. User can define
|
|
1066 the function of a particular key according to his needs.
|
|
1067
|
|
1068 * Content
|
|
1069 The settings in "uumkey" include the followings:
|
|
1070
|
|
1071 1. include
|
|
1072 - Format
|
|
1073 include <uumkey filename>
|
|
1074 To read in other keyboard definition files.
|
|
1075
|
|
1076 2. <command>
|
|
1077 - Format
|
|
1078 <command> <key> [ <key> ....]
|
|
1079 This is to define the function of each key.
|
|
1080
|
|
1081 Several <command> are allowed in "uumkey", refer to "Command List" below.
|
|
1082 <key> can be represented in decimal, hexadecimal, octal or character
|
|
1083 enclosed between single quotes.
|
|
1084
|
|
1085 There are 11 states for the front-end processor. Refer to "State Table".
|
|
1086 A function key can serve different functions in different states. Hence a
|
|
1087 function key may be used in different states for different purposes.
|
|
1088
|
|
1089 3. unset
|
|
1090 - Format
|
|
1091 unset <command>
|
|
1092 To remove all the function key definitions which correspond to <command>.
|
|
1093
|
|
1094
|
|
1095
|
|
1096
|
|
1097
|
|
1098
|
|
1099
|
|
1100 - 5-22 -
|
|
1101 * State Table
|
|
1102 ┌───────┬───────────────────────────────┐
|
|
1103 │ State Number │ Description │
|
|
1104 ├───────┼───────────────────────────────┤
|
|
1105 │ 0 │ This is the state after conversion. The state when correction│
|
|
1106 │ │ on the conversion result is being carried out. │
|
|
1107 │ 1 │ This is the state before conversion, ie. the input state. │
|
|
1108 │ 2 │ This is the state when manual segmentation is performed on │
|
|
1109 │ │ the words and phrases after conversion. │
|
|
1110 │ 3 │ This is the initial state when the input buffer is empty. │
|
|
1111 │ 4 │ This is the state of cursor movement during the selection of │
|
|
1112 │ │ candidates for a Chinese character. │
|
|
1113 │ │ (including the state during selection of phrase candidates, │
|
|
1114 │ │ process of operations, and the state of grammatical │
|
|
1115 │ │ attribute and dictionary selection during addition.) │
|
|
1116 │ 5 │ This is the state when the range of a word is specified │
|
|
1117 │ │ during the process of word add. │
|
|
1118 │ 6 │ This is the state of Pinyin input during the process of word │
|
|
1119 │ │ or dictionary add. │
|
|
1120 │ 7 │ This is the state during word search/delete or dictionary │
|
|
1121 │ │ search/delete. │
|
|
1122 │ 8 │ This is the state during word search or information retrieval│
|
|
1123 │ │ of a word. │
|
|
1124 │ 9 │ This is the state during dictionary search. │
|
|
1125 │ A │ This is the inspect mode. │
|
|
1126 └───────┴───────────────────────────────┘
|
|
1127
|
|
1128
|
|
1129
|
|
1130
|
|
1131
|
|
1132
|
|
1133
|
|
1134
|
|
1135
|
|
1136
|
|
1137
|
|
1138
|
|
1139
|
|
1140
|
|
1141
|
|
1142
|
|
1143
|
|
1144
|
|
1145
|
|
1146
|
|
1147
|
|
1148
|
|
1149
|
|
1150 - 5-23 -
|
|
1151 * Command List
|
|
1152 ┌─────────────────┬───────────────────┐
|
|
1153 │ henkan_on │ sainyuuryoku │
|
|
1154 │ quote_keyin │ sainyuuryoku_e │
|
|
1155 │ send_string │ │
|
|
1156 │ kakutei │ redraw_line │
|
|
1157 │ │ redraw_line_e │
|
|
1158 │ forward_char │ │
|
|
1159 │ backward_char │ previous_history │
|
|
1160 │ │ previous_history_e │
|
|
1161 │ goto_top_of_line │ │
|
|
1162 │ goto_end_of_line │ next_history │
|
|
1163 │ │ next_history_e │
|
|
1164 │ delete_char_at_cursor │ │
|
|
1165 │ kaijo │ touroku_mark_set │
|
|
1166 │ henkan │ touroku_return │
|
|
1167 │ │ quit │
|
|
1168 │ tan_henkan │ │
|
|
1169 │ tan_henkan_dai │ touroku_jump_forward │
|
|
1170 │ │ touroku_jump_backward │
|
|
1171 │ nobi_henkan │ │
|
|
1172 │ nobi_henkan_dai │ change_to_insert_mode │
|
|
1173 │ │ │
|
|
1174 │ jikouho │ quote │
|
|
1175 │ jikouho_dai │ quote_e │
|
|
1176 │ │ │
|
|
1177 │ zenkouho │ forward_select │
|
|
1178 │ zenkouho_dai │ backward_select │
|
|
1179 │ │ │
|
|
1180 │ select_jikouho │ next_select │
|
|
1181 │ select_jikouho_dai │ previous_select │
|
|
1182 │ │ │
|
|
1183 │ kana_henkan │ linestart_select │
|
|
1184 │ kill │ lineend_select │
|
|
1185 │ │ │
|
|
1186 │ yank │ select_select │
|
|
1187 │ yank_e │ │
|
|
1188 │ │ send_ascii_char │
|
|
1189 │ bunsetu_nobasi │ not_send_ascii_char │
|
|
1190 │ bunsetu_chijime │ pop_send_ascii_char │
|
|
1191 │ │ toggle_send_ascii_char │
|
|
1192 │ jisho_utility │ quote_send_ascii_char │
|
|
1193 │ jisho_utility_e │ │
|
|
1194 │ │ reconnect_jserver │
|
|
1195 │ touroku │ inspect │
|
|
1196 │ touroku_e │ │
|
|
1197 │ │ del_entry │
|
|
1198 │ sakujo_kouho │ use_entry │
|
|
1199 └─────────────────┴───────────────────┘
|
|
1200 - 5-24 -
|
|
1201 The following shows the states in which some of the commands can be used, and
|
|
1202 their respective functions:
|
|
1203
|
|
1204 - henkan_on 0123456789
|
|
1205 To toggle the conversion state to ON or OFF.
|
|
1206
|
|
1207 - quote_keyin 0123456789
|
|
1208 To quote the next input character so that function keys used for toggling
|
|
1209 the conversion state can also be used as input. This function is used for
|
|
1210 special cases when the input of "henkan_on " function key code is needed.
|
|
1211
|
|
1212 - send_string 012
|
|
1213 To confirm the user input characters without passing through the conversion
|
|
1214 buffer.
|
|
1215
|
|
1216 - kakutei 012
|
|
1217 (Confirm) To send the input character string to the cursor position.
|
|
1218
|
|
1219 - forward_char 01256
|
|
1220 156: To move the cursor one character position to the right
|
|
1221 0 : To move the cursor one word to the right
|
|
1222 2 : To remain character at the cursor position as ASCII, and perform multi-
|
|
1223 phrase conversion on the character after the cursor, and followed by
|
|
1224 moving the cursor one word to the right.
|
|
1225
|
|
1226 - backward_char 01256
|
|
1227 1 : To move the cursor one character position to the left.
|
|
1228 If after a conversion, we re-convert certain portion of the converted
|
|
1229 result (eg. from middle till end of string) back to user input, leaving
|
|
1230 the front portion of the string untouched, then multi-phrase conversion
|
|
1231 will be performed when we move the cursor to the left. This will only
|
|
1232 be valid when the cursor is at the leftmost position of the unconverted
|
|
1233 portion. After this multi-phrase conversion, the cursor will move one
|
|
1234 word to the left.
|
|
1235 56 : To move the cursor one character to the left.
|
|
1236 0 : To move the cursor one word to the left.
|
|
1237 2 : The highlighted portion will remain as ASCII, the portion beyond the
|
|
1238 highlighted part will undergo multi-phrase conversion, and the cursor
|
|
1239 will move one word to the left.
|
|
1240
|
|
1241 - goto_top_of_line 01256
|
|
1242 1256: To move the cursor to the first character of the line.
|
|
1243 0 : To move the cursor to the first word of the line.
|
|
1244
|
|
1245 - goto_end_of_line 01256
|
|
1246 1256: To move the cursor to the last character of the line.
|
|
1247 0 : To move the cursor to the last word of the line.
|
|
1248
|
|
1249
|
|
1250 - 5-25 -
|
|
1251 - delete_char_at_cursor 156
|
|
1252 To delete the character at the current position of the cursor.
|
|
1253
|
|
1254 - kaijo 02
|
|
1255 To change the converted character string after the current cursor position
|
|
1256 back to the state before conversion.
|
|
1257
|
|
1258 - henkan 1
|
|
1259 To perform multi-phrase conversion.
|
|
1260
|
|
1261 - tan_henkan 1
|
|
1262 To treat a word as a single unit and perform word conversion.
|
|
1263
|
|
1264 - tan_henkan_dai 1
|
|
1265 To treat a phrase as a single unit and perform a single phrase conversion.
|
|
1266
|
|
1267 - nobi_henkan 2
|
|
1268 During word elongation, the highlighted portion will be treated as a word
|
|
1269 and undergo word conversion, while the remaining portion will undergo
|
|
1270 multi-phrase conversion.
|
|
1271
|
|
1272 - nobi_henkan_dai 2
|
|
1273 During compulsory word segmentation, the portion at the cursor will be
|
|
1274 treated as a phrase and undergo a single phrase conversion, while the
|
|
1275 portion after the cursor will undergo a multi-phrase conversion.
|
|
1276
|
|
1277 - jikouho 0
|
|
1278 To extract the next word candidate.
|
|
1279
|
|
1280 - jikouho_dai 0
|
|
1281 To extract the next phrase candidate.
|
|
1282
|
|
1283 - zenkouho 0
|
|
1284 To extract the previous word candidate.
|
|
1285
|
|
1286 - zenkouho_dai 0
|
|
1287 To extract the previous phrase candidate.
|
|
1288
|
|
1289 - select_jikouho 0
|
|
1290 To extract the next group of word candidates.
|
|
1291
|
|
1292 - select_jikouho_dai 0
|
|
1293 To extract the next group of phrase cnadidates.
|
|
1294
|
|
1295 - kana_henkan 1
|
|
1296 To perform Hanzi-Pinyin (or Hanzi-Bianma) conversion, ie. reverse conversion.
|
|
1297
|
|
1298
|
|
1299
|
|
1300 - 5-26 -
|
|
1301 - kill 156
|
|
1302 To delete the characters from the current cursor position to the end, and
|
|
1303 store them in the "kill" buffer.
|
|
1304
|
|
1305 - yank 156
|
|
1306
|
|
1307 - yank_e 1356
|
|
1308 To insert the content from the "kill" buffer into the current cursor
|
|
1309 position.
|
|
1310
|
|
1311 - bunsetu_nobasi 02
|
|
1312 To increase the length of a word by one character.
|
|
1313
|
|
1314 - bunsetu_chijime 02
|
|
1315 To decrease the length of a word by one character.
|
|
1316
|
|
1317 - jisho_utility 012
|
|
1318
|
|
1319 - jisho_utility_e 0123
|
|
1320 To enter the state of dictionary operation.
|
|
1321
|
|
1322 - touroku 012
|
|
1323
|
|
1324 - touroku_e 0123
|
|
1325 To enter the state of word add process.
|
|
1326
|
|
1327 - sainyuuryoku 1
|
|
1328
|
|
1329 - sainyuuryoku_e 13
|
|
1330 To re-input the previously input character strings.
|
|
1331
|
|
1332 - redraw_line 012456789
|
|
1333
|
|
1334 - redraw_line 0123456789
|
|
1335 To re-display the input line.
|
|
1336
|
|
1337 - previous_history 1
|
|
1338
|
|
1339 - previous_history_e 13
|
|
1340 To extract the previous character string stored in the "history" buffer.
|
|
1341
|
|
1342 - next_history 1
|
|
1343
|
|
1344 - next_history_e 13
|
|
1345 To extract the next character string stored in the "history" buffer.
|
|
1346
|
|
1347
|
|
1348
|
|
1349
|
|
1350 - 5-27 -
|
|
1351 - touroku_mark_set 5
|
|
1352 To specify the beginning and ending position of the input string during a
|
|
1353 word add process. When the beginning and ending position are the same,
|
|
1354 (ie. word length is 0), return to the initial state.
|
|
1355
|
|
1356 - touroku_return 6
|
|
1357 To indicate the end of the Pinyin (or radical) input string during a word
|
|
1358 add process.
|
|
1359
|
|
1360 - quit 4567
|
|
1361 When in a state other than the conversion state or input state (eg. viewing
|
|
1362 of candidates for a Chinese character, word add etc, state number 4,5,6,7),
|
|
1363 exit this state.
|
|
1364
|
|
1365 - touroku_jump_forward 5
|
|
1366 During the word add process, move the cursor to the front by one word.
|
|
1367
|
|
1368 - touroku_jump_backward 5
|
|
1369 During the word add process, move the cursor to the rear by one word.
|
|
1370
|
|
1371 - change_to_insert_mode 0
|
|
1372 To change the converted input string back to edit mode, and thereafter,
|
|
1373 the converted Hanzi will not change back to its Pinyin (or radical) form.
|
|
1374
|
|
1375 - quote 1
|
|
1376
|
|
1377 - quote_e 13
|
|
1378 To quote the next input character (except "henkan_on") and omit passing it
|
|
1379 to the input automaton conversion. Instead, pass it directly to the input
|
|
1380 line.
|
|
1381
|
|
1382 - forward_select 4789
|
|
1383 4 : During the state of candidate selection, the highlighted portion will
|
|
1384 move to the right.
|
|
1385 789 : During dictionary search, if a line is not selected, it will scroll
|
|
1386 forward.
|
|
1387
|
|
1388 - backward_select 4789
|
|
1389 4 : During the state of candidate selection, the highlighted portion will
|
|
1390 move to the left.
|
|
1391 789 : During dictionary search, if a line is not selected, it will scroll
|
|
1392 backward.
|
|
1393
|
|
1394
|
|
1395
|
|
1396
|
|
1397
|
|
1398
|
|
1399
|
|
1400 - 5-28 -
|
|
1401 - next_select 4789
|
|
1402 4 : During the state of candidate selection, move to the next screen.
|
|
1403 789 : During dictionary search, move to the next line.
|
|
1404
|
|
1405 - previous_select 4789
|
|
1406 4 : During the state of candidate selection, move to the previous screen.
|
|
1407 789 : During dictionary search, move to the previous line.
|
|
1408
|
|
1409 - linestart_select 4789
|
|
1410 4 : During the state of candidate selection, move to the top of the screen.
|
|
1411 789 : During dictionary search, if a line is not selected, move to the
|
|
1412 first screen.
|
|
1413
|
|
1414 - lineend_select 4789
|
|
1415 4 : During the state of candidate selection, move to the end of the screen.
|
|
1416 789 : During dictionary search, if a line is not selected, move to the
|
|
1417 last screen.
|
|
1418
|
|
1419 - select_select 4789
|
|
1420 4 : During the state of candidate selection, select one candidate and exit
|
|
1421 from this state.
|
|
1422 789 : During dictionary search, select a candidate and exit from this state.
|
|
1423
|
|
1424 - send_ascii_char 0123456789
|
|
1425 After this command, if the input buffer is empty, the ASCII character input
|
|
1426 will NOT be sent to the buffer.
|
|
1427
|
|
1428 - not_send_ascii_char 0123456789
|
|
1429 After this command, if the input buffer is empty, the ASCII character input
|
|
1430 will be sent to the buffer.
|
|
1431
|
|
1432 - pop_send_ascii_char 0123456789
|
|
1433 After this command, if the input buffer is empty, the operation of the ASCII
|
|
1434 character input will be changed back to its previous state.
|
|
1435
|
|
1436 - toggle_send_ascii_char 0123456789
|
|
1437 After this command, if the input buffer is empty, the operation of the ASCII
|
|
1438 character input will be reversed (ie. if the current operation is
|
|
1439 "send_ascii_char", it will be set to "not_send_ascii_char" and vice versa).
|
|
1440
|
|
1441 - quote_send_ascii_char
|
|
1442 During the "send_ascii_char" state, if the buffer is empty, the next ASCII
|
|
1443 character will enter the buffer. However, subsequent characters will not
|
|
1444 enter the buffer even if it is empty.
|
|
1445
|
|
1446 - reconnect_jserver 012456789
|
|
1447 To reconnect with the cserver
|
|
1448
|
|
1449
|
|
1450 - 5-29 -
|
|
1451 - inspect 0
|
|
1452 To check the dictionary.
|
|
1453
|
|
1454 - sakujo_kouho 0
|
|
1455 To delete a candidate.
|
|
1456
|
|
1457 - del_entry 89
|
|
1458 To delete dictionary as well as the words in the dictionary.
|
|
1459
|
|
1460 - use_entry 89
|
|
1461 To temporary stop and subsequently re-use the dictionary and the words
|
|
1462 in the dictionary.
|
|
1463
|
|
1464
|
|
1465 * Example
|
|
1466 ;Commands Codes
|
|
1467 forward_char ^F 0x90
|
|
1468 backward_char ^B 0x91
|
|
1469 goto_top_of_line ^A 0x9
|
|
1470 goto_end_of_line ^E 0x9B
|
|
1471
|
|
1472
|
|
1473 * Note
|
|
1474 - Lines that begin with ";" are treated as comments.
|
|
1475 - When the conversion state is OFF, the front-end processor will be temporarily.
|
|
1476 disconnected. At the same time, the input automaton also stops functioning.
|
|
1477 Hence, not all codes can be entered from the keyboard. (A key code refers to
|
|
1478 a code between 0 and 255.)
|
|
1479 To input a code that cannot be entered directly via the keyboard, you may use
|
|
1480 the key code conversion (Refer to Section 5.8) or input automaton (Refer to
|
|
1481 Chapter 7).
|
|
1482
|
|
1483
|
|
1484
|
|
1485
|
|
1486
|
|
1487
|
|
1488
|
|
1489
|
|
1490
|
|
1491
|
|
1492
|
|
1493
|
|
1494
|
|
1495
|
|
1496
|
|
1497
|
|
1498
|
|
1499
|
|
1500 - 5-30 -
|
|
1501 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
1502 ┃ 5.8 CONVERSION FILE FOR KEYBOARD INPUT CODE - cvt_key_tbl ┃
|
|
1503 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
1504
|
|
1505 * Description
|
|
1506 cvt_key_tbl - The conversion file for the keyboard input code.
|
|
1507 It shows the different key bind between terminals.
|
|
1508
|
|
1509 * Default Path
|
|
1510 /usr/local/lib/wnn/cvt_key_tbl
|
|
1511
|
|
1512 * Function
|
|
1513 Definitions that convert the character sequences defined in terminfo/
|
|
1514 termcap into single character codes.
|
|
1515
|
|
1516 * Content
|
|
1517 The terminfo or termcap entries and the input codes are specified here.
|
|
1518 - Format
|
|
1519 <terminfo_entry> <code> (for Unios-U)
|
|
1520 <termcap_entry> <code> (for Unios-B, Mach)
|
|
1521
|
|
1522 For terminfo entries and termcap entries, refer to Unix manuals for the
|
|
1523 respective informations.
|
|
1524
|
|
1525
|
|
1526
|
|
1527
|
|
1528
|
|
1529
|
|
1530
|
|
1531
|
|
1532
|
|
1533
|
|
1534
|
|
1535
|
|
1536
|
|
1537
|
|
1538
|
|
1539
|
|
1540
|
|
1541
|
|
1542
|
|
1543
|
|
1544
|
|
1545
|
|
1546
|
|
1547
|
|
1548
|
|
1549
|
|
1550 - 5-31 -
|
|
1551 - Code expression
|
|
1552 (1) Except for space, \ and ^ , all characters will be represented as
|
|
1553 they are. Example: A, 1.
|
|
1554
|
|
1555 (2) ^<character>
|
|
1556 <character> can be @, A(a), B(b), C(c), D(d), E(e), F(f), ...Z(z),
|
|
1557 [, \ ,], ^, _
|
|
1558
|
|
1559 ^@ is Ctrl + space (0x00)
|
|
1560 ^A is Ctrl + A (0x01)
|
|
1561 :
|
|
1562 :
|
|
1563 ^_ is Ctrl + _ (0x1f)
|
|
1564
|
|
1565 (3) \<octal number>, \o<octal number>, \d<decimal number>,
|
|
1566 \x<hexadecimal number> character codes can be represented directly.
|
|
1567 Example: \x81
|
|
1568
|
|
1569 (4) \n, \t, \b, \r, \f, \e, \E represent NEWLINE, TAB, BACKSPACE, CR,
|
|
1570 FORMFEED, ESC, ESC respectively.
|
|
1571
|
|
1572 (5) \<character>
|
|
1573 <character> can be any character except 0,1,2,3,4,5,6,7, o,d,x,n,
|
|
1574 t,b,r,f,e,E
|
|
1575 \\ means \ itself.
|
|
1576
|
|
1577 * Example
|
|
1578 kl \x81
|
|
1579 ku \x82
|
|
1580 kr \x83
|
|
1581 kd \x84
|
|
1582
|
|
1583
|
|
1584 * Note
|
|
1585 Input codes in this conversion file will be evaluated when they are being
|
|
1586 processed in the followings:
|
|
1587 (a) input mode control table (2A_CTRL) of input automaton
|
|
1588 (b) uumkey
|
|
1589
|
|
1590 * Reference
|
|
1591 uumkey(5.7)
|
|
1592
|
|
1593
|
|
1594
|
|
1595
|
|
1596
|
|
1597
|
|
1598
|
|
1599
|
|
1600 - 5-32 -
|