/packages/inputmethods/PinyinIME/jni/include/ |
D | splparser.h | 42 uint16 splstr_to_idxs(const char *splstr, uint16 str_len, uint16 splidx[], 43 uint16 start_pos[], uint16 max_size, bool &last_is_pre); 48 uint16 splstr_to_idxs_f(const char *splstr, uint16 str_len, uint16 splidx[], 49 uint16 start_pos[], uint16 max_size, bool &last_is_pre); 53 uint16 splstr16_to_idxs(const char16 *splstr, uint16 str_len, uint16 splidx[], 54 uint16 start_pos[], uint16 max_size, bool &last_is_pre); 58 uint16 splstr16_to_idxs_f(const char16 *splstr16, uint16 str_len, 59 uint16 splidx[], uint16 start_pos[], 60 uint16 max_size, bool &last_is_pre); 67 uint16 get_splid_by_str(const char *splstr, uint16 str_len, bool *is_pre); [all …]
|
D | userdict.h | 44 void reset_milestones(uint16 from_step, MileStoneHandle from_handle); 50 size_t get_lpis(const uint16 *splid_str, uint16 splid_str_len, 53 uint16 get_lemma_str(LemmaIdType id_lemma, char16* str_buf, 54 uint16 str_max); 56 uint16 get_lemma_splids(LemmaIdType id_lemma, uint16 *splids, 57 uint16 splids_max, bool arg_valid); 59 size_t predict(const char16 last_hzs[], uint16 hzs_len, 64 LemmaIdType put_lemma(char16 lemma_str[], uint16 splids[], 65 uint16 lemma_len, uint16 count); 70 LemmaIdType get_lemma_id(char16 lemma_str[], uint16 splids[], [all …]
|
D | spellingtrie.h | 33 uint16 spelling_idx:11; 34 uint16 num_of_son:5; 44 static const uint16 kHalfIdShengmuMask = 0x01; 45 static const uint16 kHalfIdYunmuMask = 0x02; 46 static const uint16 kHalfIdSzmMask = 0x04; 111 uint16 h2f_start_[kFullSplIdStart]; 112 uint16 h2f_num_[kFullSplIdStart]; 115 uint16 *f2h_; 179 bool if_valid_id_update(uint16 *splid) const; 182 bool is_half_id(uint16 splid) const; [all …]
|
D | dicttrie.h | 54 uint16 mark_start; 55 uint16 mark_num; 74 uint16 *splid_le0_index_; 89 uint16 parsing_marks_pos_; 122 uint16 lma_len); 142 bool try_extend(const uint16 *splids, uint16 splid_num, LemmaIdType id_lemma); 171 void convert_to_hanzis(char16 *str, uint16 str_len); 173 void convert_to_scis_ids(char16 *str, uint16 str_len); 184 void reset_milestones(uint16 from_step, MileStoneHandle from_handle); 191 size_t get_lpis(const uint16 *splid_str, uint16 splid_str_len, [all …]
|
D | matrixsearch.h | 39 uint16 spl_id; 63 uint16 step; 71 uint16 mtrx_nd_num; 72 uint16 dmi_num:15; 98 uint16 dmi_has_full_id:1; 117 uint16 spl_ids[kMaxRowNum]; 118 uint16 spl_start[kMaxRowNum]; 120 uint16 sublma_start[kMaxRowNum]; // Counted in Chinese characters. 122 uint16 length; // Counted in Chinese characters. 208 uint16 lma_start_[kMaxRowNum]; // Counted in spelling ids. [all …]
|
D | atomdictbase.h | 109 virtual void reset_milestones(uint16 from_step, 139 virtual size_t get_lpis(const uint16 *splid_str, uint16 splid_str_len, 150 virtual uint16 get_lemma_str(LemmaIdType id_lemma, char16 *str_buf, 151 uint16 str_max) = 0; 165 virtual uint16 get_lemma_splids(LemmaIdType id_lemma, uint16 *splids, 166 uint16 splids_max, bool arg_valid) = 0; 181 virtual size_t predict(const char16 last_hzs[], uint16 hzs_len, 194 virtual LemmaIdType put_lemma(char16 lemma_str[], uint16 splids[], 195 uint16 lemma_len, uint16 count) = 0; 217 virtual LemmaIdType get_lemma_id(char16 lemma_str[], uint16 splids[], [all …]
|
D | dictdef.h | 29 typedef unsigned short uint16; typedef 69 typedef uint16 LmaScoreType; 70 typedef uint16 KeyScoreType; 90 uint16 half_splid:5; 91 uint16 full_splid:11; 114 uint16 spl_idx; 115 uint16 num_of_son; 116 uint16 num_of_homo; 124 uint16 son_1st_off_l; // Low bits of the son_1st_off 125 uint16 homo_idx_buf_off_l; // Low bits of the homo_idx_buf_off_1 [all …]
|
D | searchutility.h | 26 typedef uint16 PoolPosType; 29 typedef uint16 MileStoneHandle; 35 uint16 psb; // The score, the lower psb, the higher possibility. 51 uint16 his_len; // The length of the history used to do the prediction. 79 uint16 splids[kMaxSearchSteps]; 83 uint16 splids_extended; 87 uint16 ext_len; 96 uint16 step_no; 104 uint16 id_start; 108 uint16 id_num;
|
D | dictlist.h | 94 uint16 get_lemma_str(LemmaIdType id_hz, char16 *str_buf, uint16 str_max); 96 void convert_to_hanzis(char16 *str, uint16 str_len); 98 void convert_to_scis_ids(char16 *str, uint16 str_len); 107 size_t predict(const char16 last_hzs[], uint16 hzs_len, 113 uint16 get_splids_for_hanzi(char16 hanzi, uint16 half_splid, 114 uint16 *splids, uint16 max_splids); 116 LemmaIdType get_lemma_id(const char16 *str, uint16 str_len);
|
D | lpicache.h | 33 uint16 *lpi_cache_len_; 44 bool is_cached(uint16 splid); 51 size_t put_cache(uint16 splid, LmaPsbItem lpi_items[], size_t lpi_num); 57 size_t get_cache(uint16 splid, LmaPsbItem lpi_items[], size_t lpi_max);
|
D | pinyinime.h | 150 size_t im_get_spl_start_pos(const uint16 *&spl_start);
|
/packages/inputmethods/PinyinIME/jni/share/ |
D | splparser.cpp | 30 uint16 SpellingParser::splstr_to_idxs(const char *splstr, uint16 str_len, in splstr_to_idxs() 31 uint16 spl_idx[], uint16 start_pos[], in splstr_to_idxs() 32 uint16 max_size, bool &last_is_pre) { in splstr_to_idxs() 43 uint16 str_pos = 0; in splstr_to_idxs() 44 uint16 idx_num = 0; in splstr_to_idxs() 54 uint16 id_this = node_this->spelling_idx; in splstr_to_idxs() 108 uint16 id_this = node_this->spelling_idx; in splstr_to_idxs() 128 uint16 id_this = node_this->spelling_idx; in splstr_to_idxs() 143 uint16 SpellingParser::splstr_to_idxs_f(const char *splstr, uint16 str_len, in splstr_to_idxs_f() 144 uint16 spl_idx[], uint16 start_pos[], in splstr_to_idxs_f() [all …]
|
D | lpicache.cpp | 26 lpi_cache_len_ = new uint16[kFullSplIdStart]; in LpiCache() 29 for (uint16 id = 0; id < kFullSplIdStart; id++) in LpiCache() 49 bool LpiCache::is_cached(uint16 splid) { in is_cached() 55 size_t LpiCache::put_cache(uint16 splid, LmaPsbItem lpi_items[], in put_cache() 57 uint16 num = kMaxLpiCachePerId; in put_cache() 59 num = static_cast<uint16>(lpi_num); in put_cache() 62 for (uint16 pos = 0; pos < num; pos++) in put_cache() 69 size_t LpiCache::get_cache(uint16 splid, LmaPsbItem lpi_items[], in get_cache() 75 for (uint16 pos = 0; pos < lpi_max; pos++) { in get_cache()
|
D | dicttrie.cpp | 97 for (uint16 pos = kLemmaIdSize - 1; pos > 0; pos--) in get_lemma_id() 196 splid_le0_index_ = static_cast<uint16*>(malloc(buf_size * sizeof(uint16))); in load_dict() 223 uint16 last_splid = kFullSplIdStart; in load_dict() 226 for (uint16 splid = last_splid; splid < root_[i].spl_idx; splid++) in load_dict() 230 static_cast<uint16>(i); in load_dict() 235 for (uint16 splid = last_splid + 1; in load_dict() 335 uint16 lma_len) { in fill_lpi_buffer() 351 void DictTrie::reset_milestones(uint16 from_step, MileStoneHandle from_handle) { in reset_milestones() 394 uint16 splid = dep->splids[dep->splids_extended]; in extend_dict0() 395 uint16 id_start = dep->id_start; in extend_dict0() [all …]
|
D | spellingtrie.cpp | 114 bool SpellingTrie::if_valid_id_update(uint16 *splid) const { in if_valid_id_update() 137 bool SpellingTrie::is_half_id(uint16 splid) const { in is_half_id() 144 bool SpellingTrie::is_full_id(uint16 splid) const { in is_full_id() 150 bool SpellingTrie::half_full_compatible(uint16 half_id, uint16 full_id) const { in half_full_compatible() 151 uint16 half_fr_full = full_to_half(full_id); in half_full_compatible() 166 bool SpellingTrie::is_half_id_yunmu(uint16 splid) const { in is_half_id_yunmu() 238 uint16 SpellingTrie::half2full_num(uint16 half_id) const { in half2full_num() 244 uint16 SpellingTrie::half_to_full(uint16 half_id, uint16 *spl_id_start) const { in half_to_full() 252 uint16 SpellingTrie::full_to_half(uint16 full_id) const { in full_to_half() 278 memset(h2f_start_, 0, sizeof(uint16) * kFullSplIdStart); in construct() [all …]
|
D | userdict.cpp | 119 uint16 lmt16 = (uint16)lmt; in build_score() 126 inline int64 UserDict::utf16le_atoll(uint16 *s, int len) { in utf16le_atoll() 132 const uint16 * endp = s + len; in utf16le_atoll() 147 inline int UserDict::utf16le_lltoa(int64 v, uint16 *s, int size) { in utf16le_lltoa() 150 uint16 *endp = s + size; in utf16le_lltoa() 158 uint16 *b = s; in utf16le_lltoa() 193 inline uint16 * UserDict::get_lemma_spell_ids(uint32 offset) { in get_lemma_spell_ids() 195 return (uint16 *)(lemmas_ + offset + 2); in get_lemma_spell_ids() 198 inline uint16 * UserDict::get_lemma_word(uint32 offset) { in get_lemma_word() 201 return (uint16 *)(lemmas_ + offset + 2 + (nchar << 1)); in get_lemma_word() [all …]
|
D | dictlist.cpp | 233 size_t DictList::predict(const char16 last_hzs[], uint16 hzs_len, in predict() 246 for (uint16 pre_len = 1; pre_len <= kMaxPredictSize + 1 - hzs_len; in predict() 248 uint16 word_len = hzs_len + pre_len; in predict() 286 uint16 DictList::get_lemma_str(LemmaIdType id_lemma, char16 *str_buf, in get_lemma_str() 287 uint16 str_max) { in get_lemma_str() 293 for (uint16 i = 0; i < kMaxLemmaSize; i++) { in get_lemma_str() 299 uint16 *buf = buf_ + start_pos_[i] + id_span * (i + 1); in get_lemma_str() 300 for (uint16 len = 0; len <= i; len++) { in get_lemma_str() 310 uint16 DictList::get_splids_for_hanzi(char16 hanzi, uint16 half_splid, in get_splids_for_hanzi() 311 uint16 *splids, uint16 max_splids) { in get_splids_for_hanzi() [all …]
|
D | matrixsearch.cpp | 362 for (uint16 re_pos = fixed_ch_pos; re_pos < ch_pos; re_pos++) { in reset_search() 366 for (uint16 subpos = 0; subpos < c_phrase_.sublma_num; subpos++) { in reset_search() 367 uint16 splpos_begin = c_phrase_.sublma_start[subpos]; in reset_search() 368 uint16 splpos_end = c_phrase_.sublma_start[subpos + 1]; in reset_search() 369 for (uint16 splpos = splpos_begin; splpos < splpos_end; splpos++) { in reset_search() 371 uint16 spl_start = c_phrase_.spl_start[splpos]; in reset_search() 372 uint16 spl_end = c_phrase_.spl_start[splpos + 1]; in reset_search() 390 uint16 c_py_pos = 0; in reset_search() 560 uint16 c_py_pos = 0; in delsearch() 625 uint16 s_len = lpi_items_[cand_id].lma_len; in get_candidate() [all …]
|
D | dictbuilder.cpp | 542 uint16 spl_idxs[2]; in build_dict() 543 uint16 spl_start_pos[3]; in build_dict() 552 uint16 num = spl_trie.half_to_full(spl_idxs[0], spl_idxs); in build_dict() 648 node->son_1st_off_l = static_cast<uint16>(offset); in set_son_offset() 653 node->homo_idx_buf_off_l = static_cast<uint16>(offset); in set_homo_id_buf_offset() 665 uint16 pos = 0; in format_spelling_str() 762 static_cast<uint16>(found - scis_); in build_scis() 782 uint16 spl_idx_node = lma_last_start->spl_idx_arr[level]; in construct_subset() 787 uint16 spl_idx_current = lma_current->spl_idx_arr[level]; in construct_subset() 825 static_cast<uint16>(parent_son_num); in construct_subset() [all …]
|
D | pinyinime.cpp | 124 size_t im_get_spl_start_pos(const uint16 *&spl_start) { in im_get_spl_start_pos()
|