begin to write gen double pinyin header
authorPeng Wu <alexepico@gmail.com>
Mon, 21 Nov 2011 06:42:38 +0000 (14:42 +0800)
committerPeng Wu <alexepico@gmail.com>
Mon, 21 Nov 2011 06:42:38 +0000 (14:42 +0800)
scripts/double_pinyin_table.h.in
scripts/gendoublepinyinheader.py [new file with mode: 0644]
src/storage/pinyin_parser2.h

index e2f3fff..7ad1abc 100644 (file)
@@ -1,3 +1,59 @@
 /* This file is generated by python scripts. Don't edit this file directly.
  */
 
+#ifndef DOUBLE_PINYIN_TABLE_H
+#define DOUBLE_PINYIN_TABLE_H
+
+namespace pinyin{
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_mspy_sheng[] = {
+@MSPY_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_mspy_yun[] = {
+@MSPY_YUN@
+};
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_zrm_sheng[] = {
+@ZRM_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_zrm_yun[] = {
+@ZRM_YUN@
+};
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_abc_sheng[] = {
+@ABC_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_abc_yun[] = {
+@ABC_YUN@
+};
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_zgpy_sheng[] = {
+@ZGPY_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_zgpy_yun[] = {
+@ZGPY_YUN@
+};
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_pyjj_sheng[] = {
+@PYJJ_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_pyjj_yun[] = {
+@PYJJ_YUN@
+};
+
+const double_pinyin_scheme_shengmu_item_t double_pinyin_xhe_sheng[] = {
+@XHE_SHENG@
+};
+
+const double_pinyin_scheme_yunmu_item_t double_pinyin_xhe_yun[] = {
+@XHE_YUN@
+};
+
+};
+
+#endif
diff --git a/scripts/gendoublepinyinheader.py b/scripts/gendoublepinyinheader.py
new file mode 100644 (file)
index 0000000..61fb249
--- /dev/null
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# vim:set et sts=4 sw=4:
+#
+# 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+import pinyin
index e0b43ea..a19ddf2 100644 (file)
@@ -60,6 +60,13 @@ typedef struct {
     guint32      m_new_freq;
 } resplit_table_item_t;
 
+typedef struct {
+    const char * m_shengmu;
+} double_pinyin_scheme_shengmu_item_t;
+
+typedef struct {
+    const char * m_yunmus[2];
+} double_pinyin_scheme_yunmu_item_t;
 
 typedef GArray * ChewingKeyVector;
 typedef GArray * ChewingKeyRestVector;