#include <sent/stddefs.h>
#include <sent/dfa.h>
関数 | |
| static int | cp_find (int *list, int len, int key, int *loc) |
| Search for a terminal ID in a cp list. | |
| 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. | |
| static boolean | cp_add (int **list, int *len, int *alloclen, int val, int loc) |
| Add an terminal ID to a specified location in the cp list. | |
| static boolean | cp_remove (int **list, int *len, int loc) |
| Remove an element from the cp list. | |
| void | set_dfa_cp (DFA_INFO *dfa, int i, int j, boolean value) |
| Set a category-pair matrix bit. | |
| void | set_dfa_cp_begin (DFA_INFO *dfa, int i, boolean value) |
| Set a category-pair matrix bit for the beginning of sentence | |
| void | set_dfa_cp_end (DFA_INFO *dfa, int i, boolean value) |
| Set a category-pair matrix bit for 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, int size) |
| Allocate memory for category pair matrix and initialize it. | |
| boolean | dfa_cp_append (DFA_INFO *dfa, DFA_INFO *src, int offset) |
| Append a categori-pair matrix to another. | |
| void | free_dfa_cp (DFA_INFO *dfa) |
| Free the category pair matrix from DFA grammar. | |
| void | dfa_cp_output_rawdata (FILE *fp, DFA_INFO *dfa) |
| void | dfa_cp_count_size (DFA_INFO *dfa, unsigned long *size_ret, unsigned long *allocsize_ret) |
カテゴリ対制約のメモリ確保,およびカテゴリ間の接続の可否を返す関数です.
cpair.c で定義されています。
| static int cp_find | ( | int * | list, | |
| int | len, | |||
| int | key, | |||
| int * | loc | |||
| ) | [static] |
Search for a terminal ID in a cp list.
Set its location to loc. When not found, the location where to insert the key data iwill be set.
| list | [in] cp list | |
| len | [in] length of list | |
| key | [in] a terminal ID value to find | |
| loc | [out] return the to-be-inserted location of the key |
参照元 dfa_cp()・dfa_cp_begin()・dfa_cp_end()・set_dfa_cp()・set_dfa_cp_begin()・set_dfa_cp_end().
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 |
参照元 beam_inter_word()・can_succeed()・lcdset_register_with_category()・lcdset_register_with_category_all().
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 |
| static boolean cp_add | ( | int ** | list, | |
| int * | len, | |||
| int * | alloclen, | |||
| int | val, | |||
| int | loc | |||
| ) | [static] |
Add an terminal ID to a specified location in the cp list.
| list | [i/o] cp list | |
| len | [i/o] data num in the list | |
| alloclen | [i/o] allocated length of the list | |
| val | [in] value to be added | |
| loc | [in] location where to add the val |
| static boolean cp_remove | ( | int ** | list, | |
| int * | len, | |||
| int | loc | |||
| ) | [static] |
Remove an element from the cp list.
| list | [i/o] cp list | |
| len | [i/o] data num in the list | |
| loc | [in] location of removing value |
Set a category-pair matrix bit for 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. |
参照元 extract_cpair().
| 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, | |||
| int | size | |||
| ) |
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 | |
| size | [in] memory allocation length for each cp list as initial |
参照元 extract_cpair().
Append a categori-pair matrix to another.
This function assumes that other grammar information has been already appended and dfa->term_num contains the new size.
| dfa | [i/o] DFA grammar to which the new category pair will be appended | |
| src | [in] source DFA | |
| offset | [in] appending point at dfa |
参照元 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().
1.5.1