1
/* ====================================================================
2
* Copyright (c) 1994-2000 Carnegie Mellon University. All rights
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
12
* 2. Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in
14
* the documentation and/or other materials provided with the
17
* This work was supported in part by funding from the Defense Advanced
18
* Research Projects Agency and the National Science Foundation of the
19
* United States of America, and the CMU Sphinx Speech Consortium.
21
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
22
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
25
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
* ====================================================================
36
/*********************************************************************
38
* File: parse_cmd_ln.c
41
* This file contains the code to define and parse the command
42
* line for the inc_comp command.
45
* Eric H. Thayer (eht@cs.cmu.edu)
46
*********************************************************************/
48
#include "parse_cmd_ln.h"
52
#include <sphinxbase/cmd_ln.h>
53
#include <sphinxbase/err.h>
56
parse_cmd_ln(int argc, char *argv[])
61
const char helpstr[] =
64
Increase the number of mixture of a continuous HMM. Notice that option \n\
65
-ninc actually means the number of mixture one wants to split from the \n\
66
original models. For example, if you have already 8 mixture and you \n\
67
want to go to 16, then 8 should be specified. \n\
69
Usually, the number of mixture is a power of two. You are also \n\
70
recommended to split the number of mixture from 1 -> 2 -> 4 -> 8 \n\
75
const char examplestr[] =
80
-dcountfn mixture_weights \n\
81
-inmixwfn mixture_weights \n\
82
-outmixwfn out_mixture_weights \n\
84
-outmeanfn out_means \n\
86
-outvarfn out_variance";
88
static arg_t defn[] = {
92
"Shows the usage of the tool"},
97
"Shows example of how to use the tool"},
102
"The # of densities to split"},
107
"The weight file for all N den/mix"},
112
"The output mixing weight file name w/ N+NINC density weights/mixture"},
117
"The source mean file w/ N means"},
122
"The new mean file w/ N+NINC means"},
127
"The source variance file w/ N means"},
132
"variances file contains full covariances" },
137
"The new variance file w/ N+NINC means"},
142
"The density counts for the N source den/mix"},
144
{NULL, 0, NULL, NULL}
147
cmd_ln_parse(defn, argc, argv, 1);
149
isHelp = cmd_ln_int32("-help");
150
isExample = cmd_ln_int32("-example");
153
printf("%s\n\n",helpstr);
157
printf("%s\n\n",examplestr);
160
if(isHelp || isExample){
161
E_INFO("User asked for help or example.\n");