diff options
author | Peng Wu <alexepico@gmail.com> | 2012-09-03 16:27:03 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-09-03 16:27:03 +0800 |
commit | c0f98a953be642a17d97caef95b92ee479353c94 (patch) | |
tree | da93db4d46be4ce85565dd300f7f81f343096d1d /utils/storage | |
parent | dd053f6ea1dafd6cec9d9d5a011bba5ef8d50dfc (diff) | |
download | libpinyin-c0f98a953be642a17d97caef95b92ee479353c94.tar.gz libpinyin-c0f98a953be642a17d97caef95b92ee479353c94.tar.xz libpinyin-c0f98a953be642a17d97caef95b92ee479353c94.zip |
polish gen_binary_files.cpp
Diffstat (limited to 'utils/storage')
-rw-r--r-- | utils/storage/gen_binary_files.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp index 232e57f..03449a2 100644 --- a/utils/storage/gen_binary_files.cpp +++ b/utils/storage/gen_binary_files.cpp @@ -49,8 +49,8 @@ int main(int argc, char * argv[]){ /* generate pinyin index*/ pinyin_option_t options = USE_TONE; - ChewingLargeTable chewinglargetable(options); - PhraseLargeTable2 phraselargetable; + ChewingLargeTable chewing_table(options); + PhraseLargeTable2 phrase_table; /* generate phrase index */ FacadePhraseIndex phrase_index; @@ -70,9 +70,9 @@ int main(int argc, char * argv[]){ exit(ENOENT); } - chewinglargetable.load_text(tablefile); + chewing_table.load_text(tablefile); fseek(tablefile, 0L, SEEK_SET); - phraselargetable.load_text(tablefile); + phrase_table.load_text(tablefile); fseek(tablefile, 0L, SEEK_SET); phrase_index.load_text(i, tablefile); fclose(tablefile); @@ -80,14 +80,14 @@ int main(int argc, char * argv[]){ } MemoryChunk * new_chunk = new MemoryChunk; - chewinglargetable.store(new_chunk); + chewing_table.store(new_chunk); new_chunk->save("pinyin_index.bin"); - chewinglargetable.load(new_chunk); + chewing_table.load(new_chunk); new_chunk = new MemoryChunk; - phraselargetable.store(new_chunk); + phrase_table.store(new_chunk); new_chunk->save("phrase_index.bin"); - phraselargetable.load(new_chunk); + phrase_table.load(new_chunk); phrase_index.compact(); |