|
TRF Language Model
|
Classes | |
| class | AISConfig |
| class | Algfb |
| class | AlgNode |
| the forward-backward algorithms for TRF model More... | |
| class | CorpusBase |
| class | CorpusRandSelect |
| class | CorpusTxt |
| class | Feat |
| include all the feature table More... | |
| class | FeatStyle |
| Analyse a determinate feat style (without ":") More... | |
| class | FeatTable |
| define the feature style. such as "w3"(word-3gram); "c2"(class-2gram); More... | |
| class | LearningRate |
| class | MLfunc |
| class | Model |
| TRF model. More... | |
| class | Model_FastSample |
| TRF model, revise the sample method to speedup the MCMC. More... | |
| class | Msg |
| class | RandSeq |
| class | SAfunc |
| class | SAtrain |
| class | Seq |
| define a sequence including the word sequence and class sequence More... | |
| class | ThreadData |
| class | VecIter |
| class | Vocab |
Typedefs | |
| typedef double | PValue |
| typedef double | LogP |
| typedef double | Prob |
| typedef int | VocabID |
Functions | |
| int | omp_rand (int thread_num) |
| LogP | LogLineNormalize (LogP *pdProbs, int nNum) |
| int | LogLineSampling (const LogP *pdProbs, int nNum) |
| void | LineNormalize (Prob *pdProbs, int nNum) |
| int | LineSampling (const Prob *pdProbs, int nNum) |
| bool | Acceptable (Prob prob) |
| void | RandomPos (int *a, int len, int n) |
| double | dRand (double dmin, double dmax) |
| get a random float between dmin and dmax More... | |
| int | omp_nrand (int nMin, int nMax) |
| get a random integer int [nMin, nMax-1] More... | |
| void | EasySmooth (Prob *p, int num, Prob threshold=1e-5) |
| smooth a distribution More... | |
| double | GetAISFactor (int t, int T) |
| Get the AIS intermediate factor beta_t. More... | |
| double | SigmFunc (double x) |
| calculate the sigmoid function f(x) = 1/(1+exp(-x)) More... | |
| Prob | LogP2Prob (LogP x) |
| LogP | Prob2LogP (Prob x) |
| LogP | Log_Sum (LogP x, LogP y) |
| LogP | Log_Sub (LogP x, LogP y) |
| log[exp(x)-exp(y)] More... | |
| LogP | Log_Sum (LogP *p, int num) |
| log summate all the values in array More... | |
| int | qsort_compare_double (const void *a, const void *b) |
Variables | |
| const float | INF = 1e20 |
| const float | LogP_zero = -INF |
| const int | c_nMaxOrder = 100 |
| const int | VocabID_none = -1 |
| const int | VocabID_seqbeg = -3 |
| const int | VocabID_seqend = -2 |
| typedef double trf::PValue |
| typedef int trf::VocabID |
Definition at line 23 of file trf-vocab.h.
| bool trf::Acceptable | ( | Prob | prob | ) |
Definition at line 127 of file trf-def.cpp.
| double trf::dRand | ( | double | dmin, |
| double | dmax | ||
| ) |
get a random float between dmin and dmax
Definition at line 147 of file trf-def.cpp.
smooth a distribution
Definition at line 157 of file trf-def.cpp.
| double trf::GetAISFactor | ( | int | t, |
| int | T | ||
| ) |
Get the AIS intermediate factor beta_t.
Definition at line 165 of file trf-def.cpp.
| void trf::LineNormalize | ( | Prob * | pdProbs, |
| int | nNum | ||
| ) |
Definition at line 87 of file trf-def.cpp.
| int trf::LineSampling | ( | const Prob * | pdProbs, |
| int | nNum | ||
| ) |
Definition at line 103 of file trf-def.cpp.
Definition at line 53 of file trf-def.cpp.
| int trf::LogLineSampling | ( | const LogP * | pdProbs, |
| int | nNum | ||
| ) |
Definition at line 62 of file trf-def.cpp.
| int trf::omp_nrand | ( | int | nMin, |
| int | nMax | ||
| ) |
get a random integer int [nMin, nMax-1]
Definition at line 152 of file trf-def.cpp.
| int trf::omp_rand | ( | int | thread_num = -1 | ) |
a thread-safe version of rand() if thread_num != -1, then init the thread state if thread_num = -1, then get a random values.
Definition at line 23 of file trf-def.cpp.
| int trf::qsort_compare_double | ( | const void * | a, |
| const void * | b | ||
| ) |
Definition at line 137 of file trf-sa-train.cpp.
| void trf::RandomPos | ( | int * | a, |
| int | len, | ||
| int | n | ||
| ) |
Definition at line 132 of file trf-def.cpp.
| double trf::SigmFunc | ( | double | x | ) |
calculate the sigmoid function f(x) = 1/(1+exp(-x))
Definition at line 177 of file trf-def.cpp.
| const int trf::c_nMaxOrder = 100 |
Definition at line 24 of file trf-feature.h.
| const int trf::VocabID_none = -1 |
Definition at line 24 of file trf-vocab.h.
| const int trf::VocabID_seqbeg = -3 |
Definition at line 25 of file trf-vocab.h.
| const int trf::VocabID_seqend = -2 |
Definition at line 26 of file trf-vocab.h.