-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_xhupkai.sh
338 lines (298 loc) · 30.8 KB
/
make_xhupkai.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
#!/bin/bash
set -e
set -x
# BUILD_TYPE="$1"
rm -rf xhupkai-chs
rm -rf xhupkai-cht
# 生成繁體
cp -a ./rime-moran/. ./xhupkai-cht
rm -rf ./xhupkai-cht/.git
rm -rf ./xhupkai-cht/.gitignore
rm -rf ./xhupkai-cht/README.md
rm -rf ./xhupkai-cht/README-en.md
rm -rf ./xhupkai-cht/.github/
perl -CSAD -i -pe 's/(^.*ZRM-SPECIFIC)/# $1/' ./xhupkai-cht/moran.yaml
perl -0777 -i -pe 's/( user_sentence_top:)\n( __append:)\n( __patch:)/$1\n# $2\n# $3/' ./xhupkai-cht/moran.yaml
# mv ./xhupkai-cht/punctuation.yaml ./schema
cp ./rime-moran/tools/data/zrmdb.txt ./tools-additional
sed -i 's/ /\t/g' ./tools-additional/zrmdb.txt
# 生成簡體
cd ./xhupkai-cht/
sed -i "s/^git archive HEAD -o archive.tar/tar -cvf archive.tar .\//g" ./make_simp_dist.sh
sed -i "s/^cp 下载与安装说明/# cp 下载与安装说明/g" ./make_simp_dist.sh
sed -i "s/^sedi 's\/MORAN_VARIANT\/简体\/'/# sedi 's\/MORAN_VARIANT\/简体\/'/g" ./make_simp_dist.sh
sed -i 's/^7z a.*/cp -a .\/dist\/. ..\/xhupkai-chs/g' ./make_simp_dist.sh
bash -x ./make_simp_dist.sh
cd ..
# 轉換詞庫
cd ./tools-additional
# 轉換繁体詞庫
echo 轉換繁体詞庫...
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.chars.dict.yaml > ../xhupkai-cht/moran.chars.dict.yaml.bak
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -i ../rime-ice/cn_dicts/8105.dict.yaml -o ../xhupkai-cht/temp.txt
# perl -CSAD -i -pe "s/.\t[a-z]{2};;(\t[0-9]+)?\n//g" ../xhupkai-cht/temp.txt && sed -i '0,/\.\.\./d' ../xhupkai-cht/temp.txt
# echo "" >> ../xhupkai-cht/moran.chars.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran.chars.dict.yaml.bak
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -i ../rime-ice/cn_dicts/41448.dict.yaml -o ../xhupkai-cht/temp.txt
# perl -CSAD -i -pe "s/.\t[a-z]{2};;(\t[0-9]+)?\n//g" ../xhupkai-cht/temp.txt && sed -i '0,/\.\.\./d' ../xhupkai-cht/temp.txt
# echo "" >> ../xhupkai-cht/moran.chars.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran.chars.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.base.dict.yaml > ../xhupkai-cht/moran.base.dict.yaml.bak
# cp ../rime-ice/cn_dicts/base.dict.yaml ../xhupkai-cht/ice.base.dict.yaml
# sed -i '0,/\.\.\./d' ../xhupkai-cht/ice.base.dict.yaml
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../xhupkai-cht/ice.base.dict.yaml -o ../xhupkai-cht/temp.txt
# echo "" >> ../xhupkai-cht/moran.base.dict.yaml.bak
# cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran.base.dict.yaml.bak
# rm ../xhupkai-cht/ice.base.dict.yaml
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.tencent.dict.yaml > ../xhupkai-cht/moran.tencent.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.moe.dict.yaml > ../xhupkai-cht/moran.moe.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.computer.dict.yaml > ../xhupkai-cht/moran.computer.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.hanyu.dict.yaml > ../xhupkai-cht/moran.hanyu.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-cht/moran.words.dict.yaml > ../xhupkai-cht/moran.words.dict.yaml.bak
python3 convert_sp.py -i ../xhupkai-cht/zrlf.dict.yaml -o ../xhupkai-cht/zrlf.dict.yaml.bak
sed '/#----------詞庫----------#/q' ../xhupkai-cht/moran_fixed.dict.yaml > ../xhupkai-cht/moran_fixed.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-fixed-sp --to=flypy --rime-dict=../xhupkai-cht/moran_fixed.dict.yaml > ../xhupkai-cht/temp.txt && sed -i '/# Some words for testing\.\.\./,$d' ../xhupkai-cht/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2,100}\t[A-Za-z]+.*\n//g" ../xhupkai-cht/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]{4}.*\n//g" ../xhupkai-cht/temp.txt
sed -i '0,/#----------詞庫----------#/d' ../xhupkai-cht/temp.txt && echo "" >> ../xhupkai-cht/moran_fixed.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed.dict.yaml.bak
opencc -i ../data/assess.tiger-code.com/xhup.simpwords.txt -o ../xhupkai-cht/temp.txt -c s2t
echo "" >> ../xhupkai-cht/moran_fixed.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed.dict.yaml.bak
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]+.*\n//g" ../xhupkai-cht/moran_fixed.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{3}\t[A-Za-z]{4}+\n//g" ../xhupkai-cht/moran_fixed.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2}\t[A-Za-z]{3,4}+\n//g" ../xhupkai-cht/moran_fixed.dict.yaml
sed '0,/#----------詞庫----------#/d' ../xhupkai-cht/moran_fixed.dict.yaml >> ../xhupkai-cht/moran_fixed.dict.yaml.bak
opencc -i ../data/assess.tiger-code.com/common.simp.words.txt -o ../xhupkai-cht/temp.txt -c s2t
echo "" >> ../xhupkai-cht/moran_fixed.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed.dict.yaml.bak && perl -i -ne 'print if !$seen{$_}++' ../xhupkai-cht/moran_fixed.dict.yaml.bak
sed '/#----------词库----------#/q' ../xhupkai-cht/moran_fixed_simp.dict.yaml > ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-fixed-sp --to=flypy --rime-dict=../xhupkai-cht/moran_fixed_simp.dict.yaml > ../xhupkai-cht/temp.txt && sed -i '/# 化学元素/,$d' ../xhupkai-cht/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2,100}\t[A-Za-z]+.*\n//g" ../xhupkai-cht/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]{4}.*\n//g" ../xhupkai-cht/temp.txt
sed -i '0,/#----------词库----------#/d' ../xhupkai-cht/temp.txt && echo "" >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak
cp ../data/assess.tiger-code.com/xhup.simpwords.txt ../xhupkai-cht/temp.txt
echo "" >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]+.*\n//g" ../xhupkai-cht/moran_fixed_simp.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{3}\t[A-Za-z]{4}+\n//g" ../xhupkai-cht/moran_fixed_simp.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2}\t[A-Za-z]{3,4}+\n//g" ../xhupkai-cht/moran_fixed_simp.dict.yaml
sed '0,/#----------词库----------#/d' ../xhupkai-cht/moran_fixed_simp.dict.yaml >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak
cp ../data/assess.tiger-code.com/common.simp.words.txt ../xhupkai-cht/temp.txt
echo "" >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-cht/temp.txt >> ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak && perl -i -ne 'print if !$seen{$_}++' ../xhupkai-cht/moran_fixed_simp.dict.yaml.bak
mv ../xhupkai-cht/moran.chars.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.base.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.tencent.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.moe.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.computer.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.hanyu.dict.yaml{.bak,}
mv ../xhupkai-cht/moran.words.dict.yaml{.bak,}
mv ../xhupkai-cht/moran_fixed.dict.yaml{.bak,}
mv ../xhupkai-cht/moran_fixed_simp.dict.yaml{.bak,}
mv ../xhupkai-cht/zrlf.dict.yaml{.bak,}
# 轉換简体詞庫
echo 轉換简体詞庫...
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.chars.dict.yaml > ../xhupkai-chs/moran.chars.dict.yaml.bak
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -i ../rime-ice/cn_dicts/8105.dict.yaml -o ../xhupkai-chs/temp.txt
# perl -CSAD -i -pe "s/.\t[a-z]{2};;(\t[0-9]+)?\n//g" ../xhupkai-chs/temp.txt && sed -i '0,/\.\.\./d' ../xhupkai-chs/temp.txt
# echo "" >> ../xhupkai-chs/moran.chars.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran.chars.dict.yaml.bak
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -i ../rime-ice/cn_dicts/41448.dict.yaml -o ../xhupkai-chs/temp.txt
# perl -CSAD -i -pe "s/.\t[a-z]{2};;(\t[0-9]+)?\n//g" ../xhupkai-chs/temp.txt && sed -i '0,/\.\.\./d' ../xhupkai-chs/temp.txt
# echo "" >> ../xhupkai-chs/moran.chars.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran.chars.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.base.dict.yaml > ../xhupkai-chs/moran.base.dict.yaml.bak
# cp ../rime-ice/cn_dicts/base.dict.yaml ../xhupkai-chs/ice.base.dict.yaml
# sed -i '0,/\.\.\./d' ../xhupkai-chs/ice.base.dict.yaml
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../xhupkai-chs/ice.base.dict.yaml -o ../xhupkai-chs/temp.txt
# echo "" >> ../xhupkai-chs/moran.base.dict.yaml.bak
# cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran.base.dict.yaml.bak
# rm ../xhupkai-chs/ice.base.dict.yaml
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.tencent.dict.yaml > ../xhupkai-chs/moran.tencent.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.moe.dict.yaml > ../xhupkai-chs/moran.moe.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.computer.dict.yaml > ../xhupkai-chs/moran.computer.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.hanyu.dict.yaml > ../xhupkai-chs/moran.hanyu.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-sp --to=flypy --rime-dict=../xhupkai-chs/moran.words.dict.yaml > ../xhupkai-chs/moran.words.dict.yaml.bak
python3 convert_sp.py -i ../xhupkai-chs/zrlf.dict.yaml -o ../xhupkai-chs/zrlf.dict.yaml.bak
sed '/#----------詞庫----------#/q' ../xhupkai-chs/moran_fixed.dict.yaml > ../xhupkai-chs/moran_fixed.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-fixed-sp --to=flypy --rime-dict=../xhupkai-chs/moran_fixed.dict.yaml > ../xhupkai-chs/temp.txt && sed -i '/# Some words for testing\.\.\./,$d' ../xhupkai-chs/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2,100}\t[A-Za-z]+.*\n//g" ../xhupkai-chs/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]{4}.*\n//g" ../xhupkai-chs/temp.txt
sed -i '0,/#----------詞庫----------#/d' ../xhupkai-chs/temp.txt && echo "" >> ../xhupkai-chs/moran_fixed.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed.dict.yaml.bak
opencc -i ../data/assess.tiger-code.com/xhup.simpwords.txt -o ../xhupkai-chs/temp.txt -c s2t
echo "" >> ../xhupkai-chs/moran_fixed.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed.dict.yaml.bak
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]+.*\n//g" ../xhupkai-chs/moran_fixed.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{3}\t[A-Za-z]{4}+\n//g" ../xhupkai-chs/moran_fixed.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2}\t[A-Za-z]{3,4}+\n//g" ../xhupkai-chs/moran_fixed.dict.yaml
sed '0,/#----------詞庫----------#/d' ../xhupkai-chs/moran_fixed.dict.yaml >> ../xhupkai-chs/moran_fixed.dict.yaml.bak
opencc -i ../data/assess.tiger-code.com/common.simp.words.txt -o ../xhupkai-chs/temp.txt -c s2t
echo "" >> ../xhupkai-chs/moran_fixed.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed.dict.yaml.bak && perl -i -ne 'print if !$seen{$_}++' ../xhupkai-chs/moran_fixed.dict.yaml.bak
sed '/#----------词库----------#/q' ../xhupkai-chs/moran_fixed_simp.dict.yaml > ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak
python3 ../rime-moran/tools/schemagen.py convert-fixed-sp --to=flypy --rime-dict=../xhupkai-chs/moran_fixed_simp.dict.yaml > ../xhupkai-chs/temp.txt && sed -i '/# 化学元素/,$d' ../xhupkai-chs/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2,100}\t[A-Za-z]+.*\n//g" ../xhupkai-chs/temp.txt
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]{4}.*\n//g" ../xhupkai-chs/temp.txt
sed -i '0,/#----------词库----------#/d' ../xhupkai-chs/temp.txt && echo "" >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak
cp ../data/assess.tiger-code.com/xhup.simpwords.txt ../xhupkai-chs/temp.txt
echo "" >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{1}\t[A-Za-z]+.*\n//g" ../xhupkai-chs/moran_fixed_simp.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{3}\t[A-Za-z]{4}+\n//g" ../xhupkai-chs/moran_fixed_simp.dict.yaml
perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fff}\x{3007}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebe0}\x{30000}-\x{3134a}\x{31350}-\x{323af}\x{2ebf0}-\x{2ee5f}]{2}\t[A-Za-z]{3,4}+\n//g" ../xhupkai-chs/moran_fixed_simp.dict.yaml
sed '0,/#----------词库----------#/d' ../xhupkai-chs/moran_fixed_simp.dict.yaml >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak
cp ../data/assess.tiger-code.com/common.simp.words.txt ../xhupkai-chs/temp.txt
echo "" >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak && cat ../xhupkai-chs/temp.txt >> ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak && perl -i -ne 'print if !$seen{$_}++' ../xhupkai-chs/moran_fixed_simp.dict.yaml.bak
mv ../xhupkai-chs/moran.chars.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.base.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.tencent.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.moe.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.computer.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.hanyu.dict.yaml{.bak,}
mv ../xhupkai-chs/moran.words.dict.yaml{.bak,}
mv ../xhupkai-chs/moran_fixed.dict.yaml{.bak,}
mv ../xhupkai-chs/moran_fixed_simp.dict.yaml{.bak,}
mv ../xhupkai-chs/zrlf.dict.yaml{.bak,}
cd ..
# 整理文件結構
rm -rf ./xhupkai-cht/tools
rm -rf ./xhupkai-cht/make_simp_dist.sh
mkdir -p ./xhupkai-cht/ice-dicts/
mkdir -p ./xhupkai-chs/ice-dicts/
# cp -a ./xhupkai-cht/moran_fixed.dict.yaml ./schema/xhupkai_fixed.dict.yaml
# cp -a ./xhupkai-cht/moran_fixed_simp.dict.yaml ./schema/xhupkai_fixed_simp.dict.yaml
cp -a ./schema/default.custom.xhupkai.yaml ./xhupkai-cht/default.custom.yaml
cp -a ./schema/default.custom.xhupkai.yaml ./xhupkai-chs/default.custom.yaml
# 刪去詞語簡碼
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{2,100}\t[A-Za-z0-9]{1,3}\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{2,100}\t[A-Za-z0-9]{1,3}\t.*\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{3,100}\t[A-Za-z0-9]{4}\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff01}-\x{ffee}]{3,100}\t[A-Za-z0-9]{4}\t.*\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{1,100}\t[A-Za-z0-9]{5,100}\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{1,100}\t[A-Za-z0-9]{5,100}\t.*\n//g" ./schema/moran_fixed.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{2,100}\t[A-Za-z0-9]{1,3}\n//g" ./schema/moran_fixed_simp.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{2,100}\t[A-Za-z0-9]{1,3}\t.*\n//g" ./schema/moran_fixed_simp.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{3,100}\t[A-Za-z0-9]{4}\n//g" ./schema/moran_fixed_simp.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{3,100}\t[A-Za-z0-9]{4}\t.*\n//g" ./schema/moran_fixed_simp.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{1,100}\t[A-Za-z0-9]{5,100}\n//g" ./schema/moran_fixed_simp.dict.yaml
# perl -CSAD -i -pe "s/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x{3007}\x{ff0c}-\x{ffee}]{1,100}\t[A-Za-z0-9]{5,100}\t.*\n//g" ./schema/moran_fixed_simp.dict.yaml
cd ./tools-additional
# 生成繁體霧凇
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/ext.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_ext.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/8105.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_8105.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/41448.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_41448.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/base.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_base.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/ext.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_ext.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/others.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_others.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -t -i ../rime-ice/cn_dicts/tencent.dict.yaml -o ../xhupkai-cht/ice-dicts/xhupkai_zrmdb_tencent.dict.yaml
# 生成簡體霧凇
# python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/ext.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_ext.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/8105.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_8105.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/41448.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_41448.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/base.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_base.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/ext.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_ext.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/others.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_others.dict.yaml
python3 gen_dict_with_shape.py -p xhupkai -x zrmdb -s -i ../rime-ice/cn_dicts/tencent.dict.yaml -o ../xhupkai-chs/ice-dicts/xhupkai_zrmdb_tencent.dict.yaml
cd ..
# 生成ocz
cp ./rime-radical-pinyin/radical.schema.yaml ./xhupkai-cht
cp ./rime-radical-pinyin/radical_flypy.dict.yaml ./xhupkai-cht
# cp ./rime-radical-pinyin/radical_flypy.dict.yaml ./xhupkai-cht
# sed '/\.\.\./q' ./xhupkai-cht/radical_flypy.dict.yaml > ./xhupkai-cht/radical_flypy.dict.yaml.bak
# python3 ./tools-additional/prepare_chaizi.py -i ./chaizi-re/radical.yaml -o temp.txt -c ./xhupkai-cht/moran.chars.dict.yaml
# echo "" >> ./xhupkai-cht/radical_flypy.dict.yaml.bak
# cat temp.txt >> ./xhupkai-cht/radical_flypy.dict.yaml.bak
cp ./rime-radical-pinyin/radical.schema.yaml ./xhupkai-chs
cp ./rime-radical-pinyin/radical_flypy.dict.yaml ./xhupkai-chs
rm -f temp.txt
rm -f ./xhupkai-cht/temp.txt
rm -f ./xhupkai-chs/temp.txt
echo xhupkai繁體設定檔...
cd xhupkai-cht
cp recipe.yaml recipe.yaml.bak
sed -i "s/^\( zrlf\*\)$/\1\n radical*/g" ./recipe.yaml
rm recipe.yaml.bak
cp moran.extended.dict.yaml moran.extended.dict.yaml.bak
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_8105 # 8105字表\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_41448 # 41448字表\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_base # 基础词库\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_ext # 扩展词库\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ # - ice-dicts\/xhupkai_zrmdb_tencent # 腾讯词向量(大词库,部署时间较长)\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ # - ice-dicts\/xhupkai_zrmdb_others # 一些杂项 容错音和错字 可以不开\n\1/g" ./moran.extended.dict.yaml
rm moran.extended.dict.yaml.bak
cp moran.schema.yaml xhupkai.schema.yaml
sed -i "s/^ schema_id: moran$/ schema_id: xhupkai/g" ./xhupkai.schema.yaml
sed -i "s/^ name: 魔然$/ name: xhupkai/g" ./xhupkai.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai.schema.yaml
sed -i "s/^ 爲傳承字設計的自然碼及輔助碼智能整句輸入方案。$/ xhupkai = moran + xhup + moranshape + ice/g" ./xhupkai.schema.yaml
sed -i "s/^ - moran_fixed$/ - xhupkai_fixed/g" ./xhupkai.schema.yaml
sed -i "s/^ - moran_sentence$/ - xhupkai_sentence/g" ./xhupkai.schema.yaml
sed -i "s/^\( - zrlf\)$/\1\n - radical/g" ./xhupkai.schema.yaml
sed -i "s/^\( - reverse_lookup_translator@reverse_zrlf\)$/\1\n - reverse_lookup_translator@reverse_radical/g" ./xhupkai.schema.yaml
sed -i "s/^\(reverse_lookup:\)$/reverse_radical:\n tag: reverse_radical\n dictionary: radical_flypy\n enable_completion: true\n prefix: \"ocz\"\n tips: 〔拆字〕\n __include: reverse_format\n\n\1/g" ./xhupkai.schema.yaml
sed -i "s/^\( - reverse_zrlf\)$/\1\n - reverse_radical/g" ./xhupkai.schema.yaml
sed -i "s/^\( reverse_zrlf: \"\^olf\[A-Za-z\]\*\$\"\)$/\1\n reverse_radical: \"^ocz[A-Za-z]*$\"/g" ./xhupkai.schema.yaml
sed -i 's/\( - xform\/^o(lf\)/\1|cz/g' ./xhupkai.schema.yaml
sed -i "s/^ enable_quick_code_hint: false$/ enable_quick_code_hint: true/g" ./xhupkai.schema.yaml
# sed -i "s/ alphabet: abcdefghijklmnopqrstuvwxyz/ alphabet: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/g" ./xhupkai.schema.yaml
# sed -i "s/\( - moran:\/key_bindings\/moran_capital_for_last_syllable\)/#\1/g" ./xhupkai.schema.yaml
cp moran_aux.schema.yaml xhupkai_aux.schema.yaml
sed -i "s/^ schema_id: moran_aux$/ schema_id: xhupkai_aux/g" ./xhupkai_aux.schema.yaml
sed -i "s/^ name: 魔然·輔篩$/ name: xhupkai輔篩/g" ./xhupkai_aux.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_aux.schema.yaml
sed -i "s/^ 在輸入完畢雙拼碼後,可以輸入輔助碼篩選候選項,與「魔然」方案不同。$/ 在輸入完畢雙拼碼後,可以輸入輔助碼篩選候選項,與「xhupkai」方案不同。/g" ./xhupkai_aux.schema.yaml
# cp moran_bj.schema.yaml xhupkai_bj.schema.yaml
# sed -i "s/^ schema_id: moran_bj$/ schema_id: xhupkai_bj/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ name: 魔然·並擊G$/ name: xhupkai並擊/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ 爲傳承字設計的自然碼及輔助碼智能整句輸入方案。$/ xhupkai = moran + xhup + moranshape + ice/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ - moran_fixed$/ - xhupkai_fixed/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ - moran_sentence$/ - xhupkai_sentence/g" ./xhupkai_bj.schema.yaml
cp moran_fixed.schema.yaml xhupkai_fixed.schema.yaml
sed -i "s/^ schema_id: moran_fixed$/ schema_id: xhupkai_fixed/g" ./xhupkai_fixed.schema.yaml
sed -i "s/^ name: 魔然·字詞$/ name: xhupkai字詞/g" ./xhupkai_fixed.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_fixed.schema.yaml
cp moran_sentence.schema.yaml xhupkai_sentence.schema.yaml
sed -i "s/^ schema_id: moran_sentence$/ schema_id: xhupkai_sentence/g" ./xhupkai_sentence.schema.yaml
sed -i "s/^ name: 魔然·整句$/ name: xhupkai整句/g" ./xhupkai_sentence.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_sentence.schema.yaml
cd ..
echo xhupkai简体設定檔...
cd xhupkai-chs
cp recipe.yaml recipe.yaml.bak
sed -i "s/^\( zrlf\*\)$/\1\n radical*/g" ./recipe.yaml
rm recipe.yaml.bak
cp moran.extended.dict.yaml moran.extended.dict.yaml.bak
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_8105 # 8105字表\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_41448 # 41448字表\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_base # 基础词库\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ - ice-dicts\/xhupkai_zrmdb_ext # 扩展词库\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ # - ice-dicts\/xhupkai_zrmdb_tencent # 腾讯词向量(大词库,部署时间较长)\n\1/g" ./moran.extended.dict.yaml
sed -i "s/\( - moran\.base \)/ # - ice-dicts\/xhupkai_zrmdb_others # 一些杂项 容错音和错字 可以不开\n\1/g" ./moran.extended.dict.yaml
rm moran.extended.dict.yaml.bak
cp moran.schema.yaml xhupkai.schema.yaml
sed -i "s/^ schema_id: moran$/ schema_id: xhupkai/g" ./xhupkai.schema.yaml
sed -i "s/^ name: 魔然$/ name: xhupkai/g" ./xhupkai.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai.schema.yaml
sed -i "s/^ 爲傳承字設計的自然碼及輔助碼智能整句輸入方案。$/ xhupkai = moran + xhup + moranshape + ice/g" ./xhupkai.schema.yaml
sed -i "s/^ - moran_fixed$/ - xhupkai_fixed/g" ./xhupkai.schema.yaml
sed -i "s/^ - moran_sentence$/ - xhupkai_sentence/g" ./xhupkai.schema.yaml
sed -i "s/^\( - zrlf\)$/\1\n - radical/g" ./xhupkai.schema.yaml
sed -i "s/^\( - reverse_lookup_translator@reverse_zrlf\)$/\1\n - reverse_lookup_translator@reverse_radical/g" ./xhupkai.schema.yaml
sed -i "s/^\(reverse_lookup:\)$/reverse_radical:\n tag: reverse_radical\n dictionary: radical_flypy\n enable_completion: true\n prefix: \"ocz\"\n tips: 〔拆字〕\n __include: reverse_format\n\n\1/g" ./xhupkai.schema.yaml
sed -i "s/^\( - reverse_zrlf\)$/\1\n - reverse_radical/g" ./xhupkai.schema.yaml
sed -i "s/^\( reverse_zrlf: \"\^olf\[A-Za-z\]\*\$\"\)$/\1\n reverse_radical: \"^ocz[A-Za-z]*$\"/g" ./xhupkai.schema.yaml
sed -i 's/\( - xform\/^o(lf\)/\1|cz/g' ./xhupkai.schema.yaml
sed -i "s/^ enable_quick_code_hint: false$/ enable_quick_code_hint: true/g" ./xhupkai.schema.yaml
# sed -i "s/ alphabet: abcdefghijklmnopqrstuvwxyz/ alphabet: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/g" ./xhupkai.schema.yaml
# sed -i "s/\( - moran:\/key_bindings\/moran_capital_for_last_syllable\)/#\1/g" ./xhupkai.schema.yaml
cp moran_aux.schema.yaml xhupkai_aux.schema.yaml
sed -i "s/^ schema_id: moran_aux$/ schema_id: xhupkai_aux/g" ./xhupkai_aux.schema.yaml
sed -i "s/^ name: 魔然·輔篩$/ name: xhupkai輔篩/g" ./xhupkai_aux.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_aux.schema.yaml
sed -i "s/^ 在輸入完畢雙拼碼後,可以輸入輔助碼篩選候選項,與「魔然」方案不同。$/ 在輸入完畢雙拼碼後,可以輸入輔助碼篩選候選項,與「xhupkai」方案不同。/g" ./xhupkai_aux.schema.yaml
# cp moran_bj.schema.yaml xhupkai_bj.schema.yaml
# sed -i "s/^ schema_id: moran_bj$/ schema_id: xhupkai_bj/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ name: 魔然·並擊G$/ name: xhupkai並擊/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ 爲傳承字設計的自然碼及輔助碼智能整句輸入方案。$/ xhupkai = moran + xhup + moranshape + ice/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ - moran_fixed$/ - xhupkai_fixed/g" ./xhupkai_bj.schema.yaml
# sed -i "s/^ - moran_sentence$/ - xhupkai_sentence/g" ./xhupkai_bj.schema.yaml
cp moran_fixed.schema.yaml xhupkai_fixed.schema.yaml
sed -i "s/^ schema_id: moran_fixed$/ schema_id: xhupkai_fixed/g" ./xhupkai_fixed.schema.yaml
sed -i "s/^ name: 魔然·字詞$/ name: xhupkai字詞/g" ./xhupkai_fixed.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_fixed.schema.yaml
cp moran_sentence.schema.yaml xhupkai_sentence.schema.yaml
sed -i "s/^ schema_id: moran_sentence$/ schema_id: xhupkai_sentence/g" ./xhupkai_sentence.schema.yaml
sed -i "s/^ name: 魔然·整句$/ name: xhupkai整句/g" ./xhupkai_sentence.schema.yaml
sed -i "s/^\( - 方案製作:ksqsf\)$/\1\n - Integrator:jack2game/g" ./xhupkai_sentence.schema.yaml
cd ..