Skip to content

Commit

Permalink
Separate enable_correction from enable_completion
Browse files Browse the repository at this point in the history
This reverts some changes from c4b75c1.
  • Loading branch information
graphemecluster committed Jan 25, 2024
1 parent b83a2ab commit 585f465
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rime/gear/script_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ScriptTranslation : public Translation {
start_(start),
syllabifier_(
New<ScriptSyllabifier>(translator, corrector, input, start)),
enable_correction_(corrector || translator->enable_completion()) {
enable_correction_(corrector) {
set_exhausted(true);
}
bool Evaluate(Dictionary* dict, UserDictionary* user_dict);
Expand Down Expand Up @@ -117,7 +117,7 @@ class ScriptTranslation : public Translation {
DictEntryCollector::reverse_iterator phrase_iter_;
UserDictEntryCollector::reverse_iterator user_phrase_iter_;

size_t max_corrections_ = 5;
size_t max_corrections_ = 4;
size_t correction_count_ = 0;
size_t cand_count_ = 0;

Expand Down Expand Up @@ -146,8 +146,6 @@ ScriptTranslator::ScriptTranslator(const Ticket& ticket)
if (auto* corrector = Corrector::Require("corrector")) {
corrector_.reset(corrector->Create(ticket));
}
} else {
enable_correction_ = enable_completion();
}
}

Expand Down

0 comments on commit 585f465

Please sign in to comment.