blob: 64f2a657e71607c388dba6c224f3d2e6a313c08a [file] [log] [blame]
// Copyright 2018 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.
#ifndef PERIDOT_BIN_SUGGESTION_ENGINE_RANKERS_RANKER_H_
#define PERIDOT_BIN_SUGGESTION_ENGINE_RANKERS_RANKER_H_
#include <fuchsia/modular/cpp/fidl.h>
#include "peridot/bin/suggestion_engine/ranked_suggestion.h"
namespace modular {
// Base class for performing ranking on a suggestion.
class Ranker {
public:
Ranker();
virtual ~Ranker();
// Ranks a suggestion based on a given query (which might be empty) and
// returns the confidence that would be the new suggestion.confidence.
virtual double Rank(const fuchsia::modular::UserInput& query,
const RankedSuggestion& suggestion) = 0;
// Ranks a suggestion without any query input.
double Rank(const RankedSuggestion& suggestion);
};
} // namespace modular
#endif // PERIDOT_BIN_SUGGESTION_ENGINE_RANKERS_RANKER_H_