quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_pr.a #include <LanguageModel.h> LanguageModel(); HierarchicalDigraph& getHDigraph(); boolean setHDigraph(const HierarchicalDigraph& hg); boolean convert(LanguageModel& lm, ALGORITHM format); boolean setFormat(ALGORITHM format);
description:LanguageModel lm; Sof lm_file; lm_file_in.open(L"lm_file_in.sof", File::READ_ONLY, File::TEXT); lm.read(lm_file_in); lm_file_out.open(L"lm_file_out.sof", File::WRITE_ONLY, File::TEXT); lm.write(lm_file_out);
static const String CLASS_NAME;
enum ALGORITHM { UNKNOWN = 0, IHD, JSGF, XML, BNF, ABNF, DEF_ALGO = UNKNOWN };
enum IMPLEMENTATION { HD, DEF_IMPL = HD };
static const NameMap ALGO_MAP;
static const NameMap IMPL_MAP;
static const String PARAM_ALGO;
static const String PARAM_IMPL;
static const String DEF_PARAM;
static const long DEF_TAG;
static LanguageModelUndefined NO_LANGUAGE_MODEL;
static const long ERR = 100102;
LanguageModelBase* virtual_lm_d;
ALGORITHM format_d;
IMPLEMENTATION implementation_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* msg_a) const;
boolean setDebug(Integral::DEBUG debug_level);
~LanguageModel();
LanguageModel();
boolean assign(const LanguageModel& arg_a);
boolean eq(const LanguageModel& arg_a) const;
long sofSize() const;
boolean read(Sof& sof_a, const String& tag_a, SearchLevel& level_a);
boolean write(Sof& sof_a, long tag_a, const String& name_a) const;
readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
const String& className() const;
RuleModel getRuleModel();>
boolean setRuleModel(const RuleModel& hg);ohter methods:
boolean convert(ALGORITHM format)>;
boolean assign(const LanguageModelBase& arg);
boolean eq(const LanguageModelBase& arg) const;
boolean setFormat(ALGORITHM format);
ALGORITHM getFormat();
boolean minimizeGraph();