refine utils/segment
authorPeng Wu <alexepico@gmail.com>
Sat, 6 Aug 2011 06:47:22 +0000 (14:47 +0800)
committerPeng Wu <alexepico@gmail.com>
Sat, 6 Aug 2011 06:47:22 +0000 (14:47 +0800)
utils/segment/ngseg.cpp
utils/segment/spseg.cpp

index ff11681..fdea69c 100644 (file)
@@ -111,21 +111,21 @@ int main(int argc, char * argv[]){
     //init phrase table
     PhraseLargeTable phrase_table;
     MemoryChunk * chunk = new MemoryChunk;
-    chunk->load("../../data/phrase_index.bin");
+    chunk->load("phrase_index.bin");
     phrase_table.load(chunk);
 
     //init phrase index
     FacadePhraseIndex phrase_index;
     chunk = new MemoryChunk;
-    chunk->load("../../data/gb_char.bin");
+    chunk->load("gb_char.bin");
     phrase_index.load(1, chunk);
     chunk = new MemoryChunk;
-    chunk->load("../../data/gbk_char.bin");
+    chunk->load("gbk_char.bin");
     phrase_index.load(2, chunk);
 
     //init bi-gram
     Bigram system_bigram;
-    system_bigram.attach("../../data/bigram.db", ATTACH_READONLY);
+    system_bigram.attach("bigram.db", ATTACH_READONLY);
     Bigram user_bigram;
 
     //init phrase lookup
index cec5ba2..3a5b188 100644 (file)
@@ -152,7 +152,7 @@ int main(int argc, char * argv[]){
 
     //init phrase table
     g_phrases = new PhraseLargeTable;
-    FILE * gb_file = fopen("../../data/gb_char.table", "r");
+    FILE * gb_file = fopen("gb_char.table", "r");
     if ( gb_file == NULL ){
        fprintf(stderr, "can't open gb_char.table!\n");
        exit(ENOENT);
@@ -160,7 +160,7 @@ int main(int argc, char * argv[]){
     g_phrases->load_text(gb_file);
     fclose(gb_file);
 
-    FILE * gbk_file = fopen("../../data/gbk_char.table", "r");
+    FILE * gbk_file = fopen("gbk_char.table", "r");
     if ( gbk_file == NULL ){
        fprintf(stderr, "can't open gbk_char.table!\n");
        exit(ENOENT);