/*
* $Id: py_table.c,v 1.4 2005/04/10 15:26:37 aonoto Exp $
*/
/*
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
* This file is part of FreeWnn.
*
* Copyright Kyoto University Research Institute for Mathematical Sciences
* 1987, 1988, 1989, 1990, 1991, 1992
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
* Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
* Copyright FreeWnn Project 1999, 2000
*
* Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/** cWnn Version 1.1 **/
#include <ctype.h>
#include "commonhd.h"
#ifdef CHINESE
#include "cplib.h"
/* pyshengmu_tbl[]: ShengMu table of Chinese PinYin */
char *py_shengmu_tbl[PY_NUM_SHENGMU] = {
"", "B", "C", "Ch", "D",
"F", "G", "H", "J", "K",
"L", "M", "N", "P", "Q",
"R", "S", "Sh", "T", "W",
"X", "Y", "Z", "Zh"
};
/* py_yunmu_tbl[]: YunMu table of Chinese ZhuYin */
char *py_yunmu_tbl[PY_NUM_YUNMU * 5] = {
"実", "実", "実", "実", "実",
"a実", "治実", "爾実", "璽実", "痔実",
"ai実", "治i実", "爾i実", "璽i実", "痔i実",
"an実", "治n実", "爾n実", "璽n実", "痔n実",
"ang実", "治ng実", "爾ng実", "璽ng実", "痔ng実",
"ao実", "治o実", "爾o実", "璽o実", "痔o実",
"e実", "磁実", "示実", "而実", "耳実",
"ei実", "磁i実", "示i実", "而i実", "耳i実",
"en実", "磁n実", "示n実", "而n実", "耳n実",
"eng実", "磁ng実", "示ng実", "而ng実", "耳ng実",
"er実", "磁r実", "示r実", "而r実", "耳r実",
"i実", "自実", "蒔実", "辞実", "汐実",
"ia実", "i治実", "i爾実", "i璽実", "i痔実",
"ian実", "i治n実", "i爾n実", "i璽n実", "i痔n実",
"iang実", "i治ng実", "i爾ng実", "i璽ng実", "i痔ng実",
"iao実", "i治o実", "i爾o実", "i璽o実", "i痔o実",
"ie実", "i磁実", "i示実", "i而実", "i耳実",
"in実", "自n実", "蒔n実", "辞n実", "汐n実",
"ing実", "自ng実", "蒔ng実", "辞ng実", "汐ng実",
"iong実", "i鹿ng実", "i式ng実", "i識ng実", "i鴫ng実",
"iu実", "i竺実", "i軸実", "i宍実", "i雫実",
"m実", "m実", "m実", "m実", "m実",
"n実", "n実", "漆実", "疾実", "質実",
"ng実", "ng実", "ng実", "ng実", "ng実",
"o実", "鹿実", "式実", "識実", "鴫実",
"ong実", "鹿ng実", "式ng実", "識ng実", "鴫ng実",
"ou実", "鹿u実", "式u実", "識u実", "鴫u実",
"u実", "竺実", "軸実", "宍実", "雫実",
"ua実", "u治実", "u爾実", "u璽実", "u痔実",
"uai実", "u治i実", "u爾i実", "u璽i実", "u痔i実",
"uan実", "u治n実", "u爾n実", "u璽n実", "u痔n実",
"uang実", "u治ng実", "u爾ng実", "u璽ng実", "u痔ng実",
"ue実", "u磁実", "u示実", "u而実", "u耳実",
"ui実", "u自実", "u蒔実", "u辞実", "u汐実",
"un実", "竺n実", "軸n実", "宍n実", "雫n実",
"uo実", "u鹿実", "u式実", "u識実", "u鴫実",
"嫉実", "七実", "叱実", "執実", "失実",
"嫉e実", "嫉磁実", "嫉示実", "嫉而実", "嫉耳実",
"0実", "1実", "2実", "3実", "4実", /* for undefinited YunMu */
};
/* pinyin_tbl: size is NUM_SHENGMU*NUM_YUNMU, including empty ShengMu */
/* and empty YunMu , and undefinited YunMu'-' */
int pinyin_tbl[PY_N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