/packages/inputmethods/PinyinIME/jni/share/ |
D | utf16char.cpp | 26 char16* utf16_strtok(char16 *utf16_str, size_t *token_size, in utf16_strtok() 27 char16 **utf16_str_next) { in utf16_strtok() 34 while ((char16)' ' == utf16_str[pos] || (char16)'\n' == utf16_str[pos] in utf16_strtok() 35 || (char16)'\t' == utf16_str[pos]) in utf16_strtok() 41 while ((char16)'\0' != utf16_str[pos] && (char16)' ' != utf16_str[pos] in utf16_strtok() 42 && (char16)'\n' != utf16_str[pos] in utf16_strtok() 43 && (char16)'\t' != utf16_str[pos]) { in utf16_strtok() 47 char16 *ret_val = utf16_str; in utf16_strtok() 48 if ((char16)'\0' == utf16_str[pos]) { in utf16_strtok() 56 utf16_str[pos] = (char16)'\0'; in utf16_strtok() [all …]
|
D | searchutility.cpp | 91 if (*static_cast<const char16*>(p1) < in cmp_hanzis_1() 92 *static_cast<const char16*>(p2)) in cmp_hanzis_1() 95 if (*static_cast<const char16*>(p1) > in cmp_hanzis_1() 96 *static_cast<const char16*>(p2)) in cmp_hanzis_1() 102 return utf16_strncmp(static_cast<const char16*>(p1), in cmp_hanzis_2() 103 static_cast<const char16*>(p2), 2); in cmp_hanzis_2() 107 return utf16_strncmp(static_cast<const char16*>(p1), in cmp_hanzis_3() 108 static_cast<const char16*>(p2), 3); in cmp_hanzis_3() 112 return utf16_strncmp(static_cast<const char16*>(p1), in cmp_hanzis_4() 113 static_cast<const char16*>(p2), 4); in cmp_hanzis_4() [all …]
|
D | dictlist.cpp | 52 buf_ = static_cast<char16*>(malloc(buf_size * sizeof(char16))); in alloc_resource() 58 scis_hz_ = static_cast<char16*>(malloc(scis_num_ * sizeof(char16))); in alloc_resource() 200 char16* DictList::find_pos2_startedbyhz(char16 hz_char) { in find_pos2_startedbyhz() 201 char16 *found_2w = static_cast<char16*> in find_pos2_startedbyhz() 204 sizeof(char16) * 2, cmp_hanzis_1)); in find_pos2_startedbyhz() 215 char16* DictList::find_pos_startedbyhzs(const char16 last_hzs[], in find_pos_startedbyhzs() 217 char16 *found_w = static_cast<char16*> in find_pos_startedbyhzs() 221 sizeof(char16) * word_len, cmp_func)); in find_pos_startedbyhzs() 233 size_t DictList::predict(const char16 last_hzs[], uint16 hzs_len, in predict() 249 char16 *w_buf = find_pos_startedbyhzs(last_hzs, word_len, cmp_func); in predict() [all …]
|
D | utf16reader.cpp | 54 buffer_ = new char16[buffer_total_len_]; in open() 62 char16 header; in open() 72 char16* Utf16Reader::readline(char16* read_buf, size_t max_len) { in readline() 81 buffer_valid_len_ = fread(buffer_, sizeof(char16), in readline() 86 read_buf[ret_len] = (char16)'\0'; in readline() 93 buffer_[buffer_next_pos_ + i] == (char16)'\n') { in readline() 94 if (ret_len + i > 0 && read_buf[ret_len + i - 1] == (char16)'\r') { in readline() 95 read_buf[ret_len + i - 1] = (char16)'\0'; in readline() 97 read_buf[ret_len + i] = (char16)'\0'; in readline()
|
D | spellingtrie.cpp | 307 splstr16_queried_ = new char16[spelling_size_]; in construct() 750 const char16* SpellingTrie::get_spelling_str16(uint16 splid) { in get_spelling_str16() 756 splstr16_queried_[pos] = static_cast<char16> in get_spelling_str16() 761 splstr16_queried_[0] = static_cast<char16>('C'); in get_spelling_str16() 762 splstr16_queried_[1] = static_cast<char16>('h'); in get_spelling_str16() 763 splstr16_queried_[2] = static_cast<char16>('\0'); in get_spelling_str16() 765 splstr16_queried_[0] = static_cast<char16>('S'); in get_spelling_str16() 766 splstr16_queried_[1] = static_cast<char16>('h'); in get_spelling_str16() 767 splstr16_queried_[2] = static_cast<char16>('\0'); in get_spelling_str16() 769 splstr16_queried_[0] = static_cast<char16>('Z'); in get_spelling_str16() [all …]
|
D | pinyinime.cpp | 35 char16 predict_buf[kMaxPredictNum][kMaxPredictSize + 1]; 116 char16* im_get_candidate(size_t cand_id, char16* cand_str, in im_get_candidate() 158 size_t im_get_predicts(const char16 *his_buf, in im_get_predicts() 159 char16 (*&pre_buf)[kMaxPredictSize + 1]) { in im_get_predicts() 164 const char16 *fixed_ptr = his_buf; in im_get_predicts()
|
D | dictbuilder.cpp | 104 if (*((const char16*)p1) < *((const char16*)p2)) in compare_char16() 106 if (*((const char16*)p1) > *((const char16*)p2)) in compare_char16() 221 char16* DictBuilder::read_valid_hanzis(const char *fn_validhzs, size_t *num) { in read_valid_hanzis() 230 char16 utf16header; in read_valid_hanzis() 231 if (fread(&utf16header, sizeof(char16), 1, fp) != 1 || in read_valid_hanzis() 238 *num = ftell(fp) / sizeof(char16); in read_valid_hanzis() 242 char16 *hzs = new char16[*num]; in read_valid_hanzis() 250 if (fread(hzs, sizeof(char16), *num, fp) != *num) { in read_valid_hanzis() 257 myqsort(hzs, *num, sizeof(char16), compare_char16); in read_valid_hanzis() 261 bool DictBuilder::hz_in_hanzis_list(const char16 *hzs, size_t hzs_len, in hz_in_hanzis_list() [all …]
|
D | matrixsearch.cpp | 375 c_phrase_.chn_str[splpos] = static_cast<char16>('\0'); in reset_search() 604 char16* MatrixSearch::get_candidate(size_t cand_id, char16 *cand_str, in get_candidate() 623 char16 s[kMaxLemmaSize + 1]; in get_candidate() 631 s[1] = static_cast<char16>(0); in get_candidate() 636 cand_str[s_len] = (char16)'\0'; in get_candidate() 657 char16 word_str[kMaxLemmaSize + 1]; in add_lma_to_userdict() 684 return user_dict_->put_lemma(static_cast<char16*>(word_str), spl_ids, in add_lma_to_userdict() 1141 char16 fullsent[kMaxLemmaSize + 1]; in prepare_candidates() 1142 char16 *pfullsent = NULL; in prepare_candidates() 1241 char16 *lma_str = c_phrase_.chn_str + in merge_fixed_lmas() [all …]
|
D | sync.cpp | 70 int Sync::put_lemmas(char16 * lemmas, int len) { in put_lemmas() 74 int Sync::get_lemmas(char16 * str, int size) { in get_lemmas()
|
D | userdict.cpp | 609 uint16 UserDict::get_lemma_str(LemmaIdType id_lemma, char16* str_buf, in _get_lpis() 617 char16 * str = get_lemma_word(offset); in _get_lpis() 640 size_t UserDict::predict(const char16 last_hzs[], uint16 hzs_len, in _get_lpis() 690 int32 UserDict::locate_in_offsets(char16 lemma_str[], uint16 splid_str[], in _get_lpis() 856 LemmaIdType UserDict::get_lemma_id(char16 lemma_str[], uint16 splids[], in _get_lpis() 875 LmaScoreType UserDict::get_lemma_score(char16 lemma_str[], uint16 splids[], in _get_lpis() 902 int UserDict::_get_lemma_score(char16 lemma_str[], uint16 splids[], in _get_lpis() 1699 LemmaIdType UserDict::put_lemma_no_sync(char16 lemma_str[], uint16 splids[], in _get_lpis() 1726 int UserDict::put_lemmas_no_sync_from_utf16le_string(char16 * lemmas, int len) { in _get_lpis() 1736 char16 *ptr = lemmas; in _get_lpis() [all …]
|
/packages/inputmethods/PinyinIME/jni/include/ |
D | utf16char.h | 28 typedef unsigned short char16; typedef 33 char16* utf16_strtok(char16 *utf16_str, size_t *token_size, 34 char16 **utf16_str_next); 36 int utf16_atoi(const char16 *utf16_str); 38 float utf16_atof(const char16 *utf16_str); 40 size_t utf16_strlen(const char16 *utf16_str); 42 int utf16_strcmp(const char16 *str1, const char16 *str2); 43 int utf16_strncmp(const char16 *str1, const char16 *str2, size_t size); 45 char16* utf16_strcpy(char16 *dst, const char16 *src); 46 char16* utf16_strncpy(char16 *dst, const char16 *src, size_t size); [all …]
|
D | dictlist.h | 37 char16 *scis_hz_; 41 char16 *buf_; 67 char16* find_pos2_startedbyhz(char16 hz_char); 73 char16* find_pos_startedbyhzs(const char16 last_hzs[], 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, 116 LemmaIdType get_lemma_id(const char16 *str, uint16 str_len);
|
D | matrixsearch.h | 119 char16 chn_str[kMaxRowNum]; // Chinese string. 291 const char16 *pfullsent, bool sort_by_psb); 293 uint16 get_lemma_str(LemmaIdType id_lemma, char16 *str_buf, uint16 str_max); 355 size_t inner_predict(const char16 fixed_scis_ids[], uint16 scis_num, 356 char16 predict_buf[][kMaxPredictSize + 1], 433 char16* get_candidate(size_t cand_id, char16 *cand_str, size_t max_len); 438 char16* get_candidate0(char16* cand_str, size_t max_len, 450 size_t get_predicts(const char16 fixed_buf[], 451 char16 predict_buf[][kMaxPredictSize + 1],
|
D | dicttrie.h | 171 void convert_to_hanzis(char16 *str, uint16 str_len); 173 void convert_to_scis_ids(char16 *str, uint16 str_len); 194 uint16 get_lemma_str(LemmaIdType id_lemma, char16 *str_buf, uint16 str_max); 199 size_t predict(const char16 *last_hzs, uint16 hzs_len, 203 LemmaIdType put_lemma(char16 lemma_str[], uint16 splids[], in put_lemma() 209 LemmaIdType get_lemma_id(char16 lemma_str[], uint16 splids[], in get_lemma_id() 214 LmaScoreType get_lemma_score(char16 lemma_str[], uint16 splids[], in get_lemma_score() 224 LemmaIdType get_lemma_id(const char16 lemma_str[], uint16 lemma_len);
|
D | userdict.h | 53 uint16 get_lemma_str(LemmaIdType id_lemma, char16* str_buf, 59 size_t predict(const char16 last_hzs[], uint16 hzs_len, 64 LemmaIdType put_lemma(char16 lemma_str[], uint16 splids[], 70 LemmaIdType get_lemma_id(char16 lemma_str[], uint16 splids[], 75 LmaScoreType get_lemma_score(char16 lemma_str[], uint16 splids[], 97 LemmaIdType put_lemma_no_sync(char16 lemma_str[], uint16 splids[], 106 int put_lemmas_no_sync_from_utf16le_string(char16 * lemmas, int len); 119 char16 * str, int size, int * count); 304 LemmaIdType _put_lemma(char16 lemma_str[], uint16 splids[], 310 int _get_lemma_score(char16 lemma_str[], uint16 splids[], uint16 lemma_len); [all …]
|
D | pinyinime.h | 138 char16* im_get_candidate(size_t cand_id, char16* cand_str, 193 size_t im_get_predicts(const char16 *his_buf, 194 char16 (*&pre_buf)[kMaxPredictSize + 1]);
|
D | atomdictbase.h | 150 virtual uint16 get_lemma_str(LemmaIdType id_lemma, char16 *str_buf, 181 virtual size_t predict(const char16 last_hzs[], uint16 hzs_len, 194 virtual LemmaIdType put_lemma(char16 lemma_str[], uint16 splids[], 217 virtual LemmaIdType get_lemma_id(char16 lemma_str[], uint16 splids[], 236 virtual LmaScoreType get_lemma_score(char16 lemma_str[], uint16 splids[],
|
D | dictbuilder.h | 142 char16* read_valid_hanzis(const char *fn_validhzs, size_t *num); 152 bool hz_in_hanzis_list(const char16 *hzs, size_t hzs_len, char16 hz); 155 bool str_in_hanzis_list(const char16 *hzs, size_t hzs_len, 156 const char16 *str, size_t str_len);
|
D | utf16reader.h | 28 char16 *buffer_; 43 char16* readline(char16* read_buf, size_t max_len);
|
D | searchutility.h | 38 char16 hanzi; 44 char16 str[kMaxLemmaSize + 1]; 50 char16 pre_hzs[kMaxPredictSize];
|
D | sync.h | 54 int put_lemmas(char16 * lemmas, int len); 60 int get_lemmas(char16 * str, int size);
|
D | spellingtrie.h | 90 char16 *splstr16_queried_; 249 const char16* get_spelling_str16(uint16 splid); 253 size_t get_spelling_str16(uint16 splid, char16 *splstr16,
|
D | splparser.h | 53 uint16 splstr16_to_idxs(const char16 *splstr, uint16 str_len, uint16 splidx[], 58 uint16 splstr16_to_idxs_f(const char16 *splstr16, uint16 str_len,
|
D | dictdef.h | 136 char16 hz; 143 char16 hanzi_str[kMaxLemmaSize + 1];
|
/packages/inputmethods/PinyinIME/jni/android/ |
D | com_android_inputmethod_pinyin_PinyinDecoderService.cpp | 36 static char16 retbuf[RET_BUF_LEN]; 37 static char16 (*predict_buf)[kMaxPredictSize + 1] = NULL; 143 retbuf[i] = (char16)'\0'; in nativeImGetPyStr() 217 char16 *fixed_ptr = (char16*)(*env).GetStringChars(fixed_str, false); in nativeImGetPredictsNum() 220 char16 fixed_buf[kMaxPredictSize + 1]; in nativeImGetPredictsNum() 227 fixed_buf[fixed_len] = (char16)'\0'; in nativeImGetPredictsNum() 274 char16 *ptr = (char16*)(*env).GetStringChars(tomerge, NULL); in nativeSyncPutLemmas()
|