#include <sent/stddefs.h>
#include <sent/ngram2.h>
関数 | |
static NNID | search_ngram_core (NGRAM_INFO *ndata, int n, NNID nid_prev, WORD_ID wkey) |
Search for n-gram tuple. | |
NNID | search_ngram (NGRAM_INFO *ndata, int n, WORD_ID *w) |
Search for N-tuples. | |
LOGPROB | ngram_prob (NGRAM_INFO *ndata, int n, WORD_ID *w) |
Get N-gram probability of the last word w_n, given context w_1^n-1. | |
LOGPROB | uni_prob (NGRAM_INFO *ndata, WORD_ID w) |
Get 1-gram probability of ![]() | |
static NNID | search_bigram (NGRAM_INFO *ndata, WORD_ID w_context, WORD_ID w) |
Find bi-gram entry. | |
static LOGPROB | bi_prob_normal (NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2) |
Get LR bi-gram prob: for LR N-gram | |
static LOGPROB | bi_prob_additional_oldbin (NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2) |
Get LR bi-gram prob: for RL N-gram with additional LR 2-gram, in old bingram format. | |
static LOGPROB | bi_prob_additional (NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2) |
Get LR bi-gram prob: for RL N-gram with additional LR 2-gram. | |
static LOGPROB | bi_prob_compute (NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2) |
Get LR bi-gram prob: for RL N-gram with no LR 2-gram. | |
LOGPROB | bi_prob (NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2) |
Get 2-gram probability This function is not used in Julius, since each function of bi_prob_* will be called directly from the search. | |
void | bi_prob_func_set (NGRAM_INFO *ndata) |
Determinte which bi-gram computation function to be used according to the N-gram type, and set pointer to the proper function into the N-gram data. |
ngram_access.c で定義されています。
static NNID search_ngram_core | ( | NGRAM_INFO * | ndata, | |
int | n, | |||
NNID | nid_prev, | |||
WORD_ID | wkey | |||
) | [static] |
Search for n-gram tuple.
ndata | [in] word/class N-gram | |
n | [in] N of N-gram | |
nid_prev | [in] context (N-1)-gram tuple ID | |
wkey | [in] the target word ID |
ngram_access.c の 43 行で定義されています。
NNID search_ngram | ( | NGRAM_INFO * | ndata, | |
int | n, | |||
WORD_ID * | w | |||
) |
Search for N-tuples.
ndata | [in] word/class N-gram | |
n | [in] N of N-gram (= number of words in w) | |
w | [in] word sequence |
ngram_access.c の 103 行で定義されています。
参照元 add_bigram().
LOGPROB ngram_prob | ( | NGRAM_INFO * | ndata, | |
int | n, | |||
WORD_ID * | w | |||
) |
Get N-gram probability of the last word w_n, given context w_1^n-1.
ndata | [in] word/class N-gram | |
n | [in] N of N-gram (= number of words in w) | |
w | [in] word sequence |
ngram_access.c の 135 行で定義されています。
LOGPROB uni_prob | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w | |||
) |
Get 1-gram probability of in log10.
ndata | [in] word/class N-gram | |
w | [in] word/class ID in N-gram |
ngram_access.c の 229 行で定義されています。
static NNID search_bigram | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w_context, | |||
WORD_ID | w | |||
) | [static] |
Find bi-gram entry.
Assumes ct_compaction and is24bit is FALSE on 2-gram
ndata | [in] N-gram data that holds the 2-gram | |
w_context | [in] context word ID | |
w | [in] target word ID |
ngram_access.c の 249 行で定義されています。
参照元 bi_prob_additional()・bi_prob_additional_oldbin()・bi_prob_compute()・bi_prob_normal().
static LOGPROB bi_prob_normal | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w1, | |||
WORD_ID | w2 | |||
) | [static] |
Get LR bi-gram prob: for LR N-gram
ndata | [in] N-gram data that holds the 2-gram | |
w1 | [in] left context word | |
w2 | [in] right target word |
ngram_access.c の 288 行で定義されています。
static LOGPROB bi_prob_additional_oldbin | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w1, | |||
WORD_ID | w2 | |||
) | [static] |
Get LR bi-gram prob: for RL N-gram with additional LR 2-gram, in old bingram format.
The old format has 2-gram index in reversed orfer, so this function is for old bingram formats.
ndata | [in] N-gram data that holds the 2-gram | |
w1 | [in] left context word | |
w2 | [in] right target word |
ngram_access.c の 320 行で定義されています。
static LOGPROB bi_prob_additional | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w1, | |||
WORD_ID | w2 | |||
) | [static] |
Get LR bi-gram prob: for RL N-gram with additional LR 2-gram.
ndata | [in] N-gram data that holds the 2-gram | |
w1 | [in] left context word | |
w2 | [in] right target word |
ngram_access.c の 351 行で定義されています。
static LOGPROB bi_prob_compute | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w1, | |||
WORD_ID | w2 | |||
) | [static] |
Get LR bi-gram prob: for RL N-gram with no LR 2-gram.
This function will compute the LR 2-gram from the RL 2-gram.
ndata | [in] N-gram data that holds the 2-gram | |
w1 | [in] left context word | |
w2 | [in] right target word |
ngram_access.c の 383 行で定義されています。
LOGPROB bi_prob | ( | NGRAM_INFO * | ndata, | |
WORD_ID | w1, | |||
WORD_ID | w2 | |||
) |
Get 2-gram probability This function is not used in Julius, since each function of bi_prob_* will be called directly from the search.
ndata | [in] N-gram data that holds the 2-gram | |
w1 | [in] left context word | |
w2 | [in] right target word |
ngram_access.c の 419 行で定義されています。
void bi_prob_func_set | ( | NGRAM_INFO * | ndata | ) |
Determinte which bi-gram computation function to be used according to the N-gram type, and set pointer to the proper function into the N-gram data.
ndata | [i/o] N-gram information to use |
ngram_access.c の 449 行で定義されています。
参照元 ngram_read_bin().