#include <sent/stddefs.h>
#include <sent/dfa.h>
cpair.cのインクルード依存関係図
関数 | |
boolean | dfa_cp (DFA_INFO *dfa, int i, int j) |
boolean | dfa_cp_begin (DFA_INFO *dfa, int i) |
boolean | dfa_cp_end (DFA_INFO *dfa, int i) |
void | set_dfa_cp (DFA_INFO *dfa, int i, int j, boolean value) |
void | set_dfa_cp_begin (DFA_INFO *dfa, int i, boolean value) |
void | set_dfa_cp_end (DFA_INFO *dfa, int i, boolean value) |
void | init_dfa_cp (DFA_INFO *dfa) |
void | malloc_dfa_cp (DFA_INFO *dfa, int term_num) |
void | realloc_dfa_cp (DFA_INFO *dfa, int old_term_num, int new_term_num) |
void | free_dfa_cp (DFA_INFO *dfa) |
変数 | |
static unsigned char | cp_table [] |
Bit mask to access category-pair matrix |
cpair.c で定義されています。
Return whether the given two category can be connected or not.
dfa | [in] DFA grammar holding category pair matrix | |
i | [in] category id of left word | |
j | [in] category id of right word |
Return whether the category can be appear at the beginning of sentence.
dfa | [in] DFA grammar holding category pair matrix | |
i | [in] category id of the word |
Return whether the category can be appear at the end of sentence.
dfa | [in] DFA grammar holding category pair matrix | |
i | [in] category id of the word |
Set the category-pair matrix bit
dfa | [out] DFA grammar holding category pair matrix | |
i | [in] category id of left word | |
j | [in] category id of right word | |
value | TRUE if connection allowed, FALSE if connection prohibited. |
Set the category-pair matrix bit at the beginning of sentence
dfa | [out] DFA grammar holding category pair matrix | |
i | [in] category id of the word | |
value | TRUE if the category can appear at the beginning of sentence, FALSE if not. |
Set the category-pair matrix bit at the end of sentence
dfa | [out] DFA grammar holding category pair matrix | |
i | [in] category id of the word | |
value | TRUE if the category can appear at the end of sentence, FALSE if not. |
void init_dfa_cp | ( | DFA_INFO * | dfa | ) |
Initialize category pair matrix in the grammar data.
dfa | [out] DFA grammar to hold category pair matrix |
参照元 dfa_info_new().
void malloc_dfa_cp | ( | DFA_INFO * | dfa, | |
int | term_num | |||
) |
Allocate memory for category pair matrix and initialize it.
dfa | [out] DFA grammar to hold category pair matrix | |
term_num | [in] number of categories in the grammar |
void realloc_dfa_cp | ( | DFA_INFO * | dfa, | |
int | old_term_num, | |||
int | new_term_num | |||
) |
Re-allocate memory for category pair matrix, can be called when the number of category is expanded.
dfa | [I/O] DFA grammar holding category pair matrix | |
old_term_num | [in] number of categories when the last category pair matrix was allocated | |
new_term_num | [in] new number of categories in the grammar |
参照元 cpair_append().
void free_dfa_cp | ( | DFA_INFO * | dfa | ) |
Free the category pair matrix from DFA grammar.
dfa | [i/o] DFA grammar holding category pair matrix |
参照元 dfa_info_free().
unsigned char cp_table[] [static] |
初期値:
{ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }
参照元 dfa_cp()・dfa_cp_begin()・dfa_cp_end()・set_dfa_cp()・set_dfa_cp_begin()・set_dfa_cp_end().