168 | 168 |
suppression_dictionary_.reset(new SuppressionDictionary);
|
169 | 169 |
CHECK(suppression_dictionary_.get());
|
170 | 170 |
|
171 | |
pos_matcher_.Set(data_manager->GetPOSMatcherData());
|
|
171 |
pos_matcher_.reset(
|
|
172 |
new dictionary::POSMatcher(data_manager->GetPOSMatcherData()));
|
172 | 173 |
|
173 | 174 |
user_dictionary_.reset(
|
174 | 175 |
new UserDictionary(UserPOS::CreateFromDataManager(*data_manager),
|
175 | |
pos_matcher_,
|
|
176 |
*pos_matcher_,
|
176 | 177 |
suppression_dictionary_.get()));
|
177 | 178 |
CHECK(user_dictionary_.get());
|
178 | 179 |
|
|
184 | 185 |
SystemDictionary::Builder(dictionary_data, dictionary_size).Build();
|
185 | 186 |
dictionary_.reset(new DictionaryImpl(
|
186 | 187 |
sysdic, // DictionaryImpl takes the ownership
|
187 | |
new ValueDictionary(pos_matcher_, &sysdic->value_trie()),
|
|
188 |
new ValueDictionary(*pos_matcher_, &sysdic->value_trie()),
|
188 | 189 |
user_dictionary_.get(),
|
189 | 190 |
suppression_dictionary_.get(),
|
190 | |
&pos_matcher_));
|
|
191 |
pos_matcher_.get()));
|
191 | 192 |
CHECK(dictionary_.get());
|
192 | 193 |
|
193 | 194 |
StringPiece suffix_key_array_data, suffix_value_array_data;
|
|
223 | 224 |
suppression_dictionary_.get(),
|
224 | 225 |
connector_.get(),
|
225 | 226 |
segmenter_.get(),
|
226 | |
&pos_matcher_,
|
|
227 |
pos_matcher_.get(),
|
227 | 228 |
pos_group_.get(),
|
228 | 229 |
suggestion_filter_.get()));
|
229 | 230 |
CHECK(immutable_converter_.get());
|
|
248 | 249 |
suffix_dictionary_.get(),
|
249 | 250 |
connector_.get(),
|
250 | 251 |
segmenter_.get(),
|
251 | |
&pos_matcher_,
|
|
252 |
pos_matcher_.get(),
|
252 | 253 |
suggestion_filter_.get());
|
253 | 254 |
CHECK(dictionary_predictor);
|
254 | 255 |
|
255 | 256 |
PredictorInterface *user_history_predictor =
|
256 | 257 |
new UserHistoryPredictor(dictionary_.get(),
|
257 | |
&pos_matcher_,
|
|
258 |
pos_matcher_.get(),
|
258 | 259 |
suppression_dictionary_.get(),
|
259 | 260 |
enable_content_word_learning);
|
260 | 261 |
CHECK(user_history_predictor);
|
|
270 | 271 |
dictionary_.get());
|
271 | 272 |
CHECK(rewriter_);
|
272 | 273 |
|
273 | |
converter_impl->Init(&pos_matcher_,
|
|
274 |
converter_impl->Init(pos_matcher_.get(),
|
274 | 275 |
suppression_dictionary_.get(),
|
275 | 276 |
predictor_,
|
276 | 277 |
rewriter_,
|