quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_search.a #include <LexicalTree.h> LexicalTree(); LexicalTree(const LexicalTree& copy_tree); static boolean expandLexicalTree(DiGraph<LexicalNode>& word_graph_a, const Vector<DiGraph<LexicalNode> >& pron_vec_a, long level_a); static boolean expandLexicalTree(GVLexicalNode*& root_node_a, const Vector<DiGraph<LexicalNode> >& pron_vec_a, long level_a);
description:#include <LexicalTree.h> // a test file // String model_fn; Sof model_sof; // testing expand lexical tree // SearchLevel word_level_3; SearchLevel phone_level_3; model_fn.assign(L"$ISIP_DEVEL/doc/examples/data/models/lex_02_lm_model.sof"); model_sof.open(model_fn, File::READ_ONLY, File::TEXT); // load word level -- level 0 // word_level_3.loadSymbols(model_sof,0); word_level_3.loadSubGraphs(model_sof,0); word_level_3.setLevelIndex(0); // load the phone level -- level 1 // phone_level_3.loadSymbols(model_sof,1); phone_level_3.loadSubGraphs(model_sof,1); phone_level_3.setLevelIndex(1); // close the file // model_sof.close(); // expand the top level graph to a lexical tree // LexicalTree::expandLexicalTree(word_level_3.getSubGraph((long)0), phone_level_3.getSubGraphs(), 0);
static const String CLASS_NAME = L"LexicalTree";
static const long DEF_LENGTH = 1;
static const long DEF_CENTRAL_INDEX = 1;
static const long ERR = 90600;
typedef SearchNode LexicalNode;
typedef typedef SearchSymbol LexSymbol;
typedef GraphVertex<LexicalNode> GVLexicalNode;
typedef DiGraph<LexicalNode> Pronunciation;
typedef GraphArc<LexicalNode> GALexicalNode;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message_a);
static boolean setDebug(Integral::DEBUG debug_level);
~LexicalTree();
LexicalTree();
LexicalTree(const LexicalTree& copy_tree);
boolean assign(const LexicalTree& copy_tree_a)
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean readData(Sof& sof, const String& pname = DEF_PARAM,long size = SofParser::FULL_OBJECT, boolean param = true,boolean nested = false)
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const LexicalTree& compare_tree_a)
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
static boolean expandLexicalTree(DiGraph<LexicalNode>& word_graph_a, const Vector<DiGraph<LexicalNode> >& pron_vec_a,long level_a);
static boolean expandLexicalTree(GVLexicalNode*& root_node_a, const Vector<DiGraph<LexicalNode> >& pron_vec_a,long level_a);