summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-03-23 16:45:41 +0800
committerPeng Wu <alexepico@gmail.com>2016-03-23 16:45:41 +0800
commit8cd9960d54d50ebb18e6f1b5aedd6e40391be879 (patch)
treed180afd20cd966c5b147c9295b85bcdf2b2e247a /utils
parent8e1e998b18c3e4163b364893c10d3f0dfe2746d5 (diff)
downloadlibpinyin-8cd9960d54d50ebb18e6f1b5aedd6e40391be879.zip
libpinyin-8cd9960d54d50ebb18e6f1b5aedd6e40391be879.tar.gz
libpinyin-8cd9960d54d50ebb18e6f1b5aedd6e40391be879.tar.xz
update utils
Diffstat (limited to 'utils')
-rw-r--r--utils/segment/mergeseq.cpp4
-rw-r--r--utils/segment/ngseg.cpp4
-rw-r--r--utils/segment/spseg.cpp4
-rw-r--r--utils/training/eval_correction_rate.cpp9
4 files changed, 4 insertions, 17 deletions
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;