rename init_phrase_index to load_phrase_index
authorPeng Wu <alexepico@gmail.com>
Mon, 21 May 2012 04:07:13 +0000 (12:07 +0800)
committerPeng Wu <alexepico@gmail.com>
Mon, 21 May 2012 04:07:13 +0000 (12:07 +0800)
12 files changed:
tests/lookup/test_phrase_lookup.cpp
tests/lookup/test_pinyin_lookup.cpp
tests/tests_helper.h
utils/segment/ngseg.cpp
utils/storage/export_interpolation.cpp
utils/storage/import_interpolation.cpp
utils/training/estimate_interpolation.cpp
utils/training/eval_correction_rate.cpp
utils/training/export_k_mixture_model.cpp
utils/training/gen_ngram.cpp
utils/training/gen_unigram.cpp
utils/utils_helper.h

index 42a715f..3a5470f 100644 (file)
@@ -78,7 +78,7 @@ int main(int argc, char * argv[]){
 
     /* init phrase index */
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     /* init bi-gram */
index 6aa34a9..25f7a2b 100644 (file)
@@ -38,7 +38,7 @@ int main( int argc, char * argv[]){
     largetable.load(options, chunk, NULL);
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     Bigram system_bigram;
index b6cda61..daaa68a 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef TESTS_HELPER_H
 #define TESTS_HELPER_H
 
-static bool init_phrase_index(FacadePhraseIndex * phrase_index){
+static bool load_phrase_index(FacadePhraseIndex * phrase_index){
     MemoryChunk * chunk = NULL;
     for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
         const char * bin_file = pinyin_phrase_files[i];
index b0ec850..994b54c 100644 (file)
@@ -110,7 +110,7 @@ int main(int argc, char * argv[]){
 
     /* init phrase index */
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     /* init bi-gram */
index 10dcbdd..11bb73d 100644 (file)
@@ -47,7 +47,7 @@ int main(int argc, char * argv[]){
     MemoryChunk * chunk = NULL;
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     Bigram bigram;
index 89e2276..9d8f4bd 100644 (file)
@@ -208,7 +208,7 @@ int main(int argc, char * argv[]){
     phrases.load(chunk);
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     Bigram bigram;
index a7ba100..9d3a96f 100644 (file)
@@ -90,7 +90,7 @@ parameter_t compute_interpolation(SingleGram * deleted_bigram,
     
 int main(int argc, char * argv[]){
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     Bigram bigram;
index 1fa82b6..c6a2175 100644 (file)
@@ -124,7 +124,7 @@ int main(int argc, char * argv[]){
     largetable.load(options, chunk, NULL);
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     FacadePhraseTable phrases;
index a52eb46..95ea1ef 100644 (file)
@@ -126,7 +126,7 @@ int main(int argc, char * argv[]){
     }
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER);
index 93fae14..5721ce7 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char * argv[]){
     phrases.load(chunk);
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
     
     Bigram bigram;
index b03235e..470a60a 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char * argv[]){
     MemoryChunk * chunk = NULL;
 
     FacadePhraseIndex phrase_index;
-    if (!init_phrase_index(&phrase_index))
+    if (!load_phrase_index(&phrase_index))
         exit(ENOENT);
 
     /* Note: please increase the value when corpus size becomes larger.
index 19ece80..59286db 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef UTILS_HELPER_H
 #define UTILS_HELPER_H
 
-static bool init_phrase_index(FacadePhraseIndex * phrase_index) {
+static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
     MemoryChunk * chunk = NULL;
     for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
         const char * bin_file = pinyin_phrase_files[i];