summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-08-06 14:47:22 +0800
committerPeng Wu <alexepico@gmail.com>2011-08-06 14:47:22 +0800
commitc0615b9d1e52c985770d2c60c6c8a960ada7a93c (patch)
tree1570012adfcba9906f52bab0b37ab57a53a07e19 /utils
parent6504338199d28764aae9a1cefe2e14cf02d4287e (diff)
downloadlibpinyin-c0615b9d1e52c985770d2c60c6c8a960ada7a93c.tar.gz
libpinyin-c0615b9d1e52c985770d2c60c6c8a960ada7a93c.tar.xz
libpinyin-c0615b9d1e52c985770d2c60c6c8a960ada7a93c.zip
refine utils/segment
Diffstat (limited to 'utils')
-rw-r--r--utils/segment/ngseg.cpp8
-rw-r--r--utils/segment/spseg.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp
index ff11681..fdea69c 100644
--- a/utils/segment/ngseg.cpp
+++ b/utils/segment/ngseg.cpp
@@ -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
diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp
index cec5ba2..3a5b188 100644
--- a/utils/segment/spseg.cpp
+++ b/utils/segment/spseg.cpp
@@ -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);