Lines Matching refs:semgraph
91 static const LCHAR* lookUpWord(SR_SemanticGraphImpl* semgraph, wordID wdid);
96 static const LCHAR* lookUpScript(SR_SemanticGraphImpl* semgraph, const LCHAR* script_label);
101 static ESR_ReturnCode accumulate_scripts(SR_SemanticGraphImpl* semgraph, script_list* scripts, sem_partial_path* path_root);
250 static ESR_ReturnCode checkpath_forwardByWordID(SR_SemanticGraphImpl* semgraph,
264 for (atok = atoken_start; atok; atok = ARC_TOKEN_PTR(semgraph->arc_token_list, atok->next_token_index))
268 atok->ilabel, atok->ilabel!=MAXwordID?semgraph->ilabels->words[atok->ilabel]:"max", atok->olabel);
273 if (atok->ilabel < semgraph->ilabels->num_slots && atok->ilabel != WORD_EPSILON_LABEL &&
274 wordmap_whether_in_rule(semgraph->ilabels, *currentWord, atok->ilabel))
277 atok_use = arc_tokens_find_ilabel(semgraph->arc_token_list, semgraph->arcs_for_slot[atok->ilabel], *currentWord);
282 for (a = semgraph->arcs_for_slot[atok->ilabel]; 0 && a; a = ARC_TOKEN_PTR(semgraph->arc_token_list, a->next_token_index))
302 arc_token* atokfna = ARC_TOKEN_PTR(semgraph->arc_token_list, atok->first_next_arc);
307 atok->ilabel, semgraph->ilabels->words[atok->ilabel], atok->olabel);
322 sem_partial_path_print(pp_branch, &sem_partial_paths[0], MAX_SEM_PARTIAL_PATHS, semgraph->ilabels);
325 ESR_ReturnCode rc = checkpath_forwardByWordID(semgraph, heap, atokfna, pp_branch, currentWord);
349 atok->ilabel, semgraph->ilabels->words[atok->ilabel], atok->olabel);
356 static ESR_ReturnCode checkpath_forward(SR_SemanticGraphImpl* semgraph,
371 for (atok = atoken_start; atok; atok = ARC_TOKEN_PTR(semgraph->arc_token_list, atok->next_token_index))
375 atok->ilabel, atok->ilabel!=MAXwordID?semgraph->ilabels->words[atok->ilabel]:"max", atok->olabel);
380 wdID = wordmap_find_index(semgraph->ilabels, firstWord(transp));
382 if (atok->ilabel < semgraph->ilabels->num_slots && atok->ilabel != WORD_EPSILON_LABEL &&
383 wordmap_whether_in_rule(semgraph->ilabels, wdID, atok->ilabel))
386 atok_use = arc_tokens_find_ilabel(semgraph->arc_token_list, semgraph->arcs_for_slot[atok->ilabel], wdID);
391 for (a = semgraph->arcs_for_slot[atok->ilabel]; 0 && a; a = ARC_TOKEN_PTR(semgraph->arc_token_list, a->next_token_index))
399 wdID = wordmap_find_index(semgraph->ilabels, firstWord(transp));
405 wdID = wordmap_find_index(semgraph->ilabels, firstWord(transp));
414 arc_token* atokfna = ARC_TOKEN_PTR(semgraph->arc_token_list, atok->first_next_arc);
419 atok->ilabel, semgraph->ilabels->words[atok->ilabel], atok->olabel);
433 sem_partial_path_print(pp_branch, &sem_partial_paths[0], MAX_SEM_PARTIAL_PATHS, semgraph->ilabels);
436 ESR_ReturnCode rc = checkpath_forward(semgraph, heap, atokfna, pp_branch, transp);
460 atok->ilabel, semgraph->ilabels->words[atok->ilabel], atok->olabel);
490 SR_SemanticGraphImpl* semgraph = (SR_SemanticGraphImpl*) graph;
504 rc = checkpath_forwardByWordID(semgraph, heap, &semgraph->arc_token_list[0], path_root,
530 sem_partial_path_print(path_root, &sem_partial_paths[0], MAX_SEM_PARTIAL_PATHS,semgraph->ilabels);
547 CHKLOG(rc, accumulate_scripts(semgraph, &raw_scripts_buf, path_root));
796 SR_SemanticGraphImpl* semgraph = (SR_SemanticGraphImpl*) graph;
825 debug_base_arc_token = &semgraph->arc_token_list[0];
828 rc = checkpath_forward(semgraph, heap, &semgraph->arc_token_list[0], path_root, prepared_transcription);
866 CHKLOG(rc, accumulate_scripts(semgraph, &raw_scripts_buf, path_root));
1163 static const LCHAR* lookUpWord(SR_SemanticGraphImpl* semgraph, wordID wdid)
1173 if (semgraph->scopes_olabel_offset < semgraph->script_olabel_offset)
1175 mid_offset = semgraph->scopes_olabel_offset;
1176 mid_words = semgraph->scopes_olabels;
1177 upper_offset = semgraph->script_olabel_offset;
1178 upper_words = semgraph->scripts;
1182 mid_offset = semgraph->script_olabel_offset;
1183 mid_words = semgraph->scripts;
1184 upper_offset = semgraph->scopes_olabel_offset;
1185 upper_words = semgraph->scopes_olabels;
1188 if (wdID < mid_offset && wdID < semgraph->ilabels->num_words)
1190 return semgraph->ilabels->words[wdID];
1208 static const LCHAR* lookUpScript(SR_SemanticGraphImpl* semgraph, const LCHAR* script_label)
1214 if (index > semgraph->scripts->num_words)
1217 return semgraph->scripts->words[index];
1235 static ESR_ReturnCode accumulate_scripts(SR_SemanticGraphImpl* semgraph,
1255 word = lookUpWord(semgraph, atok->olabel);
1281 if (wordmap_find_index(semgraph->scripts, word) != MAXwordID)