Home | History | Annotate | Download | only in share

Lines Matching refs:lemma_arr_

148   lemma_arr_ = NULL;
182 lemma_arr_ = new LemmaEntry[lemma_num_];
203 if (NULL == lemma_arr_ || NULL == top_lmas_ ||
211 memset(lemma_arr_, 0, sizeof(LemmaEntry) * lemma_num_);
291 if (NULL == lemma_arr_)
296 top_lmas_[0] = lemma_arr_[pos];
301 if (lemma_arr_[pos].freq > top_lmas_[top_lmas_num_ - 1].freq) {
310 top_lmas_[move_pos - 2].freq > lemma_arr_[pos].freq)) {
315 top_lmas_[move_pos - 1] = lemma_arr_[pos];
317 top_lmas_[top_lmas_num_] = lemma_arr_[pos];
332 if (NULL != lemma_arr_)
333 delete [] lemma_arr_;
353 lemma_arr_ = NULL;
425 utf16_strcpy(lemma_arr_[i].hanzi_str, token);
427 lemma_arr_[i].hz_str_len = token_size;
436 lemma_arr_[i].freq = utf16_atof(token);
438 if (lemma_size > 1 && lemma_arr_[i].freq < 60) {
456 lemma_arr_[i].hanzi_str, lemma_arr_[i].hz_str_len)) {
464 for (size_t hz_pos = 0; hz_pos < (size_t)lemma_arr_[i].hz_str_len;
476 utf16_strcpy_tochar(lemma_arr_[i].pinyin_str[hz_pos], token);
478 format_spelling_str(lemma_arr_[i].pinyin_str[hz_pos]);
481 if (!spl_table_->put_spelling(lemma_arr_[i].pinyin_str[hz_pos],
482 lemma_arr_[i].freq)) {
540 for (size_t hz_pos = 0; hz_pos < (size_t)lemma_arr_[i].hz_str_len;
546 spl_parser_->splstr_to_idxs(lemma_arr_[i].pinyin_str[hz_pos],
547 strlen(lemma_arr_[i].pinyin_str[hz_pos]),
555 lemma_arr_[i].spl_idx_arr[hz_pos] = spl_idxs[0];
568 lemma_arr_, lemma_num_);
573 ngram.build_unigram(lemma_arr_, lemma_num_,
574 lemma_arr_[lemma_num_ - 1].idx_by_hz + 1);
577 myqsort(lemma_arr_, lemma_num_, sizeof(LemmaEntry), compare_py);
587 lemma_arr_, 0, lemma_num_, 0);
680 if (NULL == lemma_arr_ || 0 == lemma_num_)
683 myqsort(lemma_arr_, lemma_num_, sizeof(LemmaEntry), cmp_lemma_entry_hzs);
685 lemma_arr_[0].idx_by_hz = 1;
688 if (utf16_strcmp(lemma_arr_[i].hanzi_str, lemma_arr_[i-1].hanzi_str)) {
690 lemma_arr_[i].idx_by_hz = idx_max;
693 lemma_arr_[i].idx_by_hz = idx_max;
714 size_t hz_num = lemma_arr_[pos].hz_str_len;
716 scis_[scis_num_].hz = lemma_arr_[pos].hanzi_str[hzpos];
717 scis_[scis_num_].splid.full_splid = lemma_arr_[pos].spl_idx_arr[hzpos];
721 scis_[scis_num_].freq = lemma_arr_[pos].freq;
746 size_t hz_num = lemma_arr_[pos].hz_str_len;
749 key.hz = lemma_arr_[pos].hanzi_str[hzpos];
750 key.splid.full_splid = lemma_arr_[pos].spl_idx_arr[hzpos];
761 lemma_arr_[pos].hanzi_scis_ids[hzpos] =
763 lemma_arr_[pos].spl_idx_arr[hzpos] = found->splid.full_splid;
781 LemmaEntry *lma_last_start = lemma_arr_ + item_start;
849 lma_last_start = lemma_arr_ + item_start;
859 LemmaEntry* lma_current = lemma_arr_ + i;
897 idx_buf[homo_pos] = lemma_arr_[item_start_next + homo_pos].idx_by_hz;