From 2dd91b537248f256e44cd6d6ebc7487fba73afe8 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 2 Apr 2013 14:11:09 +0800 Subject: [PATCH] bring back some print_help methods --- tests/lookup/test_phrase_lookup.cpp | 3 --- utils/segment/ngseg.cpp | 6 ++++++ utils/segment/spseg.cpp | 4 ++++ utils/storage/gen_pinyin_table.cpp | 10 ++++++++++ utils/training/gen_k_mixture_model.cpp | 10 ++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp index 8746e76..57bcf90 100644 --- a/tests/lookup/test_phrase_lookup.cpp +++ b/tests/lookup/test_phrase_lookup.cpp @@ -25,9 +25,6 @@ #include "pinyin_internal.h" #include "tests_helper.h" -void print_help(){ - printf("Usage: test_phrase_lookup\n"); -} bool try_phrase_lookup(PhraseLookup * phrase_lookup, ucs4_t * ucs4_str, glong ucs4_len){ diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp index bd2a9a0..d74ec43 100644 --- a/utils/segment/ngseg.cpp +++ b/utils/segment/ngseg.cpp @@ -25,6 +25,12 @@ #include "pinyin_internal.h" #include "utils_helper.h" + +void print_help(){ + printf("Usage: ngseg [--generate-extra-enter] [-o outputfile] [inputfile]\n"); +} + + static gboolean gen_extra_enter = FALSE; static gchar * outputfile = NULL; diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp index 212fccc..50dc5df 100644 --- a/utils/segment/spseg.cpp +++ b/utils/segment/spseg.cpp @@ -27,6 +27,10 @@ #include "utils_helper.h" +void print_help(){ + printf("Usage: spseg [--generate-extra-enter] [-o outputfile] [inputfile]\n"); +} + static gboolean gen_extra_enter = FALSE; static gchar * outputfile = NULL; diff --git a/utils/storage/gen_pinyin_table.cpp b/utils/storage/gen_pinyin_table.cpp index 8020e22..853e8c8 100644 --- a/utils/storage/gen_pinyin_table.cpp +++ b/utils/storage/gen_pinyin_table.cpp @@ -24,6 +24,16 @@ #include #include "pinyin_internal.h" + +void print_help(){ + printf("Usage: gen_pinyin_table -t \n" + "-o .. \n" + " the result output file\n" + " input pinyin files\n" + " phrase index identifier\n"); +} + + static gint phrase_index = 0; static const gchar * outputfile = "temp.out"; diff --git a/utils/training/gen_k_mixture_model.cpp b/utils/training/gen_k_mixture_model.cpp index fed556e..efa760d 100644 --- a/utils/training/gen_k_mixture_model.cpp +++ b/utils/training/gen_k_mixture_model.cpp @@ -32,6 +32,16 @@ typedef GHashTable * HashofSecondWord; typedef GHashTable * HashofUnigram; + +void print_help(){ + printf("Usage: gen_k_mixture_model [--skip-pi-gram-training]\n" + " [--maximum-occurs-allowed ]\n" + " [--maximum-increase-rates-allowed ]\n" + " [--k-mixture-model-file ]\n" + " {}+\n"); +} + + static gint g_maximum_occurs = 20; static parameter_t g_maximum_increase_rates = 3.; static gboolean g_train_pi_gram = TRUE; -- 2.7.4