diff options
Diffstat (limited to 'utils/training')
-rw-r--r-- | utils/training/estimate_k_mixture_model.cpp | 4 | ||||
-rw-r--r-- | utils/training/prune_k_mixture_model.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/training/estimate_k_mixture_model.cpp b/utils/training/estimate_k_mixture_model.cpp index 12c6ac5..58d6b70 100644 --- a/utils/training/estimate_k_mixture_model.cpp +++ b/utils/training/estimate_k_mixture_model.cpp @@ -121,10 +121,10 @@ int main(int argc, char * argv[]){ /* TODO: magic header signature check here. */ KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER); - bigram.attach(bigram_filename); + bigram.attach(bigram_filename, ATTACH_READONLY); KMixtureModelBigram deleted_bigram(K_MIXTURE_MODEL_MAGIC_NUMBER); - deleted_bigram.attach(deleted_bigram_filename); + deleted_bigram.attach(deleted_bigram_filename, ATTACH_READONLY); GArray * deleted_items = g_array_new(FALSE, FALSE, sizeof(phrase_token_t)); deleted_bigram.get_all_items(deleted_items); diff --git a/utils/training/prune_k_mixture_model.cpp b/utils/training/prune_k_mixture_model.cpp index 7a724a9..09243f3 100644 --- a/utils/training/prune_k_mixture_model.cpp +++ b/utils/training/prune_k_mixture_model.cpp @@ -90,7 +90,7 @@ int main(int argc, char * argv[]){ /* TODO: magic header signature check here. */ KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER); - bigram.attach(bigram_filename); + bigram.attach(bigram_filename, ATTACH_READWRITE); KMixtureModelMagicHeader magic_header; bigram.get_magic_header(magic_header); |