@@ -131,6 +131,7 @@ class LazyTableTranslation : public TableTranslation {
131131
132132 private:
133133 Dictionary* dict_;
134+ const hash_set<string>* blacklist_;
134135 UserDictionary* user_dict_;
135136 size_t limit_;
136137 size_t user_dict_limit_;
@@ -150,6 +151,7 @@ LazyTableTranslation::LazyTableTranslation(TableTranslator* translator,
150151 end,
151152 preedit),
152153 dict_(translator->dict ()),
154+ blacklist_(&translator->blacklist ()),
153155 user_dict_(enable_user_dict ? translator->user_dict () : NULL),
154156 limit_(kInitialSearchLimit ),
155157 user_dict_limit_(kInitialSearchLimit ) {
@@ -191,7 +193,7 @@ bool LazyTableTranslation::FetchMoreTableEntries() {
191193 DLOG (INFO) << " fetching more table entries: limit = " << limit_
192194 << " , count = " << previous_entry_count;
193195 DictEntryIterator more;
194- if (dict_->LookupWords (&more, input_, true , limit_) < limit_) {
196+ if (dict_->LookupWords (&more, input_, true , limit_, blacklist_ ) < limit_) {
195197 DLOG (INFO) << " all table entries obtained." ;
196198 limit_ = 0 ; // no more try
197199 } else {
@@ -263,7 +265,7 @@ an<Translation> TableTranslator::Query(const string& input,
263265 } else {
264266 DictEntryIterator iter;
265267 if (dict_ && dict_->loaded ()) {
266- dict_->LookupWords (&iter, code, false );
268+ dict_->LookupWords (&iter, code, false , 0 , & blacklist () );
267269 }
268270 UserDictEntryIterator uter;
269271 if (enable_user_dict) {
@@ -645,7 +647,8 @@ an<Translation> TableTranslator::MakeSentence(const string& input,
645647 if (homographs.size () >= max_homographs_)
646648 continue ;
647649 DictEntryIterator iter;
648- dict_->LookupWords (&iter, active_input.substr (0 , m.length ), false );
650+ dict_->LookupWords (&iter, active_input.substr (0 , m.length ), false , 0 ,
651+ &blacklist ());
649652 if (filter_by_charset) {
650653 iter.AddFilter (CharsetFilter::FilterDictEntry);
651654 }
0 commit comments