summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-05-24 13:30:58 +0800
committerPeng Wu <alexepico@gmail.com>2011-05-24 13:30:58 +0800
commitcc2643225897f45b5e01d10b0152c88b87c56fc4 (patch)
tree37b267e474f6c4948fa0ba81798295b55ab60bfd /utils
parent1bb50d2455d69047cccc53f0daf0debac73ec403 (diff)
downloadlibpinyin-cc2643225897f45b5e01d10b0152c88b87c56fc4.tar.gz
libpinyin-cc2643225897f45b5e01d10b0152c88b87c56fc4.tar.xz
libpinyin-cc2643225897f45b5e01d10b0152c88b87c56fc4.zip
refine gen k mixture model
Diffstat (limited to 'utils')
-rw-r--r--utils/training/gen_k_mixture_model.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/training/gen_k_mixture_model.cpp b/utils/training/gen_k_mixture_model.cpp
index fd48f51..9768fef 100644
--- a/utils/training/gen_k_mixture_model.cpp
+++ b/utils/training/gen_k_mixture_model.cpp
@@ -194,8 +194,8 @@ bool train_single_gram(HashofDocument hash_of_document,
return true;
}
-static bool train_second_word(HashofDocument hash_of_document,
- KMixtureModelBigram * bigram,
+static bool train_second_word(KMixtureModelBigram * bigram,
+ HashofDocument hash_of_document,
phrase_token_t token){
guint32 delta = 0;
@@ -290,7 +290,7 @@ int main(int argc, char * argv[]){
g_hash_table_iter_init(&iter, hash_of_document);
while (g_hash_table_iter_next(&iter, &key, &value)) {
phrase_token_t token = GPOINTER_TO_UINT(key);
- train_second_word(hash_of_document, &bigram, token);
+ train_second_word(&bigram, hash_of_document, token);
}
KMixtureModelMagicHeader magic_header;