1
/* ====================================================================
2
* Copyright (c) 2004 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
/*********************************************************************
44
*********************************************************************/
46
#include "parse_cmd_ln.h"
48
#include <sphinxbase/cmd_ln.h>
49
#include <sphinxbase/err.h>
55
parse_cmd_ln(int argc, char *argv[])
60
const char helpstr[] =
63
This is an implementation of Dr. Rita Singh's automatic question \n\
64
generation. (Copied from Rita's comment) The current algorithm \n\
65
clusters CI distributions using a hybrid bottom-up top-down \n\
66
clustering algorithm to build linguistic questions for decision \n\
68
(From Arthur : I need to do some tracing before understand it \n\
69
what's the internal of the code)";
71
const char examplestr[] =
73
make_quest -moddeffn mdef -meanfn mean -varfn var -mixwfn \n\
74
mixwfn -npermute 8 -niter 1 -qstperstt 20 -questfn \n\
75
questions -type .cont.";
78
static arg_t defn[] = {
82
"Shows the usage of the tool"},
87
"Shows example of how to use the tool"},
92
"Model definition file of the ci models" },
97
"means file for tree building using continuous HMMs" },
102
"variances file for tree building using continuous HMMs" },
107
"variances file contains full covariances" },
112
"The minimum variance"},
117
"PDF's for tree building using semicontinuous HMMs" },
122
"The minimum variance"},
127
"Number of iterations"},
132
"something per state"},
137
"(Obsolete) File to write temprorary results to " },
142
"File to write questions to" },
149
{NULL, 0, NULL, NULL}
153
cmd_ln_parse(defn, argc, argv, 1);
155
isHelp = cmd_ln_int32("-help");
156
isExample = cmd_ln_int32("-example");
159
printf("%s\n\n",helpstr);
163
printf("%s\n\n",examplestr);
166
if(isHelp || isExample){
167
E_INFO("User asked for help or example.\n");