fixes phrase_index.h
[platform/upstream/libpinyin.git] / src / storage / pinyin_custom2.h
1 /* 
2  *  libpinyin
3  *  Library to deal with pinyin.
4  *  
5  *  Copyright (C) 2011 Peng Wu <alexepico@gmail.com>
6  *  
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  * 
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *  
17  *  You should have received a copy of the GNU General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21
22 #ifndef PINYIN_CUSTOM2_H
23 #define PINYIN_CUSTOM2_H
24
25 namespace pinyin{
26
27 /**
28  * PinyinTableFlag:
29  */
30 enum PinyinTableFlag{
31     IS_CHEWING = 1U << 1,
32     IS_PINYIN = 1U << 2,
33     PINYIN_INCOMPLETE = 1U << 3,
34     CHEWING_INCOMPLETE = 1U << 4,
35     USE_TONE = 1U << 5,
36     USE_DIVIDED_TABLE = 1U << 6,
37     USE_RESPLIT_TABLE = 1U << 7,
38     DYNAMIC_ADJUST = 1U << 8
39 };
40
41 /**
42  * PinyinAmbiguity2:
43  *
44  * The enums of pinyin ambiguities.
45  *
46  */
47 enum PinyinAmbiguity2{
48     PINYIN_AMB_C_CH = 1U << 9,
49     PINYIN_AMB_S_SH = 1U << 10,
50     PINYIN_AMB_Z_ZH = 1U << 11,
51     PINYIN_AMB_F_H = 1U << 12,
52     PINYIN_AMB_G_K = 1U << 13,
53     PINYIN_AMB_L_N = 1U << 14,
54     PINYIN_AMB_L_R = 1U << 15,
55     PINYIN_AMB_AN_ANG = 1U << 16,
56     PINYIN_AMB_EN_ENG = 1U << 17,
57     PINYIN_AMB_IN_ING = 1U << 18,
58     PINYIN_AMB_ALL = 0x3FFU << 9
59 };
60
61 /**
62  * PinyinCorrection2:
63  *
64  * The enums of pinyin corrections.
65  *
66  */
67
68 enum PinyinCorrection2{
69     PINYIN_CORRECT_GN_NG = 1U << 21,
70     PINYIN_CORRECT_MG_NG = 1U << 22,
71     PINYIN_CORRECT_IOU_IU = 1U << 23,
72     PINYIN_CORRECT_UEI_UI = 1U << 24,
73     PINYIN_CORRECT_UEN_UN = 1U << 25,
74     PINYIN_CORRECT_UE_VE = 1U << 26,
75     PINYIN_CORRECT_V_U = 1U << 27,
76     PINYIN_CORRECT_ON_ONG = 1U << 28,
77     PINYIN_CORRECT_ALL = 0xFFU << 21
78 };
79
80 };
81
82 #endif