summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/storage/gen_binary_files.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp
index 5d8dfa6..4bca2cb 100644
--- a/utils/storage/gen_binary_files.cpp
+++ b/utils/storage/gen_binary_files.cpp
@@ -47,8 +47,8 @@ int main(int argc, char * argv[]){
}
/* generate pinyin index*/
- PinyinCustomSettings custom;
- PinyinLargeTable pinyinlargetable(&custom);
+ pinyin_option_t options = USE_TONE;
+ ChewingLargeTable chewinglargetable(options);
PhraseLargeTable phraselargetable;
/* generate phrase index */
@@ -63,8 +63,7 @@ int main(int argc, char * argv[]){
exit(ENOENT);
}
- pinyinlargetable.load_text(gbfile);
-
+ chewinglargetable.load_text(gbfile);
fseek(gbfile, 0L, SEEK_SET);
phraselargetable.load_text(gbfile);
fseek(gbfile, 0L, SEEK_SET);
@@ -80,8 +79,7 @@ int main(int argc, char * argv[]){
exit(ENOENT);
}
- pinyinlargetable.load_text(gbkfile);
-
+ chewinglargetable.load_text(gbkfile);
fseek(gbkfile, 0L, SEEK_SET);
phraselargetable.load_text(gbkfile);
fseek(gbkfile, 0L, SEEK_SET);
@@ -89,9 +87,9 @@ int main(int argc, char * argv[]){
fclose(gbkfile);
MemoryChunk * new_chunk = new MemoryChunk;
- pinyinlargetable.store(new_chunk);
+ chewinglargetable.store(new_chunk);
new_chunk->save("pinyin_index.bin");
- pinyinlargetable.load(new_chunk);
+ chewinglargetable.load(new_chunk);
new_chunk = new MemoryChunk;
phraselargetable.store(new_chunk);