#include <lang_model.H>
Public Member Functions | |
| LangModel (const map< string, string > ¶ms=ParamsType()) | |
| Ctor; get configuration parameters from "params". | |
| const SymbolTable & | get_sym_table () const |
| Get associated mapping from word spellings to integer indices. | |
| int | get_bos_index () const |
| Returns index of beginning-of-sentence token. | |
| int | get_eos_index () const |
| Returns index of end-of-sentence token. | |
| int | get_unknown_index () const |
| Returns index of unknown token. | |
| int | get_ngram_length () const |
| Returns "n" of n-gram. | |
| double | get_prob (const vector< int > &ngram) const |
| Returns conditional prob of last word given previous words. | |
| LangModel::LangModel | ( | const map< string, string > & | params = ParamsType() |
) |
Ctor; get configuration parameters from "params".
| const SymbolTable& LangModel::get_sym_table | ( | ) | const [inline] |
Get associated mapping from word spellings to integer indices.
| int LangModel::get_bos_index | ( | ) | const [inline] |
Returns index of beginning-of-sentence token.
| int LangModel::get_eos_index | ( | ) | const [inline] |
Returns index of end-of-sentence token.
| int LangModel::get_unknown_index | ( | ) | const [inline] |
Returns index of unknown token.
| int LangModel::get_ngram_length | ( | ) | const [inline] |
Returns "n" of n-gram.
| double LangModel::get_prob | ( | const vector< int > & | ngram | ) | const |
Returns conditional prob of last word given previous words.
The argument ngram can be any length from 1 to the value of get_ngram_length().
1.5.5