OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/dom_distiller/core/page_features.h" | 5 #include "components/dom_distiller/core/page_features.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 12 #include "base/memory/scoped_ptr.h" |
12 #include "third_party/re2/src/re2/re2.h" | 13 #include "third_party/re2/src/re2/re2.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace dom_distiller { | 16 namespace dom_distiller { |
16 /* This code needs to derive features in the same way and order in which they | 17 /* This code needs to derive features in the same way and order in which they |
17 * are derived when training the model. Parts of that code are reproduced in the | 18 * are derived when training the model. Parts of that code are reproduced in the |
18 * comments below. | 19 * comments below. |
19 */ | 20 */ |
20 | 21 |
21 namespace { | 22 namespace { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 features.push_back(mozScore); | 241 features.push_back(mozScore); |
241 // 'mozScoreAllSqrt' | 242 // 'mozScoreAllSqrt' |
242 features.push_back(mozScoreAllSqrt); | 243 features.push_back(mozScoreAllSqrt); |
243 // 'mozScoreAllLinear' | 244 // 'mozScoreAllLinear' |
244 features.push_back(mozScoreAllLinear); | 245 features.push_back(mozScoreAllLinear); |
245 | 246 |
246 return features; | 247 return features; |
247 } | 248 } |
248 | 249 |
249 } // namespace dom_distiller | 250 } // namespace dom_distiller |
OLD | NEW |