0
|
1 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
3 ┃ Chapter 2 GETTING STARTED ┃
|
|
4 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
5 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
6
|
|
7 ┏━━━━━━━━━━━━━━━━━━┓
|
|
8 ┃ 2.1 CWNN STARTUP AND TERMINATION ┃
|
|
9 ┗━━━━━━━━━━━━━━━━━━┛
|
|
10
|
|
11 First of all, the user needs to start up the cserver before he can use the
|
|
12 system. cserver runs as a background process. Hence once the cserver is up, it can be
|
|
13 shared by several client modules, ie the front-end processors.
|
|
14
|
|
15
|
|
16 1. Startup of cserver
|
|
17 ━━━━━━━━━━━
|
|
18 To start the server, type the following command at the C Shell prompt :
|
|
19 ┌──────────────────────────────┐
|
|
20 │ % cserver <CR> │
|
|
21 └──────────────────────────────┘
|
|
22
|
|
23 The default path of cserver is "/usr/local/bin/cWnn4/ ". If the user has not set this
|
|
24 path, he can either set it and type the command directly, or type the full pathname of
|
|
25 cserver while executing this command.
|
|
26
|
|
27 cserver will only be started up once. You may confirm the existence of cserver by using
|
|
28 the "cwnnstat" command (refer to 6.4). If cserver is being executed after its initial
|
|
29 startup, the following error message will be displayed:
|
|
30 ┌──────────────────────────────┐
|
|
31 │ Jserver: can't bind inet-socket │
|
|
32 └──────────────────────────────┘
|
|
33
|
|
34 The cserver will read in all default files in the system. These include the grammar
|
|
35 files, dictionaries and the usage frequency files.
|
|
36 After reading, a message "Finished Reading Files" will be displayed, and the C Shell
|
|
37 prompt will be ready to receive commands again.
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50 - 2-1 -
|
|
51 2. Startup of client module, cuum
|
|
52 ━━━━━━━━━━━━━━━━━
|
|
53 Basically, there are three client modules as shown below, each supports different input
|
|
54 environment: (1) supports both Pinyin and Zhuyin input environment
|
|
55 (2) supports mainly Pinyin centred input enivronment
|
|
56 (3) supports mainly Zhuyin centred input environment
|
|
57 Users may activate either of them to input Chinese characters depending on their needs.
|
|
58
|
|
59 "cuum" will start up environment (1) above. To start "cuum", type the following command
|
|
60 at the C Shell prompt of a Chinese window:
|
|
61 ┌──────────────────────────────┐
|
|
62 │ % cuum <CR> │
|
|
63 └──────────────────────────────┘
|
|
64
|
|
65 To activate the other two environments, you may use the "-r" option of the "cuum"
|
|
66 command together with the default path of the environment. For example, to activate
|
|
67 environment (2), do the following:
|
|
68 ┌──────────────────────────────┐
|
|
69 │ % cuum -r /usr/local/lib/wnn/zh_CN/rk_p <CR> │
|
|
70 └──────────────────────────────┘
|
|
71 For detailed information, refer to Section 3.2 and Section 6.3.
|
|
72
|
|
73
|
|
74 The default path for "cuum" is "/usr/local/bin/cWnn4/". Many cuum's may be started at
|
|
75 the same time on different windows. Each of them will be registered as a client at the
|
|
76 cserver.
|
|
77
|
|
78 During the execution of the cuum command, the following message will appear.
|
|
79 ┌──────────────────────────────┐
|
|
80 │% cuum <CR> │
|
|
81 │ │
|
|
82 │ │
|
|
83 │ ·····你好····· │
|
|
84 │ ·欢迎使用汉语处理系统· │
|
|
85 │ · 祝您今天好运气 · │
|
|
86 │ ····cwnn···· │
|
|
87 │ % │
|
|
88 │ [---] │
|
|
89 └──────────────────────────────┘
|
|
90
|
|
91 The client module, cuum, is now ready to be used. To enter the input mode, press ^\.
|
|
92 To leave the input mode, press ^\ again. To confirm the existence of cuum, you may
|
|
93 also use ^\.
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100 - 2-2 -
|
|
101 If the user does not start up "cserver" before he executes "cuum", then the following
|
|
102 message will appear:
|
|
103 ┌──────────────────────────────┐
|
|
104 │ 不能和server连接。 │
|
|
105 └──────────────────────────────┘
|
|
106
|
|
107
|
|
108 If the user happens to activate "cuum" again after it is already activated, an error
|
|
109 message is shown as follows:
|
|
110 ┌──────────────────────────────┐
|
|
111 │ 在cuum上不能起动cuum。 │
|
|
112 └──────────────────────────────┘
|
|
113
|
|
114
|
|
115
|
|
116
|
|
117
|
|
118
|
|
119
|
|
120
|
|
121
|
|
122
|
|
123
|
|
124
|
|
125
|
|
126
|
|
127
|
|
128
|
|
129
|
|
130
|
|
131
|
|
132
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148
|
|
149
|
|
150 - 2-3 -
|
|
151 3. Termination of cuum
|
|
152 ━━━━━━━━━━━
|
|
153 In order to terminate a client process, type the following:
|
|
154 ┌──────────────────────────────┐
|
|
155 │ % ^d │
|
|
156 └──────────────────────────────┘
|
|
157
|
|
158 The cserver will save all the usage frequency files and dictionaries of the particular
|
|
159 client and terminate the connection between itself and that client.
|
|
160
|
|
161 The following message will appear:
|
|
162 ┌──────────────────────────────┐
|
|
163 │ cuum结束。 │
|
|
164 │ % │
|
|
165 └──────────────────────────────┘
|
|
166
|
|
167
|
|
168
|
|
169 4. Termination of cserver
|
|
170 ━━━━━━━━━━━━━
|
|
171 To terminate the cserver, type the following command:
|
|
172 ┌──────────────────────────────┐
|
|
173 │ % cwnnkill <CR> │
|
|
174 │ CSERVER Terminated │
|
|
175 │ % │
|
|
176 └──────────────────────────────┘
|
|
177
|
|
178 If some other clients still exist, the following message will be displayed:
|
|
179 ┌──────────────────────────────┐
|
|
180 │ % cwnnkill <CR> │
|
|
181 │ 1 User Exists. │
|
|
182 │ CSERVER Not Killed. │
|
|
183 │ % │
|
|
184 │ [---] │
|
|
185 └──────────────────────────────┘
|
|
186
|
|
187 For more details on the commands, refer to Chapter 6.
|
|
188
|
|
189
|
|
190
|
|
191
|
|
192
|
|
193
|
|
194
|
|
195
|
|
196
|
|
197
|
|
198
|
|
199
|
|
200 - 2-4 -
|