diff options
-rw-r--r-- | scripts/pinyin_parser_table.h.in | 10 | ||||
-rw-r--r-- | src/pinyin.h | 2 | ||||
-rw-r--r-- | src/storage/Makefile.am | 6 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 24 |
4 files changed, 38 insertions, 4 deletions
diff --git a/scripts/pinyin_parser_table.h.in b/scripts/pinyin_parser_table.h.in index 8bb7bb8..efd27cd 100644 --- a/scripts/pinyin_parser_table.h.in +++ b/scripts/pinyin_parser_table.h.in @@ -4,14 +4,24 @@ #ifndef PINYIN_PARSER_TABLE_H #define PINYIN_PARSER_TABLE_H +const pinyin_index_item_t pinyin_index[] = { @PINYIN_INDEX@ +}; +const chewing_index_item_t chewing_index[] = { @BOPOMOFO_INDEX@ +}; +const content_table_item_t content_table[] = { @CONTENT_TABLE@ +}; +const divided_table_item_t divided_table[] = { @DIVIDED_TABLE@ +}; +const resplit_table_item_t resplit_table[] = { @RESPLIT_TABLE@ +}; #endif diff --git a/src/pinyin.h b/src/pinyin.h index 339e9a3..5820532 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -27,8 +27,6 @@ #include "novel_types.h" #include "pinyin_custom.h" #include "pinyin_base.h" -#include "chewing_key.h" -#include "pinyin_custom2.h" using namespace pinyin; diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am index ce397ef..f1f8329 100644 --- a/src/storage/Makefile.am +++ b/src/storage/Makefile.am @@ -34,7 +34,8 @@ noinst_HEADERS = pinyin_large_table.h \ phrase_large_table.h \ ngram.h \ flexible_ngram.h \ - tag_utility.h + tag_utility.h \ + pinyin_parser_table.h noinst_LTLIBRARIES = libstorage.la @@ -48,5 +49,6 @@ libstorage_la_SOURCES = pinyin_base.cpp \ phrase_index.cpp \ phrase_large_table.cpp \ ngram.cpp \ - tag_utility.cpp + tag_utility.cpp \ + pinyin_parser2.cpp diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp new file mode 100644 index 0000000..7553ef6 --- /dev/null +++ b/src/storage/pinyin_parser2.cpp @@ -0,0 +1,24 @@ +/* + * 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. + */ + +#include "pinyin_custom2.h" +#include "chewing_key.h" +#include "pinyin_parser_table.h" |