Skip to content

Commit

Permalink
chore(script_translator): predict word if enable_completion
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 3, 2024
1 parent 01affef commit eca939c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rime/gear/script_translator.cc
Expand Up @@ -352,7 +352,8 @@ static bool is_exact_match_phrase(const an<DictEntry>& entry) {
bool ScriptTranslation::Evaluate(Dictionary* dict, UserDictionary* user_dict) {
size_t consumed = syllabifier_->BuildSyllableGraph(*dict->prism());
const auto& syllable_graph = syllabifier_->syllable_graph();
bool predict_word = start_ + consumed == end_of_input_;
bool predict_word =
translator_->enable_completion() && start_ + consumed == end_of_input_;

phrase_ = dict->Lookup(syllable_graph, 0, predict_word);
if (user_dict) {
Expand Down

0 comments on commit eca939c

Please sign in to comment.