Lines Matching refs:raw_spellings_
69 raw_spellings_ = NULL;
99 if (NULL != raw_spellings_)
100 delete [] raw_spellings_;
101 raw_spellings_ = NULL;
123 raw_spellings_ = new RawSpelling[spelling_max_num_];
125 if (NULL == raw_spellings_ || NULL == spelling_buf_) {
130 memset(raw_spellings_, 0, spelling_max_num_ * sizeof(RawSpelling));
151 raw_spellings_[hash_pos].str[spelling_size_ - 1] = '\0';
153 if (strncmp(raw_spellings_[hash_pos].str, spelling_str,
155 raw_spellings_[hash_pos].freq += freq;
162 if (strncmp(raw_spellings_[hash_pos].str,
164 raw_spellings_[hash_pos].freq += freq;
168 if ('\0' == raw_spellings_[hash_pos].str[0]) {
169 raw_spellings_[hash_pos].freq += freq;
170 strncpy(raw_spellings_[hash_pos].str, spelling_str, spelling_size_ - 1);
171 raw_spellings_[hash_pos].str[spelling_size_ - 1] = '\0';
191 if ('\0' == raw_spellings_[hash_pos].str[0])
194 if (strncmp(raw_spellings_[hash_pos].str, spelling_str, spelling_size_ - 1)
205 if ('\0' == raw_spellings_[hash_pos].str[0])
208 if (strncmp(raw_spellings_[hash_pos].str, spelling_str, spelling_size_ - 1)
218 if (NULL == raw_spellings_ || NULL == spelling_buf_ ||
222 qsort(raw_spellings_, spelling_max_num_, sizeof(RawSpelling),
228 strncpy(spelling_buf_ + pos * spelling_size_, raw_spellings_[pos].str,
241 raw_spellings_[pos].freq /= total_freq_;
244 max_score = raw_spellings_[0].freq;
247 if (raw_spellings_[pos].freq > max_score)
248 max_score = raw_spellings_[pos].freq;
249 if (raw_spellings_[pos].freq < min_score)
250 min_score = raw_spellings_[pos].freq;
271 double score = log(raw_spellings_[pos].freq) * score_amplifier_;