summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pinyin.h2
-rw-r--r--src/storage/Makefile.am2
-rw-r--r--src/storage/chewing_custom.h0
-rw-r--r--src/storage/pinyin_custom.h10
-rw-r--r--src/storage/pinyin_custom2.h68
5 files changed, 70 insertions, 12 deletions
diff --git a/src/pinyin.h b/src/pinyin.h
index ec5b141..339e9a3 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -28,7 +28,7 @@
#include "pinyin_custom.h"
#include "pinyin_base.h"
#include "chewing_key.h"
-#include "chewing_custom.h"
+#include "pinyin_custom2.h"
using namespace pinyin;
diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am
index 5ea8c19..ce397ef 100644
--- a/src/storage/Makefile.am
+++ b/src/storage/Makefile.am
@@ -24,7 +24,7 @@ libpinyinincludedir = $(includedir)/libpinyin-@LIBPINYIN_BINARY_VERSION@
libpinyininclude_HEADERS= pinyin_custom.h \
pinyin_base.h \
chewing_key.h \
- chewing_custom.h
+ pinyin_custom2.h
noinst_HEADERS = pinyin_large_table.h \
pinyin_phrase.h \
diff --git a/src/storage/chewing_custom.h b/src/storage/chewing_custom.h
deleted file mode 100644
index e69de29..0000000
--- a/src/storage/chewing_custom.h
+++ /dev/null
diff --git a/src/storage/pinyin_custom.h b/src/storage/pinyin_custom.h
index 84185a3..c5f339a 100644
--- a/src/storage/pinyin_custom.h
+++ b/src/storage/pinyin_custom.h
@@ -67,16 +67,6 @@ enum PinyinAmbiguity
enum PinyinCorrection{
PINYIN_CorrectAny = 0,
-#if 0
- PINYIN_CorrectZeroInitial,
- PINYIN_CorrectGNtoNG,
- PINYIN_CorrectMGtoNG,
- PINYIN_CorrectIOUtoIU,
- PINYIN_CorrectUEItoUI,
- PINYIN_CorrectUENtoUN,
- PINYIN_CorrectUEtoVE,
- PINYIN_CorrectONtoONG,
-#endif
PINYIN_CorrectVtoU,
PINYIN_CorrectLast = PINYIN_CorrectVtoU,
};
diff --git a/src/storage/pinyin_custom2.h b/src/storage/pinyin_custom2.h
new file mode 100644
index 0000000..5ca796d
--- /dev/null
+++ b/src/storage/pinyin_custom2.h
@@ -0,0 +1,68 @@
+/*
+ * libpinyin
+ * Library to deal with pinyin.
+ *
+ * Copyright (C) 2011 Peng Wu <alexepico@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef CHEWING_CUSTOM_H
+#define CHEWING_CUSTOM_H
+
+namespace pinyin{
+
+
+/**
+ * @brief enums of pinyin ambiguities.
+ *
+ * Some pinyin element maybe confused by somebody,
+ * We allow these ambiguities.
+ */
+enum PinyinAmbiguityBeta{
+ PINYIN_AMB_ANY = 0,
+ PINYIN_AMB_C_Ch,
+ PINYIN_AMB_Z_Zh,
+ PINYIN_AMB_S_Sh,
+ PINYIN_AMB_L_N ,
+ PINYIN_AMB_F_H ,
+ PINYIN_AMB_L_R ,
+ PINYIN_AMB_K_G ,
+ PINYIN_AMB_AN_ANG,
+ PINYIN_AMB_EN_ENG,
+ PINYIN_AMB_IN_ING,
+ PINYIN_AMB_LAST = PINYIN_AMB_IN_ING
+};
+
+/**
+ * @brief enums of pinyin corrections.
+ */
+
+enum PinyinCorrectionBeta{
+ PINYIN_CORRECT_ANY = 0,
+ PINYIN_CORRECT_GN_NG,
+ PINYIN_CORRECT_MG_NG,
+ PINYIN_CORRECT_IOU_IU,
+ PINYIN_CORRECT_UEI_UI,
+ PINYIN_CORRECT_UEN_UN,
+ PINYIN_CORRECT_UE_VE,
+ PINYIN_CORRECT_V_U,
+ PINYIN_CORRECT_ON_ONG,
+ PINYIN_CORRECT_LAST = PINYIN_CORRECT_ON_ONG,
+};
+
+};
+
+#endif