⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lm_00.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/asr/LanguageModel/lm_00.cc// version: $Id: lm_00.cc,v 1.6 2002/09/25 19:22:57 huang Exp $//// isip include files//#include "LanguageModel.h" //------------------------------------------------------------------------//// required public methods////-----------------------------------------------------------------------// method: default constructor//// arguments://  long order: (input) the analysis order//// return: none//LanguageModel::LanguageModel() {  // initialize class data:  //  note that debug_level_d is initialized by default.  //  num_level_d = DEF_NUM_LEVEL;  graph_start_d = DEF_GRAPH_START;  graph_term_d = DEF_GRAPH_TERM;  algorithm_d = DEF_ALGORITHM;}// method: assign//// arguments://  const LanguageModel& arg: (input) object to assign//// return: a boolean value indicating status//// this method assigns the input object to current object//boolean LanguageModel::assign(const LanguageModel& arg_a) {  // assign all protected data  //  num_level_d = arg_a.num_level_d;  search_levels_d = arg_a.search_levels_d;  graph_start_d = arg_a.graph_start_d;  graph_term_d = arg_a.graph_term_d;  algorithm_d = arg_a.algorithm_d;    // gracefully exit  //  return true; }// method: eq//// arguments://  const LanguageModel& arg: (input) input object to assign//// return: a boolean value indicating status//// this method checks whether the current object is identical to the// input object//boolean LanguageModel::eq(const LanguageModel& arg_a) const {  // compare all protected data  //  if( !search_levels_d.eq(arg_a.search_levels_d) ||      !(algorithm_d == arg_a.algorithm_d) ||      !(num_level_d == arg_a.num_level_d) ||      !(graph_start_d.eq(arg_a.graph_start_d)) ||      !(graph_term_d.eq(arg_a.graph_term_d))) {    return false;  }  else    return true;}// method: clear//// arguments://  Integral::CMODE ctype: (input) clear mode//// return: a boolean value indicating status//// this method resets the data members to the default values//boolean LanguageModel::clear(Integral::CMODE ctype_a) {  // reset all protected data  //  if(ctype_a != Integral::RETAIN) {    num_level_d = DEF_NUM_LEVEL;    graph_start_d = DEF_GRAPH_START;    graph_term_d = DEF_GRAPH_TERM;    algorithm_d = DEF_ALGORITHM;  }    // exit gracefully  //  return true; }//-------------------------------------------------------------------------//// we define non-integral constants in the default constructor//      //-------------------------------------------------------------------------// constants: class name//const String LanguageModel::CLASS_NAME(L"LanguageModel");// i/o related constants//const long LanguageModel::DEF_NUM_LEVEL(0);const String LanguageModel::DEF_GRAPH_START(L"");const String LanguageModel::DEF_GRAPH_TERM(L"");const String LanguageModel::PARAM_STAT(L"stat_models");const String LanguageModel::PARAM_STAT_HASH(L"symbol_hashtable");// constants: NameMap(s) for the enumerated values//const NameMap LanguageModel::ALGO_MAP(L"JSGF_1_0 = 0, NGRAM_DARPA");;const NameMap LanguageModel::IMPL_MAP(L"FACTORED, UNFACTORED, CIRCULAR");const NameMap LanguageModel::NORM_MAP(L"NONE, DURATION, RMS");// static instantiations: memory manager//MemoryManager LanguageModel::mgr_d(sizeof(LanguageModel), LanguageModel::name());Integral::DEBUG LanguageModel::debug_level_d = Integral::NONE;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -