From 8cd9960d54d50ebb18e6f1b5aedd6e40391be879 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 23 Mar 2016 16:45:41 +0800 Subject: update utils --- utils/segment/mergeseq.cpp | 4 +--- utils/segment/ngseg.cpp | 4 +--- utils/segment/spseg.cpp | 4 +--- utils/training/eval_correction_rate.cpp | 9 +-------- 4 files changed, 4 insertions(+), 17 deletions(-) (limited to 'utils') diff --git a/utils/segment/mergeseq.cpp b/utils/segment/mergeseq.cpp index 8d8feb8..05ceb3c 100644 --- a/utils/segment/mergeseq.cpp +++ b/utils/segment/mergeseq.cpp @@ -238,9 +238,7 @@ int main(int argc, char * argv[]){ /* init phrase table */ FacadePhraseTable2 phrase_table; - MemoryChunk * chunk = new MemoryChunk; - chunk->load(SYSTEM_PHRASE_INDEX); - phrase_table.load(chunk, NULL); + phrase_table.load(SYSTEM_PHRASE_INDEX, NULL); /* init phrase index */ FacadePhraseIndex phrase_index; diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp index dd47953..8064f27 100644 --- a/utils/segment/ngseg.cpp +++ b/utils/segment/ngseg.cpp @@ -144,9 +144,7 @@ int main(int argc, char * argv[]){ /* init phrase table */ FacadePhraseTable2 phrase_table; - MemoryChunk * chunk = new MemoryChunk; - chunk->load(SYSTEM_PHRASE_INDEX); - phrase_table.load(chunk, NULL); + phrase_table.load(SYSTEM_PHRASE_INDEX, NULL); /* init phrase index */ FacadePhraseIndex phrase_index; diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp index 9c8ab44..c7bdcfe 100644 --- a/utils/segment/spseg.cpp +++ b/utils/segment/spseg.cpp @@ -238,9 +238,7 @@ int main(int argc, char * argv[]){ /* init phrase table */ FacadePhraseTable2 phrase_table; - MemoryChunk * chunk = new MemoryChunk; - chunk->load(SYSTEM_PHRASE_INDEX); - phrase_table.load(chunk, NULL); + phrase_table.load(SYSTEM_PHRASE_INDEX, NULL); /* init phrase index */ FacadePhraseIndex phrase_index; diff --git a/utils/training/eval_correction_rate.cpp b/utils/training/eval_correction_rate.cpp index 3d0e4e2..633419f 100644 --- a/utils/training/eval_correction_rate.cpp +++ b/utils/training/eval_correction_rate.cpp @@ -127,14 +127,7 @@ int main(int argc, char * argv[]){ pinyin_option_t options = USE_TONE; FacadeChewingTable largetable; - MemoryChunk * chunk = new MemoryChunk; - chunk->load(SYSTEM_PINYIN_INDEX); - largetable.load(options, chunk, NULL); - - FacadePhraseTable2 phrase_table; - chunk = new MemoryChunk; - chunk->load(SYSTEM_PHRASE_INDEX); - phrase_table.load(chunk, NULL); + largetable.load(options, SYSTEM_PINYIN_INDEX, NULL); FacadePhraseIndex phrase_index; -- cgit