diff options
author | Peng Wu <alexepico@gmail.com> | 2016-03-30 15:12:11 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-03-30 15:12:11 +0800 |
commit | 43360fcb6129e0c27ed7086b600b8699b8bdbd37 (patch) | |
tree | c686ecc4ed7a170045034fb1cb6f0d4d52b1aa59 /utils/storage/gen_binary_files.cpp | |
parent | 09181e7491bfabbd11ea80633214231404766b22 (diff) | |
download | libpinyin-43360fcb6129e0c27ed7086b600b8699b8bdbd37.tar.gz libpinyin-43360fcb6129e0c27ed7086b600b8699b8bdbd37.tar.xz libpinyin-43360fcb6129e0c27ed7086b600b8699b8bdbd37.zip |
update utils/training in progress
Diffstat (limited to 'utils/storage/gen_binary_files.cpp')
-rw-r--r-- | utils/storage/gen_binary_files.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp index 3937a68..5d7e780 100644 --- a/utils/storage/gen_binary_files.cpp +++ b/utils/storage/gen_binary_files.cpp @@ -38,8 +38,8 @@ bool generate_binary_files(const char * pinyin_table_filename, /* generate pinyin index*/ pinyin_option_t options = USE_TONE; ChewingLargeTable chewing_table(options); - PhraseLargeTable2 phrase_table; - + PhraseLargeTable3 phrase_table; + phrase_table.attach(phrase_table_filename, ATTACH_READWRITE|ATTACH_CREATE); /* generate phrase index */ FacadePhraseIndex phrase_index; @@ -74,11 +74,6 @@ bool generate_binary_files(const char * pinyin_table_filename, chewing_table.store(new_chunk); new_chunk->save(pinyin_table_filename); chewing_table.load(new_chunk); - - new_chunk = new MemoryChunk; - phrase_table.store(new_chunk); - new_chunk->save(phrase_table_filename); - phrase_table.load(new_chunk); phrase_index.compact(); |