Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'search/hotels_classifier.hpp')
-rw-r--r--search/hotels_classifier.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/search/hotels_classifier.hpp b/search/hotels_classifier.hpp
new file mode 100644
index 0000000000..65a8501208
--- /dev/null
+++ b/search/hotels_classifier.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "std/cstdint.hpp"
+
+namespace search
+{
+class Results;
+
+// A binary classifier, that can be used in conjunction with search
+// engine to decide whether the majority of results are hotels or not.
+//
+// *NOTE* This class is NOT thread safe.
+class HotelsClassifier
+{
+public:
+ void AddBatch(Results const & results);
+
+ bool IsHotelQuery() const;
+
+private:
+ uint64_t m_numHotels = 0;
+ uint64_t m_numResults = 0;
+};
+} // namespace search