Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(689)

Unified Diff: components/dom_distiller/core/page_features.h

Issue 1409133007: Add a new set of page features for distillability testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webkit
Patch Set: fix DEPS Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/dom_distiller/core/page_features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/page_features.h
diff --git a/components/dom_distiller/core/page_features.h b/components/dom_distiller/core/page_features.h
index 236796b542aecb860e3cb03311872183e50aec4f..a54d1cdfebf598a2d2858746e7e7848fe27b53b1 100644
--- a/components/dom_distiller/core/page_features.h
+++ b/components/dom_distiller/core/page_features.h
@@ -10,19 +10,20 @@
#include "base/values.h"
#include "url/gurl.h"
+class GURL;
+
namespace dom_distiller {
// The length of the derived features vector.
extern int kDerivedFeaturesCount;
// The distillable page detector is a model trained on a list of numeric
-// features derived from core more complex features of a webpage (like the
-// body's .textContent). This derives the numeric features for a set of core
-// features.
+// features derived from features of a webpage (like body's number of elements
+// ). This derives the numeric features form a set of core features.
//
// Note: It is crucial that these features are derived in the same way and are
// in the same order as in the training pipeline. See //heuristics/distillable
-// in the external DomDistillerJs repo.
+// in the external DomDistiller repo.
std::vector<double> CalculateDerivedFeatures(bool isOGArticle,
const GURL& url,
double numElements,
@@ -37,6 +38,16 @@ std::vector<double> CalculateDerivedFeatures(bool isOGArticle,
std::vector<double> CalculateDerivedFeaturesFromJSON(
const base::Value* stringified_json);
+std::vector<double> CalculateDerivedFeatures(
+ bool openGraph,
+ const GURL& url,
+ unsigned elementCount,
+ unsigned anchorCount,
+ unsigned formCount,
+ double mozScore,
+ double mozScoreAllSqrt,
+ double mozScoreAllLinear);
+
} // namespace dom_distiller
#endif // COMPONENTS_DOM_DISTILLER_CORE_PAGE_FEATURES_H_
« no previous file with comments | « no previous file | components/dom_distiller/core/page_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698