| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // Buckets: vector[(0.0, 400),(1.5,600),(12.0,1300),(20.0,1399)] | 154 // Buckets: vector[(0.0, 400),(1.5,600),(12.0,1300),(20.0,1399)] |
| 155 // Returns false, in case if it fail to parse the string. | 155 // Returns false, in case if it fail to parse the string. |
| 156 static bool GetHQPBucketsFromString( | 156 static bool GetHQPBucketsFromString( |
| 157 const std::string& buckets_str, | 157 const std::string& buckets_str, |
| 158 std::vector<ScoreMaxRelevance>* hqp_buckets); | 158 std::vector<ScoreMaxRelevance>* hqp_buckets); |
| 159 | 159 |
| 160 // Untyped visits to bookmarked pages score this, compared to 1 for | 160 // Untyped visits to bookmarked pages score this, compared to 1 for |
| 161 // untyped visits to non-bookmarked pages and 20 for typed visits. | 161 // untyped visits to non-bookmarked pages and 20 for typed visits. |
| 162 static int bookmark_value_; | 162 static int bookmark_value_; |
| 163 | 163 |
| 164 // True if we should fix certain bugs in frequency scoring. |
| 165 static bool fix_frequency_bugs_; |
| 166 |
| 164 // If true, we allow input terms to match in the TLD (e.g., ".com"). | 167 // If true, we allow input terms to match in the TLD (e.g., ".com"). |
| 165 static bool allow_tld_matches_; | 168 static bool allow_tld_matches_; |
| 166 | 169 |
| 167 // If true, we allow input terms to match in the scheme (e.g., "http://"). | 170 // If true, we allow input terms to match in the scheme (e.g., "http://"). |
| 168 static bool allow_scheme_matches_; | 171 static bool allow_scheme_matches_; |
| 169 | 172 |
| 170 // True, if hqp experimental scoring is enabled. | 173 // True, if hqp experimental scoring is enabled. |
| 171 static bool hqp_experimental_scoring_enabled_; | 174 static bool hqp_experimental_scoring_enabled_; |
| 172 | 175 |
| 173 // |topicality_threshold_| is used to control the topicality scoring. | 176 // |topicality_threshold_| is used to control the topicality scoring. |
| 174 // If |topicality_threshold_| > 0, then URLs with topicality-score < threshold | 177 // If |topicality_threshold_| > 0, then URLs with topicality-score < threshold |
| 175 // are given topicality score of 0. By default it is initalized to -1. | 178 // are given topicality score of 0. By default it is initalized to -1. |
| 176 static float topicality_threshold_; | 179 static float topicality_threshold_; |
| 177 | 180 |
| 178 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) | 181 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) |
| 179 // to the final relevance scoring. Please see GetFinalRelevancyScore() | 182 // to the final relevance scoring. Please see GetFinalRelevancyScore() |
| 180 // for more details and scoring method. | 183 // for more details and scoring method. |
| 181 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; | 184 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; |
| 182 }; | 185 }; |
| 183 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; | 186 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; |
| 184 | 187 |
| 185 #endif // CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ | 188 #endif // CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ |
| OLD | NEW |