20 #ifndef KALDI_UTIL_SIMPLE_OPTIONS_H_ 21 #define KALDI_UTIL_SIMPLE_OPTIONS_H_ 47 void Register(
const std::string &name,
bool *ptr,
const std::string &doc);
48 void Register(
const std::string &name,
int32 *ptr,
const std::string &doc);
49 void Register(
const std::string &name, uint32 *ptr,
const std::string &doc);
50 void Register(
const std::string &name,
float *ptr,
const std::string &doc);
51 void Register(
const std::string &name,
double *ptr,
const std::string &doc);
52 void Register(
const std::string &name, std::string *ptr,
53 const std::string &doc);
56 bool SetOption(
const std::string &key,
const bool &value);
58 bool SetOption(
const std::string &key,
const uint32 &value);
59 bool SetOption(
const std::string &key,
const float &value);
60 bool SetOption(
const std::string &key,
const double &value);
61 bool SetOption(
const std::string &key,
const std::string &value);
62 bool SetOption(
const std::string &key,
const char* value);
66 bool GetOption(
const std::string &key,
bool *value);
68 bool GetOption(
const std::string &key, uint32 *value);
69 bool GetOption(
const std::string &key,
float *value);
70 bool GetOption(
const std::string &key,
double *value);
71 bool GetOption(
const std::string &key, std::string *value);
84 doc(doc), type(type) {
113 #endif // KALDI_UTIL_SIMPLE_OPTIONS_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
The class SimpleOptions is an implementation of OptionsItf that allows setting and getting option val...
std::map< std::string, bool * > bool_map_
bool GetOptionType(const std::string &key, OptionType *type)
void Register(const std::string &name, bool *ptr, const std::string &doc)
std::vector< std::pair< std::string, OptionInfo > > GetOptionInfoList()
std::map< std::string, int32 * > int_map_
std::map< std::string, uint32 * > uint_map_
std::map< std::string, float * > float_map_
bool SetOption(const std::string &key, const bool &value)
OptionInfo(const std::string &doc, OptionType type)
std::map< std::string, double * > double_map_
bool GetOption(const std::string &key, bool *value)
std::vector< std::pair< std::string, OptionInfo > > option_info_list_
std::map< std::string, std::string * > string_map_