#include <lab3_lm.H>
Public Member Functions | |
| Lab3LmMain (const map< string, string > ¶ms, const SymbolTable &symTable, int n, int bosIdx, int eosIdx, int unkIdx) | |
| Initialize all data given parameters. | |
| bool | init_utt () |
| Called at the beginning of processing each utterance. | |
| void | finish_utt () |
| Called at the end of processing each utterance. | |
| bool | init_word () |
| Called at the beginning of processing each word. | |
| void | finish_word (double curProb) |
| Called at the end of processing each word. | |
| void | finish () |
| Called at end of program. | |
| const vector< int > & | get_ngram () const |
| Returns current n-gram. | |
Holds global variables and has routines for initializing variables and updating them for each utterance. We do this so that we can call this code from Java as well.
| Lab3LmMain::Lab3LmMain | ( | const map< string, string > & | params, | |
| const SymbolTable & | symTable, | |||
| int | n, | |||
| int | bosIdx, | |||
| int | eosIdx, | |||
| int | unkIdx | |||
| ) |
Initialize all data given parameters.
| bool Lab3LmMain::init_utt | ( | ) |
Called at the beginning of processing each utterance.
Returns whether at EOF.
| void Lab3LmMain::finish_utt | ( | ) |
Called at the end of processing each utterance.
| bool Lab3LmMain::init_word | ( | ) |
Called at the beginning of processing each word.
Returns whether at end of sentence.
| void Lab3LmMain::finish_word | ( | double | curProb | ) |
Called at the end of processing each word.
| void Lab3LmMain::finish | ( | ) |
Called at end of program.
| const vector<int>& Lab3LmMain::get_ngram | ( | ) | const [inline] |
Returns current n-gram.
1.5.5