summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-10 13:52:04 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-10 13:52:04 +0800
commit22149d09c7352bb88c1bd291f548c02b0454e7a2 (patch)
tree764f115422897f725fbc6a6890e5e1c80bc05038
parent521123fdad1ff3dac8313eaf6630a0ad3bd699b5 (diff)
downloadlibpinyin-22149d09c7352bb88c1bd291f548c02b0454e7a2.tar.gz
libpinyin-22149d09c7352bb88c1bd291f548c02b0454e7a2.tar.xz
libpinyin-22149d09c7352bb88c1bd291f548c02b0454e7a2.zip
add phonetic_key_matrix.cpp
-rw-r--r--src/storage/Makefile.am1
-rw-r--r--src/storage/phonetic_key_matrix.cpp27
-rw-r--r--src/storage/phonetic_key_matrix.h5
3 files changed, 33 insertions, 0 deletions
diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am
index e897f84..1ad71ed 100644
--- a/src/storage/Makefile.am
+++ b/src/storage/Makefile.am
@@ -75,6 +75,7 @@ libstorage_la_SOURCES = phrase_index.cpp \
chewing_key.cpp \
pinyin_parser2.cpp \
zhuyin_parser2.cpp \
+ phonetic_key_matrix.cpp \
chewing_large_table.cpp \
chewing_large_table2.cpp \
table_info.cpp
diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp
new file mode 100644
index 0000000..954488e
--- /dev/null
+++ b/src/storage/phonetic_key_matrix.cpp
@@ -0,0 +1,27 @@
+/*
+ * libpinyin
+ * Library to deal with pinyin.
+ *
+ * Copyright (C) 2016 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.
+ */
+
+#include "phonetic_key_matrix.h"
+
+bool fill_phonetic_key_matrix_from_chewing_keys(PhoneticKeyMatrix * matrix,
+ ChewingKeyVector * keys,
+ ChewingKeyRestVector * key_rests);
+
diff --git a/src/storage/phonetic_key_matrix.h b/src/storage/phonetic_key_matrix.h
index d5a3553..f28848b 100644
--- a/src/storage/phonetic_key_matrix.h
+++ b/src/storage/phonetic_key_matrix.h
@@ -22,6 +22,7 @@
#ifndef PHONETIC_KEY_MATRIX_H
#define PHONETIC_KEY_MATRIX_H
+#include "novel_types.h"
#include "chewing_key.h"
namespace pinyin {
@@ -110,6 +111,10 @@ public:
};
+bool fill_phonetic_key_matrix_from_chewing_keys(PhoneticKeyMatrix * matrix,
+ ChewingKeyVector * keys,
+ ChewingKeyRestVector * key_rests);
+
};
#endif