Home | History | Annotate | Download | only in engine

Lines Matching full:loctset

90 static NJ_INT16 search_node(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset);
91 static NJ_INT16 bdic_search_data(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset);
92 static NJ_INT16 bdic_search_fore_data(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset);
96 static NJ_INT16 search_node2(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset,
99 NJ_SEARCH_LOCATION_SET *loctset, NJ_UINT16 hidx);
114 NJ_SEARCH_LOCATION_SET *loctset,
116 static NJ_INT16 bdic_get_word_freq(NJ_UINT8 *data_top, NJ_SEARCH_LOCATION_SET *loctset,
550 static NJ_INT16 search_node(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset)
585 root = NODE_AREA_TOP_ADDR(loctset->loct.handle);
588 node_mid = root + NODE_AREA_MID_ADDR(loctset->loct.handle);
595 bit_left = BIT_NODE_AREA_LEFT_LEN(loctset->loct.handle);
596 bit_data = BIT_NODE_AREA_DATA_LEN(loctset->loct.handle);
598 ytbl_cnt = YOMI_INDX_CNT(loctset->loct.handle);
599 y = YOMI_INDX_SIZE(loctset->loct.handle);
600 ytbl_top = YOMI_INDX_TOP_ADDR(loctset->loct.handle);
602 data_top = STEM_AREA_TOP_ADDR(loctset->loct.handle);
619 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
680 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
734 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
747 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
760 loctset->loct.status = NJ_ST_SEARCH_END;
773 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
802 loctset->loct.status = NJ_ST_SEARCH_END;
819 loctset->loct.status = NJ_ST_SEARCH_END;
844 loctset->loct.top = data_offset;
845 loctset->loct.current = 0;
849 bottom = loctset->loct.top;
950 next = get_stem_next(loctset->loct.handle, stem_data);
953 loctset->loct.bottom = (NJ_UINT32)(stem_data - data_top);
956 stem_data = data_top + loctset->loct.top;
958 hindo = (NJ_UINT16) *((NJ_UINT8*)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
959 + get_stem_hindo(loctset->loct.handle, stem_data)));
967 j = get_stem_next(loctset->loct.handle, stem_data);
971 while (stem_data <= (data_top + loctset->loct.bottom)) {
974 hindo = (NJ_UINT16) *((NJ_UINT8*)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
975 + get_stem_hindo(loctset->loct.handle, stem_data)));
984 j = get_stem_next(loctset->loct.handle, stem_data);
989 loctset->cache_freq = CALCULATE_HINDO(hindo_max, loctset->dic_freq.base,
990 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
991 loctset->loct.current = hindo_max_data;
998 static NJ_INT16 bdic_search_data(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset)
1005 data = STEM_AREA_TOP_ADDR(loctset->loct.handle);
1006 data += loctset->loct.top + loctset->loct.current;
1008 if (GET_LOCATION_STATUS(loctset->loct.status) != NJ_ST_SEARCH_NO_INIT) {
1012 loctset->loct.status = NJ_ST_SEARCH_END;
1017 i = get_stem_next(loctset->loct.handle, data);
1023 if (NJ_GET_DIC_FMT(loctset->loct.handle) == NJ_DIC_FMT_KANAKAN) {
1024 data_end = loctset->loct.handle
1026 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_DATA_SIZE)
1027 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_EXT_SIZE)
1030 data_end = CAND_IDX_AREA_TOP_ADDR(loctset->loct.handle);
1035 loctset->loct.status = NJ_ST_SEARCH_READY;
1036 loctset->loct.current += current;
1037 hindo = (NJ_UINT16) *((NJ_UINT8*)(HINDO_NO_TOP_ADDR(loctset->loct.handle) +
1038 get_stem_hindo(loctset->loct.handle, data)));
1039 loctset->cache_freq = CALCULATE_HINDO(hindo, loctset->dic_freq.base,
1040 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
1044 loctset->loct.status = NJ_ST_SEARCH_END;
1048 static NJ_INT16 bdic_search_fore_data(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset)
1055 NJ_UINT32 current = loctset->loct.current;
1061 if (GET_LOCATION_STATUS(loctset->loct.status) == NJ_ST_SEARCH_NO_INIT) {
1062 loctset->loct.status = NJ_ST_SEARCH_READY;
1063 loctset->loct.current_info = CURRENT_INFO_SET;
1068 data_top = STEM_AREA_TOP_ADDR(loctset->loct.handle);
1071 data = data_top + loctset->loct.top + loctset->loct.current;
1077 bottom = data_top + loctset->loct.bottom;
1079 if (NJ_GET_DIC_FMT(loctset->loct.handle) == NJ_DIC_FMT_KANAKAN) {
1080 data_end = loctset->loct.handle
1082 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_DATA_SIZE)
1083 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_EXT_SIZE)
1086 data_end = CAND_IDX_AREA_TOP_ADDR(loctset->loct.handle);
1095 i = get_stem_next(loctset->loct.handle, data);
1101 if (loctset->cache_freq == 0) {
1103 loctset->loct.status = NJ_ST_SEARCH_END;
1107 loctset->loct.status = NJ_ST_SEARCH_END;
1111 loctset->cache_freq -= 1;
1114 data = data_top + loctset->loct.top;
1122 loctset->loct.status = NJ_ST_SEARCH_READY;
1123 loctset->loct.current_info = CURRENT_INFO_SET;
1124 loctset->loct.current = hindo_data;
1125 loctset->cache_freq = hindo_max;
1130 hindo = (NJ_INT16) *((NJ_UINT8*)(HINDO_NO_TOP_ADDR(loctset->loct.handle) + get_stem_hindo(loctset->loct.handle, data)));
1132 hindo = CALCULATE_HINDO(hindo, loctset->dic_freq.base,
1133 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
1136 if (hindo == loctset->cache_freq) {
1137 loctset->loct.status = NJ_ST_SEARCH_READY;
1138 loctset->loct.current_info = CURRENT_INFO_SET;
1139 loctset->loct.current = current;
1143 if (hindo < loctset->cache_freq) {
1155 i = get_stem_next(loctset->loct.handle, data);
1162 loctset->loct.status = NJ_ST_SEARCH_END;
1167 hindo = (NJ_INT16) *((NJ_UINT8*)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
1168 + get_stem_hindo(loctset->loct.handle, data)));
1169 loctset->cache_freq = CALCULATE_HINDO(hindo, loctset->dic_freq.base,
1170 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
1171 loctset->loct.status = NJ_ST_SEARCH_READY;
1172 loctset->loct.current_info = CURRENT_INFO_SET;
1173 loctset->loct.current = current;
1177 loctset->loct.status = NJ_ST_SEARCH_END;
1181 NJ_INT16 njd_b_search_word(NJ_SEARCH_CONDITION *con, NJ_SEARCH_LOCATION_SET *loctset)
1195 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1201 if (APPEND_YOMI_FLG(loctset->loct.handle) == 0) {
1202 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1206 if ((NJ_GET_DIC_TYPE_EX(loctset->loct.type, loctset->loct.handle) != NJ_DIC_TYPE_CUSTOM_COMPRESS)
1208 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1214 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1218 if (con->ylen > NJ_GET_MAX_YLEN(loctset->loct.handle)) {
1219 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1223 if (GET_LOCATION_STATUS(loctset->loct.status) == NJ_ST_SEARCH_NO_INIT) {
1228 ret = search_node(con, loctset);
1232 ret = bdic_search_data(con, loctset);
1235 loctset->loct.status = NJ_ST_SEARCH_END;
1240 for (hIdx = 0; (hIdx < NJ_MAX_DIC) && (pdicinfo->handle != loctset->loct.handle); hIdx++) {
1246 loctset->loct.status = NJ_ST_SEARCH_END;
1252 ret = search_node(con, loctset);
1256 ret = bdic_search_fore_data(con, loctset);
1258 ret = search_node2(con, loctset, hIdx);
1262 ret = search_node2(con, loctset, hIdx);
1267 ret = bdic_search_fore_data2(con, loctset, hIdx);
1271 loctset->loct.status = NJ_ST_SEARCH_END;
1275 loctset->loct.status = NJ_ST_SEARCH_END_EXT;
1278 } else if (GET_LOCATION_STATUS(loctset->loct.status) == NJ_ST_SEARCH_READY) {
1282 ret = bdic_search_data(con, loctset);
1285 loctset->loct.status = NJ_ST_SEARCH_END;
1290 for (hIdx = 0; (hIdx < NJ_MAX_DIC) && (pdicinfo->handle != loctset->loct.handle); hIdx++) {
1296 loctset->loct.status = NJ_ST_SEARCH_END;
1302 ret = bdic_search_fore_data(con, loctset);
1304 ret = bdic_search_fore_data2(con, loctset, hIdx);
1308 loctset->loct.status = NJ_ST_SEARCH_END;
1312 loctset->loct.status = NJ_ST_SEARCH_END;
1316 loctset->loct.status = NJ_ST_SEARCH_END;
1322 NJ_INT16 njd_b_get_word(NJ_SEARCH_LOCATION_SET *loctset, NJ_WORD *word)
1331 if (GET_LOCATION_STATUS(loctset->loct.status) == NJ_ST_SEARCH_END) {
1335 if (GET_LOCATION_OPERATION(loctset->loct.status) == NJ_CUR_OP_FORE) {
1336 data = STEM_AREA_TOP_ADDR(loctset->loct.handle);
1337 data += loctset->loct.top + loctset->loct.current;
1345 data = STEM_AREA_TOP_ADDR(loctset->loct.handle);
1346 data += loctset->loct.top + loctset->loct.current;
1353 get_stem_word(loctset->loct.handle, data, &stem_set, check);
1355 if (GET_LOCATION_OPERATION(loctset->loct.status) == NJ_CUR_OP_FORE) {
1364 if (GET_LOCATION_OPERATION(loctset->loct.status) == NJ_CUR_OP_FORE) {
1381 word->stem.hindo = CALCULATE_HINDO(stem_set.hindo_jitu, loctset->dic_freq.base,
1382 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
1383 word->stem.loc = loctset->loct;
1539 static NJ_INT16 search_node2(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset, NJ_UINT16 hidx)
1587 root = NODE_AREA_TOP_ADDR(loctset->loct.handle);
1590 node_mid = root + NODE_AREA_MID_ADDR(loctset->loct.handle);
1593 bit_left = BIT_NODE_AREA_LEFT_LEN(loctset->loct.handle);
1594 bit_data = BIT_NODE_AREA_DATA_LEN(loctset->loct.handle);
1596 ytbl_cnt = YOMI_INDX_CNT(loctset->loct.handle);
1597 y = YOMI_INDX_SIZE(loctset->loct.handle);
1598 ytbl_top = YOMI_INDX_TOP_ADDR(loctset->loct.handle);
1600 data_top = STEM_AREA_TOP_ADDR(loctset->loct.handle);
1665 loctset->loct.handle,
1720 loctset->loct.handle,
1799 loctset->loct.handle,
1858 loctset->loct.handle,
1885 loctset->loct.status = NJ_ST_SEARCH_END;
1889 loctset->loct.current = 0;
1911 hindo = (NJ_UINT16) *((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle) +
1912 get_stem_hindo(loctset->loct.handle, stem_data)));
1927 j = get_stem_next(loctset->loct.handle, stem_data);
1932 hindo = (NJ_UINT16) *((NJ_UINT8 *) (HINDO_NO_TOP_ADDR(loctset->loct.handle) +
1933 get_stem_hindo(loctset->loct.handle, stem_data)));
1952 hindo = (NJ_UINT16) *((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
1953 + get_stem_hindo(loctset->loct.handle, stem_data)));
1960 loctset->loct.top = psrhCache->storebuff[abIdx_current].top;
1961 loctset->loct.bottom = psrhCache->storebuff[abIdx_current].bottom;
1963 loctset->cache_freq = CALCULATE_HINDO(hindo_max, loctset->dic_freq.base,
1964 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
1965 loctset->loct.current = hindo_max_data;
1966 loctset->loct.current_cache = (NJ_UINT8)abIdx_current;
2377 static NJ_INT16 bdic_search_fore_data2(NJ_SEARCH_CONDITION *condition, NJ_SEARCH_LOCATION_SET *loctset, NJ_UINT16 hidx)
2382 NJ_UINT32 current = loctset->loct.current;
2409 if (GET_LOCATION_STATUS(loctset->loct.status) == NJ_ST_SEARCH_NO_INIT) {
2410 loctset->loct.status = NJ_ST_SEARCH_READY;
2411 loctset->loct.current_info = CURRENT_INFO_SET;
2418 data_top = STEM_AREA_TOP_ADDR(loctset->loct.handle);
2441 hindo = (NJ_UINT16) *((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle) +
2442 get_stem_hindo(loctset->loct.handle, data)));
2457 i = get_stem_next(loctset->loct.handle, data);
2462 hindo = (NJ_UINT16) *((NJ_UINT8 *) (HINDO_NO_TOP_ADDR(loctset->loct.handle) +
2463 get_stem_hindo(loctset->loct.handle, data)));
2484 hindo = (NJ_UINT16) *((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
2485 + get_stem_hindo(loctset->loct.handle, data)));
2492 loctset->loct.top = psrhCache->storebuff[abIdx_current].top;
2493 loctset->loct.bottom = psrhCache->storebuff[abIdx_current].bottom;
2495 loctset->cache_freq = CALCULATE_HINDO(hindo_max, loctset->dic_freq.base,
2496 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
2497 loctset->loct.current = hindo_max_data;
2498 loctset->loct.current_cache = (NJ_UINT8)abIdx_current;
2504 data = data_top + loctset->loct.top;
2506 hindo = (NJ_UINT16) *((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle) +
2507 get_stem_hindo(loctset->loct.handle, data)));
2515 i = get_stem_next(loctset->loct.handle, data);
2520 while (data <= (data_top + loctset->loct.bottom)) {
2523 hindo = (NJ_UINT16)*((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle) +
2524 get_stem_hindo(loctset->loct.handle, data)));
2533 i = get_stem_next(loctset->loct.handle, data);
2538 loctset->cache_freq = CALCULATE_HINDO(hindo_max,
2539 loctset->dic_freq.base,
2540 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
2541 loctset->loct.current = hindo_max_data;
2548 data_top = STEM_AREA_TOP_ADDR(loctset->loct.handle);
2551 data = data_top + loctset->loct.top + loctset->loct.current;
2555 bottom = data_top + loctset->loct.bottom;
2557 if (NJ_GET_DIC_FMT(loctset->loct.handle) == NJ_DIC_FMT_KANAKAN) {
2558 data_end = loctset->loct.handle
2560 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_DATA_SIZE)
2561 + NJ_INT32_READ(loctset->loct.handle + NJ_DIC_POS_EXT_SIZE)
2564 data_end = CAND_IDX_AREA_TOP_ADDR(loctset->loct.handle);
2583 loctset->loct.status = NJ_ST_SEARCH_END;
2587 old_abIdx = loctset->loct.current_cache;
2592 ret = bdic_get_next_data(data_top, data_end, loctset, psrhCache, old_abIdx);
2594 if (ret == loctset->cache_freq) {
2599 loctset->loct.status = NJ_ST_SEARCH_READY;
2600 loctset->loct.current_info = CURRENT_INFO_SET;
2601 loctset->loct.current = psrhCache->storebuff[old_abIdx].current;
2602 loctset->loct.current_cache = (NJ_UINT8)old_abIdx;
2628 ret = bdic_get_word_freq(data_top, loctset, psrhCache, current_abIdx);
2630 if ((ret == loctset->cache_freq) &&
2631 (loctset->loct.top == psrhCache->storebuff[current_abIdx].top) &&
2632 (loctset->loct.current == psrhCache->storebuff[current_abIdx].current)) {
2633 ret = bdic_get_next_data(data_top, data_end, loctset, psrhCache, current_abIdx);
2636 if (ret == loctset->cache_freq) {
2638 loctset->loct.status = NJ_ST_SEARCH_READY;
2639 loctset->loct.current_info = CURRENT_INFO_SET;
2640 loctset->loct.top = psrhCache->storebuff[current_abIdx].top;
2641 loctset->loct.bottom = psrhCache->storebuff[current_abIdx].bottom;
2642 loctset->loct.current = psrhCache->storebuff[current_abIdx].current;
2643 loctset->loct.current_cache = (NJ_UINT8)current_abIdx;
2670 loctset->loct.status = NJ_ST_SEARCH_READY;
2671 loctset->loct.current_info = CURRENT_INFO_SET;
2672 loctset->loct.top = psrhCache->storebuff[current_abIdx].top;
2673 loctset->loct.bottom = psrhCache->storebuff[current_abIdx].bottom;
2674 loctset->loct.current = psrhCache->storebuff[current_abIdx].current;
2675 loctset->loct.current_cache = (NJ_UINT8)current_abIdx;
2680 loctset->cache_freq = save_hindo;
2681 loctset->loct.status = NJ_ST_SEARCH_READY;
2682 loctset->loct.current_info = CURRENT_INFO_SET;
2683 loctset->loct.top = psrhCache->storebuff[save_abIdx].top;
2684 loctset->loct.bottom = psrhCache->storebuff[save_abIdx].bottom;
2685 loctset->loct.current = psrhCache->storebuff[save_abIdx].current;
2686 loctset->loct.current_cache = (NJ_UINT8)save_abIdx;
2696 i = get_stem_next(loctset->loct.handle, data);
2703 loctset->loct.status = NJ_ST_SEARCH_END;
2708 hindo = (NJ_INT16)*((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
2709 + get_stem_hindo(loctset->loct.handle, data)));
2710 loctset->cache_freq = CALCULATE_HINDO(hindo, loctset->dic_freq.base,
2711 loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
2712 loctset->loct.status = NJ_ST_SEARCH_READY;
2713 loctset->loct.current_info = CURRENT_INFO_SET;
2714 loctset->loct.current = current;
2718 loctset->loct.status = NJ_ST_SEARCH_END;
2723 NJ_SEARCH_LOCATION_SET *loctset,
2735 NJ_INT16 freq_org = loctset->cache_freq;
2756 i = get_stem_next(loctset->loct.handle, data);
2784 hindo = (NJ_INT16)*((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
2785 + get_stem_hindo(loctset->loct.handle, data)));
2787 hindo = CALCULATE_HINDO(hindo, loctset->dic_freq.base, loctset->dic_freq.high, COMP_DIC_FREQ_DIV);
2808 static NJ_INT16 bdic_get_word_freq(NJ_UINT8 * data_top, NJ_SEARCH_LOCATION_SET * loctset,
2820 hindo = (NJ_INT16)*((NJ_UINT8 *)(HINDO_NO_TOP_ADDR(loctset->loct.handle)
2821 + get_stem_hindo(loctset->loct.handle, data)));
2823 hindo = CALCULATE_HINDO(hindo, loctset->dic_freq.base, loctset->dic_freq.high, COMP_DIC_FREQ_DIV);