From 3f9392ca400391976570126a1b51ab2df73cbc85 Mon Sep 17 00:00:00 2001 From: Lukhnos Liu Date: Sun, 18 Feb 2024 16:13:27 -0800 Subject: [PATCH] Update the comments --- src/Engine/McBopomofoLM.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Engine/McBopomofoLM.cpp b/src/Engine/McBopomofoLM.cpp index 989d906..cf97131 100644 --- a/src/Engine/McBopomofoLM.cpp +++ b/src/Engine/McBopomofoLM.cpp @@ -124,13 +124,14 @@ std::vector McBopomofoLM::getUnig allUnigrams = filterAndTransformUnigrams(rawGlobalUnigrams, excludedValues, insertedValues); } - // TODO(#118): Leaky abstraction. This relies on the impl. detail that we always use the default separator. + // This relies on the fact that we always use the default separator. bool isKeyMultiSyllable = key.find(Formosa::Gramambular2::ReadingGrid::kDefaultSeparator) != std::string::npos; if (isKeyMultiSyllable || allUnigrams.empty()) { allUnigrams.insert(allUnigrams.begin(), userUnigrams.begin(), userUnigrams.end()); } else { // Score rewrite. To ensure fairness, each user unigram is assigned a - // score that is slightly higher than its peer unigrams. + // score that is slightly higher than the highest of the current ones + // in allUnigrams. double topScore = std::numeric_limits::lowest(); for (const auto& unigram : allUnigrams) { if (unigram.score() > topScore) {