blob: 1f7ddaceabfa151579eed0e2322c1ec5ef992930 [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "peridot/bin/suggestion_engine/ranking_features/kronk_ranking_feature.h"
namespace modular {
KronkRankingFeature::KronkRankingFeature() = default;
KronkRankingFeature::~KronkRankingFeature() = default;
double KronkRankingFeature::ComputeFeatureInternal(
const fuchsia::modular::UserInput& query,
const RankedSuggestion& suggestion) {
if (suggestion.prototype->source_url.find("kronk") != std::string::npos) {
return kMaxConfidence;
} else {
return kMinConfidence;
}
}
} // namespace modular