Codebase list mozc / 2558e11
Fix #380: engine.h should not depend pos_matcher.h BUG=#380 TEST=compile REF_BUG= REF_CL= REF_TIME= REF_TIME_RAW= Yohei Yukawa 8 years ago
3 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
00 MAJOR=2
11 MINOR=18
2 BUILD=2556
2 BUILD=2557
33 REVISION=102
44 # CAUTION: NACL_DICTIONARY_VERSION is going to be migrated to ENGINE_VERSION.
55 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
168168 suppression_dictionary_.reset(new SuppressionDictionary);
169169 CHECK(suppression_dictionary_.get());
170170
171 pos_matcher_.Set(data_manager->GetPOSMatcherData());
171 pos_matcher_.reset(
172 new dictionary::POSMatcher(data_manager->GetPOSMatcherData()));
172173
173174 user_dictionary_.reset(
174175 new UserDictionary(UserPOS::CreateFromDataManager(*data_manager),
175 pos_matcher_,
176 *pos_matcher_,
176177 suppression_dictionary_.get()));
177178 CHECK(user_dictionary_.get());
178179
184185 SystemDictionary::Builder(dictionary_data, dictionary_size).Build();
185186 dictionary_.reset(new DictionaryImpl(
186187 sysdic, // DictionaryImpl takes the ownership
187 new ValueDictionary(pos_matcher_, &sysdic->value_trie()),
188 new ValueDictionary(*pos_matcher_, &sysdic->value_trie()),
188189 user_dictionary_.get(),
189190 suppression_dictionary_.get(),
190 &pos_matcher_));
191 pos_matcher_.get()));
191192 CHECK(dictionary_.get());
192193
193194 StringPiece suffix_key_array_data, suffix_value_array_data;
223224 suppression_dictionary_.get(),
224225 connector_.get(),
225226 segmenter_.get(),
226 &pos_matcher_,
227 pos_matcher_.get(),
227228 pos_group_.get(),
228229 suggestion_filter_.get()));
229230 CHECK(immutable_converter_.get());
248249 suffix_dictionary_.get(),
249250 connector_.get(),
250251 segmenter_.get(),
251 &pos_matcher_,
252 pos_matcher_.get(),
252253 suggestion_filter_.get());
253254 CHECK(dictionary_predictor);
254255
255256 PredictorInterface *user_history_predictor =
256257 new UserHistoryPredictor(dictionary_.get(),
257 &pos_matcher_,
258 pos_matcher_.get(),
258259 suppression_dictionary_.get(),
259260 enable_content_word_learning);
260261 CHECK(user_history_predictor);
270271 dictionary_.get());
271272 CHECK(rewriter_);
272273
273 converter_impl->Init(&pos_matcher_,
274 converter_impl->Init(pos_matcher_.get(),
274275 suppression_dictionary_.get(),
275276 predictor_,
276277 rewriter_,
3535 #include "data_manager/data_manager_interface.h"
3636 #include "dictionary/dictionary_interface.h"
3737 #include "dictionary/pos_group.h"
38 #include "dictionary/pos_matcher.h"
39 #include "dictionary/user_dictionary.h"
4038 #include "engine/engine_interface.h"
4139
4240 namespace mozc {
4947 class Segmenter;
5048 class SuggestionFilter;
5149 class UserDataManagerInterface;
50
51 namespace dictionary {
52 class POSMatcher;
53 class UserDictionary;
54 } // namespace dictionary
5255
5356 // Builds and manages a set of modules that are necessary for conversion engine.
5457 class Engine : public EngineInterface {
113116 bool enable_content_word_learning);
114117
115118 std::unique_ptr<const DataManagerInterface> data_manager_;
116 dictionary::POSMatcher pos_matcher_;
119 std::unique_ptr<const dictionary::POSMatcher> pos_matcher_;
117120 std::unique_ptr<dictionary::SuppressionDictionary> suppression_dictionary_;
118121 std::unique_ptr<const Connector> connector_;
119122 std::unique_ptr<const Segmenter> segmenter_;