#include <sent/stddefs.h>
#include <sent/dfa.h>
| 関数 | |
| boolean | dfa_cp (DFA_INFO *dfa, int i, int j) | 
| Return whether the given two category can be connected or not. | |
| boolean | dfa_cp_begin (DFA_INFO *dfa, int i) | 
| Return whether the category can be appear at the beginning of sentence. | |
| boolean | dfa_cp_end (DFA_INFO *dfa, int i) | 
| Return whether the category can be appear at the end of sentence. | |
| void | set_dfa_cp (DFA_INFO *dfa, int i, int j, boolean value) | 
| Set the category-pair matrix bit | |
| void | set_dfa_cp_begin (DFA_INFO *dfa, int i, boolean value) | 
| Set the category-pair matrix bit at the beginning of sentence | |
| void | set_dfa_cp_end (DFA_INFO *dfa, int i, boolean value) | 
| Set the category-pair matrix bit at the end of sentence | |
| void | init_dfa_cp (DFA_INFO *dfa) | 
| Initialize category pair matrix in the grammar data. | |
| void | malloc_dfa_cp (DFA_INFO *dfa, int term_num) | 
| Allocate memory for category pair matrix and initialize it. | |
| 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. | |
| void | free_dfa_cp (DFA_INFO *dfa) | 
| Free the category pair matrix from DFA grammar. | |
| 変数 | |
| static unsigned char | cp_table [] | 
| Bit mask to access category-pair matrix | |
カテゴリ対制約のメモリ確保,およびカテゴリ間の接続の可否を返す関数です.
cpair.c で定義されています。
| boolean dfa_cp | ( | DFA_INFO * | dfa, | |
| int | i, | |||
| int | j | |||
| ) | 
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 | 
参照元 cpair_append(), と print_dfa_cp().
| boolean dfa_cp_begin | ( | DFA_INFO * | dfa, | |
| int | i | |||
| ) | 
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 | 
参照元 cpair_append(), と print_dfa_cp().
| boolean dfa_cp_end | ( | DFA_INFO * | dfa, | |
| int | i | |||
| ) | 
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 | 
参照元 cpair_append(), と print_dfa_cp().
| void set_dfa_cp | ( | DFA_INFO * | dfa, | |
| int | i, | |||
| int | j, | |||
| boolean | value | |||
| ) | 
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. | 
参照元 cpair_append(), extract_cpair(), malloc_dfa_cp(), と realloc_dfa_cp().
| void set_dfa_cp_begin | ( | DFA_INFO * | dfa, | |
| int | i, | |||
| boolean | value | |||
| ) | 
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. | 
参照元 cpair_append(), extract_cpair(), malloc_dfa_cp(), と realloc_dfa_cp().
| void set_dfa_cp_end | ( | DFA_INFO * | dfa, | |
| int | i, | |||
| boolean | value | |||
| ) | 
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. | 
参照元 cpair_append(), extract_cpair(), malloc_dfa_cp(), と realloc_dfa_cp().
| 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 | 
参照元 extract_cpair(), と realloc_dfa_cp().
| 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().
 1.5.4
 1.5.4