| 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..cdab239191412081164e3c71f59445e3f12ff1a8 100644
|
| --- a/components/dom_distiller/core/page_features.h
|
| +++ b/components/dom_distiller/core/page_features.h
|
| @@ -7,35 +7,27 @@
|
|
|
| #include <vector>
|
|
|
| -#include "base/values.h"
|
| -#include "url/gurl.h"
|
| +class GURL;
|
| +
|
| +namespace blink {
|
| + struct WebDistillabilityFeatures;
|
| +}
|
|
|
| namespace dom_distiller {
|
|
|
| // The length of the derived features vector.
|
| -extern int kDerivedFeaturesCount;
|
| +extern unsigned 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.
|
| -std::vector<double> CalculateDerivedFeatures(bool isOGArticle,
|
| - const GURL& url,
|
| - double numElements,
|
| - double numAnchors,
|
| - double numForms,
|
| - const std::string& innerText,
|
| - const std::string& textContent,
|
| - const std::string& innerHTML);
|
| -
|
| -// Calculates the derived features from the JSON value as returned by the
|
| -// javascript core feature extraction.
|
| -std::vector<double> CalculateDerivedFeaturesFromJSON(
|
| - const base::Value* stringified_json);
|
| +// in the external DomDistiller repo.
|
| +std::vector<double> CalculateDerivedFeatures(
|
| + const blink::WebDistillabilityFeatures& f,
|
| + const GURL& url);
|
|
|
| } // namespace dom_distiller
|
|
|
|
|