name: LanguageModel

synopsis:

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_pr.a

#include <LanguageModel.h>

LanguageModel();
boolean load(const String& model_file_a, const String& stat_file_a, Vector<SearchLevel>& search_levels_a);
boolean load(const String& model_file_a, const String& stat_file_a);
boolean store(String& model_file_a, String& stat_file_a, Vector<SearchLevel>& search_levels_a, FORMAT format_a = DEF_FORMAT);
boolean setNumLevels(const String& file_a)
long getNumLevels();
boolean getLevel(SearchLevel& search_level_a, long index_a);
quick start:

LanguageModel lm;
Vector<SearchLevel> level(3);
lm.load(L"model_file.sof", L"stat_file.sof", level)
lm.store(L"output_model.sof", L"output_stat.sof", level, LanguageModel::JSGF)
description:

In addition to the acoustic information, linguistic information is extremely important in recognizing and understanding natural speech. For a language, there are a number of components that are crucial to achieving the goal of spoken language understanding system. These components include the syntax and semantics of the language (the rules that determine what sequences of words are grammatically well-formed and meaningful), the lexical knowledge of the language (vocabulary definition and word pronunciation) and the knowledge of the pragmatics of language (the structure of extended discourse, and what people are likely to say in particular contexts). Two good references to the introduction on Formal Language Theory are: The two fundamental components of the Formal Language model are: the grammar and the parsing algorithm. The grammar is the set of permissible rules for the structure in a language that is represented in either a graph or text format. The parsing algorithm is a technique to analyze the sentence to make sure that the sentence under consideration follows the rules laid down by the grammar. The LanguageModel Class corresponds to the first component, the grammar.

The LanguageModel class describes the various components of the grammar. These components are constraints due to syntax and semantics (word-level grammar). These word-level constraints can be expanded to phone-level using the lexical information of the language. The phones are often defined by models based on the pragmatics of the language (context). For speech, HMM's are the most popular way to model the phonetic models. Each state of these HMM's are modeled by a mixture of Statistical models. For this case, the LanguageModel class sets up a search space comprising of three search levels - word level, phone level and state level.

Currently we support two formats to represent the grammars. The first one is our internal format -
DiGraph that we employ for speech training as well as decoding. The second one, JSGF (Java Speech Grammar Format) is a platform-independent textual representation. For additional information on JSGF format, see: LanguageModel class can also be used to convert JSGF grammars to the ISIP Digraph format and vice-versa. The JSGFParserclass is used to read the grammar in JSGF format.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: