summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-02 14:11:09 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-02 14:11:09 +0800
commit2dd91b537248f256e44cd6d6ebc7487fba73afe8 (patch)
treee18fc12bc2a1deae5b5d7271bc7c294142df2dc0
parentdb89cdf49dc5609ae42f9d6d83f0f1a929d258e0 (diff)
downloadlibpinyin-2dd91b537248f256e44cd6d6ebc7487fba73afe8.tar.gz
libpinyin-2dd91b537248f256e44cd6d6ebc7487fba73afe8.tar.xz
libpinyin-2dd91b537248f256e44cd6d6ebc7487fba73afe8.zip
bring back some print_help methods
-rw-r--r--tests/lookup/test_phrase_lookup.cpp3
-rw-r--r--utils/segment/ngseg.cpp6
-rw-r--r--utils/segment/spseg.cpp4
-rw-r--r--utils/storage/gen_pinyin_table.cpp10
-rw-r--r--utils/training/gen_k_mixture_model.cpp10
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 <glib.h>
#include "pinyin_internal.h"
+
+void print_help(){
+ printf("Usage: gen_pinyin_table -t <PHRASE_INDEX> \n"
+ "-o <OUTPUTFILE> <FILE1> <FILE2> .. <FILEn>\n"
+ "<OUTPUTFILE> the result output file\n"
+ "<FILEi> input pinyin files\n"
+ "<PHRASE_INDEX> 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 <INT>]\n"
+ " [--maximum-increase-rates-allowed <FLOAT>]\n"
+ " [--k-mixture-model-file <FILENAME>]\n"
+ " {<FILENAME>}+\n");
+}
+
+
static gint g_maximum_occurs = 20;
static parameter_t g_maximum_increase_rates = 3.;
static gboolean g_train_pi_gram = TRUE;