0
|
1 /*
|
|
2 * $Id: py_table.c,v 1.4 2005/04/10 15:26:37 aonoto Exp $
|
|
3 */
|
|
4
|
|
5 /*
|
|
6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
|
7 * This file is part of FreeWnn.
|
|
8 *
|
|
9 * Copyright Kyoto University Research Institute for Mathematical Sciences
|
|
10 * 1987, 1988, 1989, 1990, 1991, 1992
|
|
11 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
|
12 * Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
|
|
13 * Copyright FreeWnn Project 1999, 2000
|
|
14 *
|
|
15 * Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
|
|
16 *
|
|
17 * This library is free software; you can redistribute it and/or
|
|
18 * modify it under the terms of the GNU Lesser General Public
|
|
19 * License as published by the Free Software Foundation; either
|
|
20 * version 2 of the License, or (at your option) any later version.
|
|
21 *
|
|
22 * This library is distributed in the hope that it will be useful,
|
|
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
25 * Lesser General Public License for more details.
|
|
26 *
|
|
27 * You should have received a copy of the GNU Lesser General Public
|
|
28 * License along with this library; if not, write to the
|
|
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
30 * Boston, MA 02111-1307, USA.
|
|
31 */
|
|
32
|
|
33 /** cWnn Version 1.1 **/
|
|
34
|
|
35 #include <ctype.h>
|
|
36 #include "commonhd.h"
|
|
37 #ifdef CHINESE
|
|
38 #include "cplib.h"
|
|
39
|
|
40 /* pyshengmu_tbl[]: ShengMu table of Chinese PinYin */
|
|
41 char *py_shengmu_tbl[PY_NUM_SHENGMU] = {
|
|
42
|
|
43 "", "B", "C", "Ch", "D",
|
|
44 "F", "G", "H", "J", "K",
|
|
45 "L", "M", "N", "P", "Q",
|
|
46 "R", "S", "Sh", "T", "W",
|
|
47 "X", "Y", "Z", "Zh"
|
|
48 };
|
|
49
|
|
50 /* py_yunmu_tbl[]: YunMu table of Chinese ZhuYin */
|
|
51 char *py_yunmu_tbl[PY_NUM_YUNMU * 5] = {
|
|
52
|
|
53 "実", "実", "実", "実", "実",
|
|
54 "a実", "治実", "爾実", "璽実", "痔実",
|
|
55 "ai実", "治i実", "爾i実", "璽i実", "痔i実",
|
|
56 "an実", "治n実", "爾n実", "璽n実", "痔n実",
|
|
57 "ang実", "治ng実", "爾ng実", "璽ng実", "痔ng実",
|
|
58 "ao実", "治o実", "爾o実", "璽o実", "痔o実",
|
|
59 "e実", "磁実", "示実", "而実", "耳実",
|
|
60 "ei実", "磁i実", "示i実", "而i実", "耳i実",
|
|
61 "en実", "磁n実", "示n実", "而n実", "耳n実",
|
|
62 "eng実", "磁ng実", "示ng実", "而ng実", "耳ng実",
|
|
63 "er実", "磁r実", "示r実", "而r実", "耳r実",
|
|
64 "i実", "自実", "蒔実", "辞実", "汐実",
|
|
65 "ia実", "i治実", "i爾実", "i璽実", "i痔実",
|
|
66 "ian実", "i治n実", "i爾n実", "i璽n実", "i痔n実",
|
|
67 "iang実", "i治ng実", "i爾ng実", "i璽ng実", "i痔ng実",
|
|
68 "iao実", "i治o実", "i爾o実", "i璽o実", "i痔o実",
|
|
69 "ie実", "i磁実", "i示実", "i而実", "i耳実",
|
|
70 "in実", "自n実", "蒔n実", "辞n実", "汐n実",
|
|
71 "ing実", "自ng実", "蒔ng実", "辞ng実", "汐ng実",
|
|
72 "iong実", "i鹿ng実", "i式ng実", "i識ng実", "i鴫ng実",
|
|
73 "iu実", "i竺実", "i軸実", "i宍実", "i雫実",
|
|
74 "m実", "m実", "m実", "m実", "m実",
|
|
75 "n実", "n実", "漆実", "疾実", "質実",
|
|
76 "ng実", "ng実", "ng実", "ng実", "ng実",
|
|
77 "o実", "鹿実", "式実", "識実", "鴫実",
|
|
78 "ong実", "鹿ng実", "式ng実", "識ng実", "鴫ng実",
|
|
79 "ou実", "鹿u実", "式u実", "識u実", "鴫u実",
|
|
80 "u実", "竺実", "軸実", "宍実", "雫実",
|
|
81 "ua実", "u治実", "u爾実", "u璽実", "u痔実",
|
|
82 "uai実", "u治i実", "u爾i実", "u璽i実", "u痔i実",
|
|
83 "uan実", "u治n実", "u爾n実", "u璽n実", "u痔n実",
|
|
84 "uang実", "u治ng実", "u爾ng実", "u璽ng実", "u痔ng実",
|
|
85 "ue実", "u磁実", "u示実", "u而実", "u耳実",
|
|
86 "ui実", "u自実", "u蒔実", "u辞実", "u汐実",
|
|
87 "un実", "竺n実", "軸n実", "宍n実", "雫n実",
|
|
88 "uo実", "u鹿実", "u式実", "u識実", "u鴫実",
|
|
89 "嫉実", "七実", "叱実", "執実", "失実",
|
|
90 "嫉e実", "嫉磁実", "嫉示実", "嫉而実", "嫉耳実",
|
|
91 "0実", "1実", "2実", "3実", "4実", /* for undefinited YunMu */
|
|
92 };
|
|
93
|
|
94
|
|
95 /* pinyin_tbl: size is NUM_SHENGMU*NUM_YUNMU, including empty ShengMu */
|
|
96 /* and empty YunMu , and undefinited YunMu'-' */
|
|
97
|
|
98 int pinyin_tbl[PY_NUM_SHENGMU * PY_NUM_YUNMU] = {
|
|
99
|
|
100 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
101 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
|
102 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
|
103 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0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