Page Speed Optimization Libraries  1.9.32.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mobilize_decision_trees.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_MOBILIZE_DECISION_TREES_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_MOBILIZE_DECISION_TREES_H_
21 
23 
24 namespace net_instaweb {
25 
28 
34  kATag = 0,
35  kArticleTag,
36  kAsideTag,
37  kButtonTag,
38  kContentTag,
39  kDatalistTag,
40  kDivTag,
41  kFieldsetTag,
42  kFooterTag,
43  kFormTag,
44  kH1Tag,
45  kH2Tag,
46  kH3Tag,
47  kH4Tag,
48  kH5Tag,
49  kH6Tag,
50  kHeaderTag,
51  kImgTag,
52  kInputTag,
53  kLegendTag,
54  kMainTag,
55  kMenuTag,
56  kNavTag,
57  kOptgroupTag,
58  kOptionTag,
59  kPTag,
60  kSectionTag,
61  kSelectTag,
62  kSpanTag,
63  kTextareaTag,
64  kNumRelevantTags
65 };
66 
70  kArticleAttr = 0,
71  kAsideAttr,
72  kBodyAttr,
73  kBottomAttr,
74  kCenterAttr,
75  kColumnAttr,
76  kCommentAttr,
77  kContentAttr,
78  kFindAttr,
79  kFootAttr,
80  kHdrAttr,
81  kHeadAttr,
82  kLeftAttr,
83  kLogoAttr,
84  kMainAttr,
85  kMarginAttr,
86  kMenuAttr,
87  kMiddleAttr,
88  kNavAttr,
89  kRightAttr,
90  kSearchAttr,
91  kSecAttr,
92  kTitleAttr,
93  kTopAttr,
94  kNumAttrStrings
95 };
96 
123  kElementTagDepth = 0,
124  kPreviousTagCount,
125  kPreviousTagPercent,
126  kPreviousContentBytes,
127  kPreviousContentPercent,
128  kPreviousNonBlankBytes,
129  kPreviousNonBlankPercent,
130  kContainedTagDepth,
131  kContainedTagRelativeDepth,
132  kContainedTagCount,
133  kContainedTagPercent,
134  kContainedContentBytes,
135  kContainedContentPercent,
136  kContainedNonBlankBytes,
137  kContainedNonBlankPercent,
138  kHasAttrString,
139  kRelevantTagCount = kHasAttrString + kNumAttrStrings,
140  kRelevantTagPercent = kRelevantTagCount + kNumRelevantTags,
141  kNumFeatures = kRelevantTagPercent + kNumRelevantTags
142 };
143 
146 
148 extern const double kNavigationalTreeThreshold;
149 extern const int kNavigationalTreeSize;
150 
151 extern const net_instaweb::DecisionTree::Node kHeaderTree[];
152 extern const double kHeaderTreeThreshold;
153 extern const int kHeaderTreeSize;
154 
155 extern const net_instaweb::DecisionTree::Node kContentTree[];
156 extern const double kContentTreeThreshold;
157 extern const int kContentTreeSize;
158 
159 }
160 
161 #endif
MobileAttrSubstring
Definition: mobilize_decision_trees.h:69
Definition: decision_tree.h:43
const net_instaweb::DecisionTree::Node kNavigationalTree[]
FeatureName
Definition: mobilize_decision_trees.h:122
MobileRelevantTag
Definition: mobilize_decision_trees.h:33