StringLookup Class Reference

List of all members.


Public Member Functions

 StringLookup (int numberOfWords, char **vocabulary)
 ~StringLookup ()
int getWordID (char *word)

Protected Member Functions

void deleteWordTree (WordStringNode *w)

Protected Attributes

WordStringNodewordTree

Detailed Description

Todo:
Docs

Constructor & Destructor Documentation

StringLookup::StringLookup ( int  numberOfWords,
char **  vocabulary 
)

Creates a tree-structure of all words. This will make getWordID a lot faster, but it costs memory!

References WordStringNode::c, WordStringNode::next, WordStringNode::par, WordStringNode::wordID, and wordTree.

StringLookup::~StringLookup (  ) 

Todo:
Docs

References deleteWordTree(), and wordTree.

Here is the call graph for this function:


Member Function Documentation

void StringLookup::deleteWordTree ( WordStringNode w  )  [protected]

Deletes the word tree.

References WordStringNode::next, and WordStringNode::par.

Referenced by ~StringLookup().

int StringLookup::getWordID ( char *  word  ) 

Returns the ID of the word 'word'. If the word is not in the vocabulary (OOV), -1 is returned.

References WordStringNode::c, WordStringNode::next, WordStringNode::par, WordStringNode::wordID, and wordTree.

Referenced by ShoutConfig::fillParameter(), and Shout_lm2bin::Shout_lm2bin().


Member Data Documentation