Shout_dct2lextree Class Reference

This class will translate a plain text pronunciation dictionary into a PPT stored in LexicalTree format. This class is used by the application shout_dct2lextree. More...

Inheritance diagram for Shout_dct2lextree:

List of all members.


Public Member Functions

 Shout_dct2lextree (char *phoneListFile, char *dctFileName, char *lexFileName)
 ~Shout_dct2lextree ()

Protected Member Functions

void writeTree (LexicalNode *node, FILE *outFile)
void splitList (char *str, char *str2)

Detailed Description

This class will translate a plain text pronunciation dictionary into a PPT stored in LexicalTree format. This class is used by the application shout_dct2lextree.

Constructor & Destructor Documentation

Shout_dct2lextree::Shout_dct2lextree ( char *  phoneListFile,
char *  dctFileName,
char *  lexFileName 
)

This constructor is called by the main function of shout_dct2lextree. It loads a phone definition file and a dictionary. After creating a PPT, it is stored to file in a binary format so that it can be read by LexicalTree.

References LexicalNode::contextNext, LexicalNode::contextPrev, LexicalNode::modelID, LexicalNode::next, LexicalTree::numberOfPhones, LexicalTree::numberOfWords, LexicalNode::parallel, splitList(), LexicalTree::treeStart, LexicalTree::vocabulary, LexicalNode::wordID, and writeTree().

Here is the call graph for this function:

Shout_dct2lextree::~Shout_dct2lextree (  ) 

This destructor is empty.


Member Function Documentation

void Shout_dct2lextree::splitList ( char *  str,
char *  str2 
) [protected]

This is a helper function which will split a string 'str' into two strings ('str' and 'str2') at the first space or tab character of 'str'.

Referenced by Shout_dct2lextree().

void Shout_dct2lextree::writeTree ( LexicalNode node,
FILE *  outFile 
) [protected]

This method will write the tree starting with LexicalNode 'node' to a binary file so that it can be read by LexicalTree.

References LexicalNode::contextNext, LexicalNode::contextPrev, LexicalNode::modelID, LexicalNode::next, LexicalNode::parallel, and LexicalNode::wordID.

Referenced by Shout_dct2lextree().