Concordia
|
#include <word_map.hpp>
Public Member Functions | |
WordMap () throw (ConcordiaException) | |
virtual | ~WordMap () |
INDEX_CHARACTER_TYPE | getWordCode (const std::string &word) throw (ConcordiaException) |
Class representing dictionary for word to integer encoding.
|
explicit |
Constructor.
|
virtual |
Destructor.
INDEX_CHARACTER_TYPE WordMap::getWordCode | ( | const std::string & | word | ) | |
throw | ( | ConcordiaException | |||
) |
Gets the integer code of a token. If the token is found in the dictionary, the dictionary code is returned. If not, the word is added to the dictionary and its newly created code is returned.
word | token to generate the code |