summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/storage/export_interpolation.cpp4
-rw-r--r--utils/storage/gen_binary_files.cpp6
-rw-r--r--utils/storage/import_interpolation.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/utils/storage/export_interpolation.cpp b/utils/storage/export_interpolation.cpp
index 795b21d..99c76aa 100644
--- a/utils/storage/export_interpolation.cpp
+++ b/utils/storage/export_interpolation.cpp
@@ -43,11 +43,11 @@ bool end_data(FILE * output){
int main(int argc, char * argv[]){
FILE * output = stdout;
- const char * bigram_filename = "bigram.db";
+ const char * bigram_filename = SYSTEM_BIGRAM;
SystemTableInfo system_table_info;
- bool retval = system_table_info.load("table.conf");
+ bool retval = system_table_info.load(SYSTEM_TABLE_INFO);
if (!retval) {
fprintf(stderr, "load table.conf failed.\n");
exit(ENOENT);
diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp
index 9d5a340..4216b44 100644
--- a/utils/storage/gen_binary_files.cpp
+++ b/utils/storage/gen_binary_files.cpp
@@ -47,7 +47,7 @@ int main(int argc, char * argv[]){
SystemTableInfo system_table_info;
- gchar * filename = g_build_filename(table_dir, "table.conf", NULL);
+ gchar * filename = g_build_filename(table_dir, SYSTEM_TABLE_INFO, NULL);
bool retval = system_table_info.load(filename);
if (!retval) {
fprintf(stderr, "load table.conf failed.\n");
@@ -95,12 +95,12 @@ int main(int argc, char * argv[]){
MemoryChunk * new_chunk = new MemoryChunk;
chewing_table.store(new_chunk);
- new_chunk->save("pinyin_index.bin");
+ new_chunk->save(SYSTEM_PINYIN_INDEX);
chewing_table.load(new_chunk);
new_chunk = new MemoryChunk;
phrase_table.store(new_chunk);
- new_chunk->save("phrase_index.bin");
+ new_chunk->save(SYSTEM_PHRASE_INDEX);
phrase_table.load(new_chunk);
phrase_index.compact();
diff --git a/utils/storage/import_interpolation.cpp b/utils/storage/import_interpolation.cpp
index 5a0030e..d1d60e2 100644
--- a/utils/storage/import_interpolation.cpp
+++ b/utils/storage/import_interpolation.cpp
@@ -233,7 +233,7 @@ bool parse_bigram(FILE * input, PhraseLargeTable2 * phrase_table,
int main(int argc, char * argv[]){
FILE * input = stdin;
- const char * bigram_filename = "bigram.db";
+ const char * bigram_filename = SYSTEM_BIGRAM;
setlocale(LC_ALL, "");
@@ -249,7 +249,7 @@ int main(int argc, char * argv[]){
SystemTableInfo system_table_info;
- gchar * filename = g_build_filename(table_dir, "table.conf", NULL);
+ gchar * filename = g_build_filename(table_dir, SYSTEM_TABLE_INFO, NULL);
bool retval = system_table_info.load(filename);
if (!retval) {
fprintf(stderr, "load table.conf failed.\n");
@@ -260,7 +260,7 @@ int main(int argc, char * argv[]){
PhraseLargeTable2 phrase_table;
MemoryChunk * chunk = new MemoryChunk;
- retval = chunk->load("phrase_index.bin");
+ retval = chunk->load(SYSTEM_PHRASE_INDEX);
if (!retval) {
fprintf(stderr, "open phrase_index.bin failed!\n");
exit(ENOENT);