From b7909ecd1b39843c99b44118a8e0fe269da7f098 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 28 Apr 2011 13:46:02 +0800 Subject: add options to estimate k mixture model --- utils/training/gen_ngram.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'utils/training/gen_ngram.cpp') diff --git a/utils/training/gen_ngram.cpp b/utils/training/gen_ngram.cpp index 918c9c8..367728a 100644 --- a/utils/training/gen_ngram.cpp +++ b/utils/training/gen_ngram.cpp @@ -35,12 +35,12 @@ void print_help(){ } int main(int argc, char * argv[]){ - int i = 1; + int i = 1; bool train_pi_gram = true; bool train_unigram = true; const char * bigram_filename = "../../data/bigram.db"; - setlocale(LC_ALL,""); + setlocale(LC_ALL, ""); while ( i < argc ){ if ( strcmp("--help", argv[i] ) == 0){ print_help(); @@ -52,7 +52,9 @@ int main(int argc, char * argv[]){ if ( ++i >= argc ) print_help(); bigram_filename = argv[i]; - } + }else{ + print_help(); + } ++i; } -- cgit