dejanseo commited on
Commit
f4a0f22
·
verified ·
1 Parent(s): c28d248

Upload 18 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ override_list.binarypb filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import trafilatura
3
+ import numpy as np
4
+ import pandas as pd
5
+ from ai_edge_litert.interpreter import Interpreter
6
+ import requests
7
+
8
+ # File paths
9
+ MODEL_PATH = "./model.tflite"
10
+ VOCAB_PATH = "./vocab.txt"
11
+ LABELS_PATH = "./taxonomy_v2.csv"
12
+
13
+ @st.cache_resource
14
+ def load_vocab():
15
+ with open(VOCAB_PATH, 'r') as f:
16
+ vocab = [line.strip() for line in f]
17
+ return vocab
18
+
19
+ @st.cache_resource
20
+ def load_labels():
21
+ # Load labels from the CSV file
22
+ taxonomy = pd.read_csv(LABELS_PATH)
23
+ taxonomy["ID"] = taxonomy["ID"].astype(int)
24
+ labels_dict = taxonomy.set_index("ID")["Topic"].to_dict()
25
+ return labels_dict
26
+
27
+ @st.cache_resource
28
+ def load_model():
29
+ # Load the LiteRT model
30
+ interpreter = Interpreter(model_path=MODEL_PATH)
31
+ interpreter.allocate_tensors()
32
+ input_details = interpreter.get_input_details()
33
+ output_details = interpreter.get_output_details()
34
+ return interpreter, input_details, output_details
35
+
36
+ def preprocess_text(text, vocab, max_length=128):
37
+ # Tokenize the text using the provided vocabulary
38
+ words = text.split()[:max_length] # Split and truncate
39
+ token_ids = [vocab.index(word) if word in vocab else vocab.index("[UNK]") for word in words]
40
+ token_ids = np.array(token_ids + [0] * (max_length - len(token_ids)), dtype=np.int32) # Pad to max length
41
+ attention_mask = np.array([1 if i < len(words) else 0 for i in range(max_length)], dtype=np.int32)
42
+ token_type_ids = np.zeros_like(attention_mask, dtype=np.int32)
43
+ return token_ids[np.newaxis, :], attention_mask[np.newaxis, :], token_type_ids[np.newaxis, :]
44
+
45
+ def classify_text(interpreter, input_details, output_details, input_word_ids, input_mask, input_type_ids):
46
+ interpreter.set_tensor(input_details[0]["index"], input_word_ids)
47
+ interpreter.set_tensor(input_details[1]["index"], input_mask)
48
+ interpreter.set_tensor(input_details[2]["index"], input_type_ids)
49
+ interpreter.invoke()
50
+ output = interpreter.get_tensor(output_details[0]["index"])
51
+ return output[0]
52
+
53
+ def fetch_url_content(url):
54
+ headers = {
55
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
56
+ "Accept-Language": "en-US,en;q=0.9",
57
+ "Accept-Encoding": "gzip, deflate, br",
58
+ }
59
+ try:
60
+ response = requests.get(url, headers=headers, cookies={}, timeout=10)
61
+ if response.status_code == 200:
62
+ return response.text
63
+ else:
64
+ st.error(f"Failed to fetch content. Status code: {response.status_code}")
65
+ return None
66
+ except Exception as e:
67
+ st.error(f"Error fetching content: {e}")
68
+ return None
69
+
70
+ # Streamlit app
71
+ st.title("Topic Classification from URL")
72
+
73
+ url = st.text_input("Enter a URL:", "")
74
+ if url:
75
+ st.write("Extracting content from the URL...")
76
+ raw_content = fetch_url_content(url)
77
+ if raw_content:
78
+ content = trafilatura.extract(raw_content)
79
+ if content:
80
+ st.write("Content extracted successfully!")
81
+ st.write(content[:500]) # Display a snippet of the content
82
+
83
+ # Load resources
84
+ vocab = load_vocab()
85
+ labels_dict = load_labels()
86
+ interpreter, input_details, output_details = load_model()
87
+
88
+ # Preprocess content and classify
89
+ input_word_ids, input_mask, input_type_ids = preprocess_text(content, vocab)
90
+ predictions = classify_text(interpreter, input_details, output_details, input_word_ids, input_mask, input_type_ids)
91
+
92
+ # Display classification
93
+ st.write("Topic Classification:")
94
+ sorted_indices = np.argsort(predictions)[::-1][:5] # Top 5 topics
95
+ for idx in sorted_indices:
96
+ topic = labels_dict.get(idx, "Unknown Topic")
97
+ st.write(f"ID: {idx} - Topic: {topic} - Score: {predictions[idx]:.4f}")
98
+ else:
99
+ st.error("Unable to extract content from the fetched HTML.")
100
+ else:
101
+ st.error("Failed to fetch the URL.")
common_types.proto ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2017 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ syntax = "proto2";
6
+ option optimize_for = LITE_RUNTIME;
7
+ option java_package = "org.chromium.components.optimization_guide.proto";
8
+ option java_outer_classname = "CommonTypesProto";
9
+
10
+ package optimization_guide.proto;
11
+
12
+ // Context in which the items are requested.
13
+ enum RequestContext {
14
+ reserved 1, 3, 10;
15
+ // Context not specified.
16
+ CONTEXT_UNSPECIFIED = 0;
17
+ // Requesting items on page navigation.
18
+ CONTEXT_PAGE_NAVIGATION = 2;
19
+ // Requesting as part of a SRP fetch.
20
+ CONTEXT_BATCH_UPDATE_GOOGLE_SRP = 4;
21
+ // Requesting as part of a regularly scheduled fetch for active tabs.
22
+ CONTEXT_BATCH_UPDATE_ACTIVE_TABS = 5;
23
+ // Requesting a batch of models to update.
24
+ CONTEXT_BATCH_UPDATE_MODELS = 6;
25
+ // Requesting page load metadata for a user's bookmarks when visiting the
26
+ // bookmarks surface.
27
+ CONTEXT_BOOKMARKS = 7;
28
+ // Requesting metadata for a user when visiting the Journeys surface.
29
+ CONTEXT_JOURNEYS = 8;
30
+ // Requesting metadata for a user when visiting the new tab page.
31
+ CONTEXT_NEW_TAB_PAGE = 9;
32
+ // Requesting metadata for a user when visiting the Page Insights feature;
33
+ // Gaia can be attached to request.
34
+ CONTEXT_PAGE_INSIGHTS_HUB = 11;
35
+ // Requesting metadata for a user when visiting the Page Insights feature;
36
+ // Gaia cannot be attached to request.
37
+ CONTEXT_NON_PERSONALIZED_PAGE_INSIGHTS_HUB = 12;
38
+ // Requesting metadata for shopping features. This is used for relevant URLs
39
+ // (open tabs, bookmarks, etc.) if information is determined to be stale or
40
+ // has otherwise been flushed from the cache.
41
+ CONTEXT_SHOPPING = 13;
42
+ }
43
+
44
+ message FieldTrial {
45
+ // The hash of a field trial.
46
+ optional uint32 name_hash = 1;
47
+ // The hash of the active group within the field trial.
48
+ optional uint32 group_hash = 2;
49
+ }
50
+
51
+ // A Duration represents a signed, fixed-length span of time represented
52
+ // as a count of seconds and fractions of seconds at nanosecond
53
+ // resolution. It is independent of any calendar and concepts like "day"
54
+ // or "month". It is related to Timestamp in that the difference between
55
+ // two Timestamp values is a Duration and it can be added or subtracted
56
+ // from a Timestamp. Range is approximately +-10,000 years.
57
+ // This is local definition matching server side duration.proto definition.
58
+ message Duration {
59
+ // Signed seconds of the span of time. Must be from -315,576,000,000
60
+ // to +315,576,000,000 inclusive.
61
+ optional int64 seconds = 1;
62
+
63
+ // Signed fractions of a second at nanosecond resolution of the span
64
+ // of time. Durations less than one second are represented with a 0
65
+ // `seconds` field and a positive or negative `nanos` field. For durations
66
+ // of one second or more, a non-zero value for the `nanos` field must be
67
+ // of the same sign as the `seconds` field. Must be from -999,999,999
68
+ // to +999,999,999 inclusive.
69
+ optional int32 nanos = 2;
70
+ }
71
+
72
+ message Timestamp {
73
+ // Represents seconds of UTC time since Unix epoch
74
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
75
+ // 9999-12-31T23:59:59Z inclusive.
76
+ optional int64 seconds = 1;
77
+
78
+ // Non-negative fractions of a second at nanosecond resolution. Negative
79
+ // second values with fractions must still have non-negative nanos values
80
+ // that count forward in time. Must be from 0 to 999,999,999
81
+ // inclusive.
82
+ optional int32 nanos = 2;
83
+ }
84
+
85
+ message Any {
86
+ // A URL/resource name that uniquely identifies the type of the serialized
87
+ // protocol buffer message.
88
+ optional string type_url = 1;
89
+ // Must be a valid serialized protocol buffer of the above specified type.
90
+ optional bytes value = 2;
91
+ }
92
+
93
+ // Information about the request origin, common to all Cacao requests.
94
+ message OriginInfo {
95
+ // The platform for the user's Chrome.
96
+ optional Platform platform = 1;
97
+ }
98
+
99
+ // The platform for the user's Chrome on which the request was made.
100
+ enum Platform {
101
+ reserved 7;
102
+
103
+ // Undefined is used when the user's platform cannot be resolved.
104
+ PLATFORM_UNDEFINED = 0;
105
+ // Android based platforms.
106
+ PLATFORM_ANDROID = 1;
107
+ // ChromeOS platforms including all architectures.
108
+ PLATFORM_CHROMEOS = 2;
109
+ // IOS based platforms.
110
+ PLATFORM_IOS = 3;
111
+ // Linux platforms including all architectures.
112
+ PLATFORM_LINUX = 4;
113
+ // Mac based platforms.
114
+ PLATFORM_MAC = 5;
115
+ // Windows based platforms.
116
+ PLATFORM_WINDOWS = 6;
117
+ }
common_types_pb2.py ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: common_types.proto
4
+
5
+ from google.protobuf.internal import enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from google.protobuf import reflection as _reflection
9
+ from google.protobuf import symbol_database as _symbol_database
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor.FileDescriptor(
18
+ name='common_types.proto',
19
+ package='optimization_guide.proto',
20
+ syntax='proto2',
21
+ serialized_options=b'\n0org.chromium.components.optimization_guide.protoB\020CommonTypesProtoH\003',
22
+ create_key=_descriptor._internal_create_key,
23
+ serialized_pb=b'\n\x12\x63ommon_types.proto\x12\x18optimization_guide.proto\"3\n\nFieldTrial\x12\x11\n\tname_hash\x18\x01 \x01(\r\x12\x12\n\ngroup_hash\x18\x02 \x01(\r\"*\n\x08\x44uration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\"+\n\tTimestamp\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\"&\n\x03\x41ny\x12\x10\n\x08type_url\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"B\n\nOriginInfo\x12\x34\n\x08platform\x18\x01 \x01(\x0e\x32\".optimization_guide.proto.Platform*\xf0\x02\n\x0eRequestContext\x12\x17\n\x13\x43ONTEXT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43ONTEXT_PAGE_NAVIGATION\x10\x02\x12#\n\x1f\x43ONTEXT_BATCH_UPDATE_GOOGLE_SRP\x10\x04\x12$\n CONTEXT_BATCH_UPDATE_ACTIVE_TABS\x10\x05\x12\x1f\n\x1b\x43ONTEXT_BATCH_UPDATE_MODELS\x10\x06\x12\x15\n\x11\x43ONTEXT_BOOKMARKS\x10\x07\x12\x14\n\x10\x43ONTEXT_JOURNEYS\x10\x08\x12\x18\n\x14\x43ONTEXT_NEW_TAB_PAGE\x10\t\x12\x1d\n\x19\x43ONTEXT_PAGE_INSIGHTS_HUB\x10\x0b\x12.\n*CONTEXT_NON_PERSONALIZED_PAGE_INSIGHTS_HUB\x10\x0c\x12\x14\n\x10\x43ONTEXT_SHOPPING\x10\r\"\x04\x08\x01\x10\x01\"\x04\x08\x03\x10\x03\"\x04\x08\n\x10\n*\xa3\x01\n\x08Platform\x12\x16\n\x12PLATFORM_UNDEFINED\x10\x00\x12\x14\n\x10PLATFORM_ANDROID\x10\x01\x12\x15\n\x11PLATFORM_CHROMEOS\x10\x02\x12\x10\n\x0cPLATFORM_IOS\x10\x03\x12\x12\n\x0ePLATFORM_LINUX\x10\x04\x12\x10\n\x0cPLATFORM_MAC\x10\x05\x12\x14\n\x10PLATFORM_WINDOWS\x10\x06\"\x04\x08\x07\x10\x07\x42\x46\n0org.chromium.components.optimization_guide.protoB\x10\x43ommonTypesProtoH\x03'
24
+ )
25
+
26
+ _REQUESTCONTEXT = _descriptor.EnumDescriptor(
27
+ name='RequestContext',
28
+ full_name='optimization_guide.proto.RequestContext',
29
+ filename=None,
30
+ file=DESCRIPTOR,
31
+ create_key=_descriptor._internal_create_key,
32
+ values=[
33
+ _descriptor.EnumValueDescriptor(
34
+ name='CONTEXT_UNSPECIFIED', index=0, number=0,
35
+ serialized_options=None,
36
+ type=None,
37
+ create_key=_descriptor._internal_create_key),
38
+ _descriptor.EnumValueDescriptor(
39
+ name='CONTEXT_PAGE_NAVIGATION', index=1, number=2,
40
+ serialized_options=None,
41
+ type=None,
42
+ create_key=_descriptor._internal_create_key),
43
+ _descriptor.EnumValueDescriptor(
44
+ name='CONTEXT_BATCH_UPDATE_GOOGLE_SRP', index=2, number=4,
45
+ serialized_options=None,
46
+ type=None,
47
+ create_key=_descriptor._internal_create_key),
48
+ _descriptor.EnumValueDescriptor(
49
+ name='CONTEXT_BATCH_UPDATE_ACTIVE_TABS', index=3, number=5,
50
+ serialized_options=None,
51
+ type=None,
52
+ create_key=_descriptor._internal_create_key),
53
+ _descriptor.EnumValueDescriptor(
54
+ name='CONTEXT_BATCH_UPDATE_MODELS', index=4, number=6,
55
+ serialized_options=None,
56
+ type=None,
57
+ create_key=_descriptor._internal_create_key),
58
+ _descriptor.EnumValueDescriptor(
59
+ name='CONTEXT_BOOKMARKS', index=5, number=7,
60
+ serialized_options=None,
61
+ type=None,
62
+ create_key=_descriptor._internal_create_key),
63
+ _descriptor.EnumValueDescriptor(
64
+ name='CONTEXT_JOURNEYS', index=6, number=8,
65
+ serialized_options=None,
66
+ type=None,
67
+ create_key=_descriptor._internal_create_key),
68
+ _descriptor.EnumValueDescriptor(
69
+ name='CONTEXT_NEW_TAB_PAGE', index=7, number=9,
70
+ serialized_options=None,
71
+ type=None,
72
+ create_key=_descriptor._internal_create_key),
73
+ _descriptor.EnumValueDescriptor(
74
+ name='CONTEXT_PAGE_INSIGHTS_HUB', index=8, number=11,
75
+ serialized_options=None,
76
+ type=None,
77
+ create_key=_descriptor._internal_create_key),
78
+ _descriptor.EnumValueDescriptor(
79
+ name='CONTEXT_NON_PERSONALIZED_PAGE_INSIGHTS_HUB', index=9, number=12,
80
+ serialized_options=None,
81
+ type=None,
82
+ create_key=_descriptor._internal_create_key),
83
+ _descriptor.EnumValueDescriptor(
84
+ name='CONTEXT_SHOPPING', index=10, number=13,
85
+ serialized_options=None,
86
+ type=None,
87
+ create_key=_descriptor._internal_create_key),
88
+ ],
89
+ containing_type=None,
90
+ serialized_options=None,
91
+ serialized_start=299,
92
+ serialized_end=667,
93
+ )
94
+ _sym_db.RegisterEnumDescriptor(_REQUESTCONTEXT)
95
+
96
+ RequestContext = enum_type_wrapper.EnumTypeWrapper(_REQUESTCONTEXT)
97
+ _PLATFORM = _descriptor.EnumDescriptor(
98
+ name='Platform',
99
+ full_name='optimization_guide.proto.Platform',
100
+ filename=None,
101
+ file=DESCRIPTOR,
102
+ create_key=_descriptor._internal_create_key,
103
+ values=[
104
+ _descriptor.EnumValueDescriptor(
105
+ name='PLATFORM_UNDEFINED', index=0, number=0,
106
+ serialized_options=None,
107
+ type=None,
108
+ create_key=_descriptor._internal_create_key),
109
+ _descriptor.EnumValueDescriptor(
110
+ name='PLATFORM_ANDROID', index=1, number=1,
111
+ serialized_options=None,
112
+ type=None,
113
+ create_key=_descriptor._internal_create_key),
114
+ _descriptor.EnumValueDescriptor(
115
+ name='PLATFORM_CHROMEOS', index=2, number=2,
116
+ serialized_options=None,
117
+ type=None,
118
+ create_key=_descriptor._internal_create_key),
119
+ _descriptor.EnumValueDescriptor(
120
+ name='PLATFORM_IOS', index=3, number=3,
121
+ serialized_options=None,
122
+ type=None,
123
+ create_key=_descriptor._internal_create_key),
124
+ _descriptor.EnumValueDescriptor(
125
+ name='PLATFORM_LINUX', index=4, number=4,
126
+ serialized_options=None,
127
+ type=None,
128
+ create_key=_descriptor._internal_create_key),
129
+ _descriptor.EnumValueDescriptor(
130
+ name='PLATFORM_MAC', index=5, number=5,
131
+ serialized_options=None,
132
+ type=None,
133
+ create_key=_descriptor._internal_create_key),
134
+ _descriptor.EnumValueDescriptor(
135
+ name='PLATFORM_WINDOWS', index=6, number=6,
136
+ serialized_options=None,
137
+ type=None,
138
+ create_key=_descriptor._internal_create_key),
139
+ ],
140
+ containing_type=None,
141
+ serialized_options=None,
142
+ serialized_start=670,
143
+ serialized_end=833,
144
+ )
145
+ _sym_db.RegisterEnumDescriptor(_PLATFORM)
146
+
147
+ Platform = enum_type_wrapper.EnumTypeWrapper(_PLATFORM)
148
+ CONTEXT_UNSPECIFIED = 0
149
+ CONTEXT_PAGE_NAVIGATION = 2
150
+ CONTEXT_BATCH_UPDATE_GOOGLE_SRP = 4
151
+ CONTEXT_BATCH_UPDATE_ACTIVE_TABS = 5
152
+ CONTEXT_BATCH_UPDATE_MODELS = 6
153
+ CONTEXT_BOOKMARKS = 7
154
+ CONTEXT_JOURNEYS = 8
155
+ CONTEXT_NEW_TAB_PAGE = 9
156
+ CONTEXT_PAGE_INSIGHTS_HUB = 11
157
+ CONTEXT_NON_PERSONALIZED_PAGE_INSIGHTS_HUB = 12
158
+ CONTEXT_SHOPPING = 13
159
+ PLATFORM_UNDEFINED = 0
160
+ PLATFORM_ANDROID = 1
161
+ PLATFORM_CHROMEOS = 2
162
+ PLATFORM_IOS = 3
163
+ PLATFORM_LINUX = 4
164
+ PLATFORM_MAC = 5
165
+ PLATFORM_WINDOWS = 6
166
+
167
+
168
+
169
+ _FIELDTRIAL = _descriptor.Descriptor(
170
+ name='FieldTrial',
171
+ full_name='optimization_guide.proto.FieldTrial',
172
+ filename=None,
173
+ file=DESCRIPTOR,
174
+ containing_type=None,
175
+ create_key=_descriptor._internal_create_key,
176
+ fields=[
177
+ _descriptor.FieldDescriptor(
178
+ name='name_hash', full_name='optimization_guide.proto.FieldTrial.name_hash', index=0,
179
+ number=1, type=13, cpp_type=3, label=1,
180
+ has_default_value=False, default_value=0,
181
+ message_type=None, enum_type=None, containing_type=None,
182
+ is_extension=False, extension_scope=None,
183
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
184
+ _descriptor.FieldDescriptor(
185
+ name='group_hash', full_name='optimization_guide.proto.FieldTrial.group_hash', index=1,
186
+ number=2, type=13, cpp_type=3, label=1,
187
+ has_default_value=False, default_value=0,
188
+ message_type=None, enum_type=None, containing_type=None,
189
+ is_extension=False, extension_scope=None,
190
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
191
+ ],
192
+ extensions=[
193
+ ],
194
+ nested_types=[],
195
+ enum_types=[
196
+ ],
197
+ serialized_options=None,
198
+ is_extendable=False,
199
+ syntax='proto2',
200
+ extension_ranges=[],
201
+ oneofs=[
202
+ ],
203
+ serialized_start=48,
204
+ serialized_end=99,
205
+ )
206
+
207
+
208
+ _DURATION = _descriptor.Descriptor(
209
+ name='Duration',
210
+ full_name='optimization_guide.proto.Duration',
211
+ filename=None,
212
+ file=DESCRIPTOR,
213
+ containing_type=None,
214
+ create_key=_descriptor._internal_create_key,
215
+ fields=[
216
+ _descriptor.FieldDescriptor(
217
+ name='seconds', full_name='optimization_guide.proto.Duration.seconds', index=0,
218
+ number=1, type=3, cpp_type=2, label=1,
219
+ has_default_value=False, default_value=0,
220
+ message_type=None, enum_type=None, containing_type=None,
221
+ is_extension=False, extension_scope=None,
222
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
223
+ _descriptor.FieldDescriptor(
224
+ name='nanos', full_name='optimization_guide.proto.Duration.nanos', index=1,
225
+ number=2, type=5, cpp_type=1, label=1,
226
+ has_default_value=False, default_value=0,
227
+ message_type=None, enum_type=None, containing_type=None,
228
+ is_extension=False, extension_scope=None,
229
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
230
+ ],
231
+ extensions=[
232
+ ],
233
+ nested_types=[],
234
+ enum_types=[
235
+ ],
236
+ serialized_options=None,
237
+ is_extendable=False,
238
+ syntax='proto2',
239
+ extension_ranges=[],
240
+ oneofs=[
241
+ ],
242
+ serialized_start=101,
243
+ serialized_end=143,
244
+ )
245
+
246
+
247
+ _TIMESTAMP = _descriptor.Descriptor(
248
+ name='Timestamp',
249
+ full_name='optimization_guide.proto.Timestamp',
250
+ filename=None,
251
+ file=DESCRIPTOR,
252
+ containing_type=None,
253
+ create_key=_descriptor._internal_create_key,
254
+ fields=[
255
+ _descriptor.FieldDescriptor(
256
+ name='seconds', full_name='optimization_guide.proto.Timestamp.seconds', index=0,
257
+ number=1, type=3, cpp_type=2, label=1,
258
+ has_default_value=False, default_value=0,
259
+ message_type=None, enum_type=None, containing_type=None,
260
+ is_extension=False, extension_scope=None,
261
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
262
+ _descriptor.FieldDescriptor(
263
+ name='nanos', full_name='optimization_guide.proto.Timestamp.nanos', index=1,
264
+ number=2, type=5, cpp_type=1, label=1,
265
+ has_default_value=False, default_value=0,
266
+ message_type=None, enum_type=None, containing_type=None,
267
+ is_extension=False, extension_scope=None,
268
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
269
+ ],
270
+ extensions=[
271
+ ],
272
+ nested_types=[],
273
+ enum_types=[
274
+ ],
275
+ serialized_options=None,
276
+ is_extendable=False,
277
+ syntax='proto2',
278
+ extension_ranges=[],
279
+ oneofs=[
280
+ ],
281
+ serialized_start=145,
282
+ serialized_end=188,
283
+ )
284
+
285
+
286
+ _ANY = _descriptor.Descriptor(
287
+ name='Any',
288
+ full_name='optimization_guide.proto.Any',
289
+ filename=None,
290
+ file=DESCRIPTOR,
291
+ containing_type=None,
292
+ create_key=_descriptor._internal_create_key,
293
+ fields=[
294
+ _descriptor.FieldDescriptor(
295
+ name='type_url', full_name='optimization_guide.proto.Any.type_url', index=0,
296
+ number=1, type=9, cpp_type=9, label=1,
297
+ has_default_value=False, default_value=b"".decode('utf-8'),
298
+ message_type=None, enum_type=None, containing_type=None,
299
+ is_extension=False, extension_scope=None,
300
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
301
+ _descriptor.FieldDescriptor(
302
+ name='value', full_name='optimization_guide.proto.Any.value', index=1,
303
+ number=2, type=12, cpp_type=9, label=1,
304
+ has_default_value=False, default_value=b"",
305
+ message_type=None, enum_type=None, containing_type=None,
306
+ is_extension=False, extension_scope=None,
307
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
308
+ ],
309
+ extensions=[
310
+ ],
311
+ nested_types=[],
312
+ enum_types=[
313
+ ],
314
+ serialized_options=None,
315
+ is_extendable=False,
316
+ syntax='proto2',
317
+ extension_ranges=[],
318
+ oneofs=[
319
+ ],
320
+ serialized_start=190,
321
+ serialized_end=228,
322
+ )
323
+
324
+
325
+ _ORIGININFO = _descriptor.Descriptor(
326
+ name='OriginInfo',
327
+ full_name='optimization_guide.proto.OriginInfo',
328
+ filename=None,
329
+ file=DESCRIPTOR,
330
+ containing_type=None,
331
+ create_key=_descriptor._internal_create_key,
332
+ fields=[
333
+ _descriptor.FieldDescriptor(
334
+ name='platform', full_name='optimization_guide.proto.OriginInfo.platform', index=0,
335
+ number=1, type=14, cpp_type=8, label=1,
336
+ has_default_value=False, default_value=0,
337
+ message_type=None, enum_type=None, containing_type=None,
338
+ is_extension=False, extension_scope=None,
339
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
340
+ ],
341
+ extensions=[
342
+ ],
343
+ nested_types=[],
344
+ enum_types=[
345
+ ],
346
+ serialized_options=None,
347
+ is_extendable=False,
348
+ syntax='proto2',
349
+ extension_ranges=[],
350
+ oneofs=[
351
+ ],
352
+ serialized_start=230,
353
+ serialized_end=296,
354
+ )
355
+
356
+ _ORIGININFO.fields_by_name['platform'].enum_type = _PLATFORM
357
+ DESCRIPTOR.message_types_by_name['FieldTrial'] = _FIELDTRIAL
358
+ DESCRIPTOR.message_types_by_name['Duration'] = _DURATION
359
+ DESCRIPTOR.message_types_by_name['Timestamp'] = _TIMESTAMP
360
+ DESCRIPTOR.message_types_by_name['Any'] = _ANY
361
+ DESCRIPTOR.message_types_by_name['OriginInfo'] = _ORIGININFO
362
+ DESCRIPTOR.enum_types_by_name['RequestContext'] = _REQUESTCONTEXT
363
+ DESCRIPTOR.enum_types_by_name['Platform'] = _PLATFORM
364
+ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
365
+
366
+ FieldTrial = _reflection.GeneratedProtocolMessageType('FieldTrial', (_message.Message,), {
367
+ 'DESCRIPTOR' : _FIELDTRIAL,
368
+ '__module__' : 'common_types_pb2'
369
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.FieldTrial)
370
+ })
371
+ _sym_db.RegisterMessage(FieldTrial)
372
+
373
+ Duration = _reflection.GeneratedProtocolMessageType('Duration', (_message.Message,), {
374
+ 'DESCRIPTOR' : _DURATION,
375
+ '__module__' : 'common_types_pb2'
376
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Duration)
377
+ })
378
+ _sym_db.RegisterMessage(Duration)
379
+
380
+ Timestamp = _reflection.GeneratedProtocolMessageType('Timestamp', (_message.Message,), {
381
+ 'DESCRIPTOR' : _TIMESTAMP,
382
+ '__module__' : 'common_types_pb2'
383
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Timestamp)
384
+ })
385
+ _sym_db.RegisterMessage(Timestamp)
386
+
387
+ Any = _reflection.GeneratedProtocolMessageType('Any', (_message.Message,), {
388
+ 'DESCRIPTOR' : _ANY,
389
+ '__module__' : 'common_types_pb2'
390
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Any)
391
+ })
392
+ _sym_db.RegisterMessage(Any)
393
+
394
+ OriginInfo = _reflection.GeneratedProtocolMessageType('OriginInfo', (_message.Message,), {
395
+ 'DESCRIPTOR' : _ORIGININFO,
396
+ '__module__' : 'common_types_pb2'
397
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.OriginInfo)
398
+ })
399
+ _sym_db.RegisterMessage(OriginInfo)
400
+
401
+
402
+ DESCRIPTOR._options = None
403
+ # @@protoc_insertion_point(module_scope)
gen_on_device_proto_descriptors.py ADDED
@@ -0,0 +1,630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # Copyright 2023 The Chromium Authors
3
+ # Use of this source code is governed by a BSD-style license that can be
4
+ # found in the LICENSE file.
5
+ """Code generator for proto descriptors used for on-device model execution.
6
+
7
+ This script generates a C++ source file containing the proto descriptors.
8
+ """
9
+ from __future__ import annotations
10
+
11
+ import dataclasses
12
+ import functools
13
+ from io import StringIO
14
+ import optparse
15
+ import os
16
+ import collections
17
+ import re
18
+ import sys
19
+
20
+ _HERE_PATH = os.path.dirname(__file__)
21
+ _SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..'))
22
+ sys.path.insert(0, os.path.join(_SRC_PATH, 'third_party', 'protobuf',
23
+ 'python'))
24
+
25
+ from google.protobuf import descriptor_pb2
26
+
27
+
28
+ class Error(Exception):
29
+ pass
30
+
31
+
32
+ class Type:
33
+ """Aliases for FieldDescriptorProto::Type(s)."""
34
+ DOUBLE = 1
35
+ FLOAT = 2
36
+ INT64 = 3
37
+ UINT64 = 4
38
+ INT32 = 5
39
+ FIXED64 = 6
40
+ FIXED32 = 7
41
+ BOOL = 8
42
+ STRING = 9
43
+ GROUP = 10
44
+ MESSAGE = 11
45
+ BYTES = 12
46
+ UINT32 = 13
47
+ ENUM = 14
48
+ SFIXED32 = 15
49
+ SFIXED64 = 16
50
+ SINT32 = 17
51
+ SINT64 = 18
52
+
53
+
54
+ @dataclasses.dataclass(frozen=True)
55
+ class BaseValueType:
56
+ cpptype: str
57
+ getIfFn: str
58
+
59
+
60
+ class VType:
61
+ """Base::Value types."""
62
+ DOUBLE = BaseValueType("std::optional<double>", "Double")
63
+ BOOL = BaseValueType("std::optional<bool>", "Bool")
64
+ INT = BaseValueType("std::optional<int>", "Int")
65
+ STRING = BaseValueType("std::string*", "String")
66
+ BLOB = BaseValueType("BlobStorage*", "Blob")
67
+ DICT = BaseValueType("Dict*", "Dict")
68
+ LIST = BaseValueType("List*", "List")
69
+
70
+
71
+ BASE_VALUE_TYPES = {
72
+ Type.DOUBLE: VType.DOUBLE,
73
+ Type.FLOAT: VType.DOUBLE,
74
+ Type.INT64: VType.INT,
75
+ Type.UINT64: VType.INT,
76
+ Type.INT32: VType.INT,
77
+ Type.FIXED64: VType.INT,
78
+ Type.FIXED32: VType.INT,
79
+ Type.BOOL: VType.BOOL,
80
+ Type.STRING: VType.STRING,
81
+ Type.GROUP: VType.STRING, # Not handled
82
+ Type.MESSAGE: VType.DICT, # Not handled
83
+ Type.BYTES: VType.STRING, # Not handled
84
+ Type.UINT32: VType.INT,
85
+ Type.ENUM: VType.INT, # Not handled
86
+ Type.SFIXED32: VType.INT,
87
+ Type.SFIXED64: VType.INT,
88
+ Type.SINT32: VType.INT,
89
+ Type.SINT64: VType.INT,
90
+ }
91
+
92
+
93
+ @dataclasses.dataclass(frozen=True)
94
+ class Message:
95
+ desc: descriptor_pb2.DescriptorProto
96
+ package: str
97
+ parent_names: tuple[str, ...] = ()
98
+
99
+ @functools.cached_property
100
+ def type_name(self) -> str:
101
+ """Returns the value returned for MessageLite::GetTypeName()."""
102
+ return '.'.join((self.package, *self.parent_names, self.desc.name))
103
+
104
+ @functools.cached_property
105
+ def cpp_name(self) -> str:
106
+ """Returns the fully qualified c++ type name."""
107
+ namespace = self.package.replace('.', '::')
108
+ classname = '_'.join((*self.parent_names, self.desc.name))
109
+ return f'{namespace}::{classname}'
110
+
111
+ @functools.cached_property
112
+ def iname(self) -> str:
113
+ """Returns the identifier piece for generated function names."""
114
+ return '_' + self.type_name.replace('.', '_')
115
+
116
+ @functools.cached_property
117
+ def fields(self):
118
+ return tuple(Field(fdesc) for fdesc in self.desc.field)
119
+
120
+
121
+ @dataclasses.dataclass(frozen=True)
122
+ class Field:
123
+ desc: descriptor_pb2.FieldDescriptorProto
124
+
125
+ @property
126
+ def tag_number(self):
127
+ return self.desc.number
128
+
129
+ @property
130
+ def name(self):
131
+ return self.desc.name
132
+
133
+ @property
134
+ def type(self):
135
+ return self.desc.type
136
+
137
+ @property
138
+ def is_repeated(self):
139
+ return self.desc.label == 3
140
+
141
+ @property
142
+ def typename(self):
143
+ return self.desc.type_name.replace('.', '_')
144
+
145
+
146
+ @dataclasses.dataclass()
147
+ class KnownMessages:
148
+ _known: dict[str, Message] = dataclasses.field(default_factory=dict)
149
+
150
+ def _AddMessage(self, msg: Message) -> None:
151
+ self._known['.' + msg.type_name] = msg
152
+ for nested_type in msg.desc.nested_type:
153
+ self._AddMessage(
154
+ Message(desc=nested_type,
155
+ package=msg.package,
156
+ parent_names=(*msg.parent_names, msg.desc.name)))
157
+
158
+ def AddFileDescriptorSet(self,
159
+ fds: descriptor_pb2.FileDescriptorSet) -> None:
160
+ for f in fds.file:
161
+ for m in f.message_type:
162
+ self._AddMessage(Message(desc=m, package=f.package))
163
+
164
+ def GetMessages(self, message_types: set[str]) -> list[Message]:
165
+ return [self._known[t] for t in sorted(message_types)]
166
+
167
+ def GetAllTransitiveDeps(self, message_types: set[str]) -> list[Message]:
168
+ seen = message_types
169
+ stack = list(message_types)
170
+ while stack:
171
+ msg = self._known[stack.pop()]
172
+ field_types = {
173
+ field.desc.type_name
174
+ for field in msg.fields if field.type == Type.MESSAGE
175
+ }
176
+ stack.extend(field_types - seen)
177
+ seen.update(field_types)
178
+ return self.GetMessages(seen)
179
+
180
+
181
+ def GenerateProtoDescriptors(out, includes: set[str], messages: KnownMessages,
182
+ requests: set[str], responses: set[str]):
183
+ """Generate the on_device_model_execution_proto_descriptors.cc content."""
184
+
185
+ readable_messages = messages.GetAllTransitiveDeps(requests | responses)
186
+ writable_messages = messages.GetAllTransitiveDeps(responses)
187
+
188
+ out.write(
189
+ '// DO NOT MODIFY. GENERATED BY gen_on_device_proto_descriptors.py\n')
190
+ out.write('\n')
191
+
192
+ out.write(
193
+ '#include "components/optimization_guide/core/model_execution/on_device_model_execution_proto_descriptors.h"\n' # pylint: disable=line-too-long
194
+ '#include "components/optimization_guide/core/optimization_guide_util.h"\n' # pylint: disable=line-too-long
195
+ )
196
+ out.write('\n')
197
+
198
+ includes.add('"base/values.h"')
199
+ for include in sorted(includes):
200
+ out.write(f'#include {include}\n')
201
+ out.write('\n')
202
+
203
+ out.write('namespace optimization_guide {\n')
204
+ out.write('\n')
205
+ out.write('namespace {\n')
206
+ _GetProtoValue.GenPrivate(out, readable_messages)
207
+ _GetProtoRepeated.GenPrivate(out, readable_messages)
208
+ _SetProtoValue.GenPrivate(out, writable_messages)
209
+ _ConvertValue.GenPrivate(out, writable_messages)
210
+ out.write('} // namespace\n\n')
211
+ _GetProtoValue.GenPublic(out)
212
+ _GetProtoRepeated.GenPublic(out)
213
+ _GetProtoFromAny.GenPublic(out, readable_messages)
214
+ _SetProtoValue.GenPublic(out)
215
+ _NestedMessageIteratorGet.GenPublic(out, readable_messages)
216
+ _ConvertValue.GenPublic(out, writable_messages)
217
+ out.write("""\
218
+ NestedMessageIterator::NestedMessageIterator(
219
+ const google::protobuf::MessageLite* parent,
220
+ int32_t tag_number,
221
+ int32_t field_size,
222
+ int32_t offset) :
223
+ parent_(parent),
224
+ tag_number_(tag_number),
225
+ field_size_(field_size),
226
+ offset_(offset) {}
227
+ """)
228
+ out.write('} // namespace optimization_guide\n')
229
+ out.write('\n')
230
+
231
+
232
+ class _GetProtoValue:
233
+ """Namespace class for GetProtoValue method builders."""
234
+
235
+ @classmethod
236
+ def GenPublic(cls, out):
237
+ out.write("""
238
+ std::optional<proto::Value> GetProtoValue(
239
+ const google::protobuf::MessageLite& msg,
240
+ const proto::ProtoField& proto_field) {
241
+ return GetProtoValue(msg, proto_field, /*index=*/0);
242
+ }
243
+ """)
244
+
245
+ @classmethod
246
+ def GenPrivate(cls, out, messages: list[Message]):
247
+ out.write("""
248
+ std::optional<proto::Value> GetProtoValue(
249
+ const google::protobuf::MessageLite& msg,
250
+ const proto::ProtoField& proto_field, int32_t index) {
251
+ if (index >= proto_field.proto_descriptors_size()) {
252
+ return std::nullopt;
253
+ }
254
+ int32_t tag_number =
255
+ proto_field.proto_descriptors(index).tag_number();
256
+ """)
257
+
258
+ for msg in messages:
259
+ cls._IfMsg(out, msg)
260
+ out.write('return std::nullopt;\n')
261
+ out.write('}\n\n') # End function
262
+
263
+ @classmethod
264
+ def _IfMsg(cls, out, msg: Message):
265
+ if all(field.is_repeated for field in msg.fields):
266
+ # Omit the empty case to avoid unused variable warnings.
267
+ return
268
+ out.write(f'if (msg.GetTypeName() == "{msg.type_name}") {{\n')
269
+ out.write(f'const {msg.cpp_name}& casted_msg = ')
270
+ out.write(f' static_cast<const {msg.cpp_name}&>(msg);\n')
271
+ out.write('switch (tag_number) {\n')
272
+ for field in msg.fields:
273
+ if field.is_repeated:
274
+ continue
275
+ cls._FieldCase(out, field)
276
+ out.write('}\n') # End switch
277
+ out.write('}\n\n') # End if statement
278
+
279
+ @classmethod
280
+ def _FieldCase(cls, out, field: Field):
281
+ out.write(f'case {field.tag_number}: {{\n')
282
+ name = f'casted_msg.{field.name}()'
283
+ if field.type == Type.MESSAGE:
284
+ out.write(f'return GetProtoValue({name}, proto_field, index+1);\n')
285
+ else:
286
+ out.write('proto::Value value;\n')
287
+ if field.type in {Type.DOUBLE, Type.FLOAT}:
288
+ out.write(
289
+ f'value.set_float_value(static_cast<double>({name}));\n')
290
+ elif field.type in {Type.INT64, Type.UINT64}:
291
+ out.write(
292
+ f'value.set_int64_value(static_cast<int64_t>({name}));\n')
293
+ elif field.type in {Type.INT32, Type.UINT32, Type.ENUM}:
294
+ out.write(
295
+ f'value.set_int32_value(static_cast<int32_t>({name}));\n')
296
+ elif field.type in {Type.BOOL}:
297
+ out.write(f'value.set_boolean_value({name});\n')
298
+ elif field.type in {Type.STRING}:
299
+ out.write(f'value.set_string_value({name});\n')
300
+ else:
301
+ raise Error()
302
+ out.write('return value;\n')
303
+ out.write('}\n') # End case
304
+
305
+
306
+ class _GetProtoFromAny:
307
+ """Namespace class for GetProtoFromAny method builders."""
308
+
309
+ @classmethod
310
+ def GenPublic(cls, out, messages: list[Message]):
311
+ out.write("""
312
+ std::unique_ptr<google::protobuf::MessageLite> GetProtoFromAny(
313
+ const proto::Any& msg) {
314
+ """)
315
+
316
+ for msg in messages:
317
+ cls._IfMsg(out, msg)
318
+ out.write('return nullptr;\n')
319
+ out.write('}\n\n') # End function
320
+
321
+ @classmethod
322
+ def _IfMsg(cls, out, msg: Message):
323
+ out.write(f"""if (msg.type_url() ==
324
+ "type.googleapis.com/{msg.type_name}") {{
325
+ """)
326
+ out.write(
327
+ f'auto casted_msg = ParsedAnyMetadata<{msg.cpp_name}>(msg);\n')
328
+ out.write("""
329
+ std::unique_ptr<google::protobuf::MessageLite> copy(
330
+ casted_msg->New());\n
331
+ """)
332
+ out.write('copy->CheckTypeAndMergeFrom(*casted_msg);\n')
333
+ out.write('return copy;\n')
334
+ out.write('}\n\n') # End if statement
335
+
336
+
337
+ class _NestedMessageIteratorGet:
338
+ """Namespace class for NestedMessageIterator::Get method builders."""
339
+
340
+ @classmethod
341
+ def GenPublic(cls, out, messages: list[Message]):
342
+ out.write('const google::protobuf::MessageLite* '
343
+ 'NestedMessageIterator::Get() const {\n')
344
+ for msg in messages:
345
+ cls._IfMsg(out, msg)
346
+ out.write(' NOTREACHED_IN_MIGRATION();\n')
347
+ out.write(' return nullptr;\n')
348
+ out.write('}\n')
349
+
350
+ @classmethod
351
+ def _IfMsg(cls, out, msg: Message):
352
+ out.write(f'if (parent_->GetTypeName() == "{msg.type_name}") {{\n')
353
+ out.write('switch (tag_number_) {\n')
354
+ for field in msg.fields:
355
+ if field.type == Type.MESSAGE and field.is_repeated:
356
+ cls._FieldCase(out, msg, field)
357
+ out.write('}\n') # End switch
358
+ out.write('}\n\n') # End if statement
359
+
360
+ @classmethod
361
+ def _FieldCase(cls, out, msg: Message, field: Field):
362
+ cast_msg = f'static_cast<const {msg.cpp_name}*>(parent_)'
363
+ out.write(f'case {field.tag_number}: {{\n')
364
+ out.write(f'return &{cast_msg}->{field.name}(offset_);\n')
365
+ out.write('}\n') # End case
366
+
367
+
368
+ class _GetProtoRepeated:
369
+ """Namespace class for GetProtoRepeated method builders."""
370
+
371
+ @classmethod
372
+ def GenPublic(cls, out):
373
+ out.write("""
374
+ std::optional<NestedMessageIterator> GetProtoRepeated(
375
+ const google::protobuf::MessageLite* msg,
376
+ const proto::ProtoField& proto_field) {
377
+ return GetProtoRepeated(msg, proto_field, /*index=*/0);
378
+ }
379
+ """)
380
+
381
+ @classmethod
382
+ def GenPrivate(cls, out, messages: list[Message]):
383
+ out.write("""\
384
+ std::optional<NestedMessageIterator> GetProtoRepeated(
385
+ const google::protobuf::MessageLite* msg,
386
+ const proto::ProtoField& proto_field,
387
+ int32_t index) {
388
+ if (index >= proto_field.proto_descriptors_size()) {
389
+ return std::nullopt;
390
+ }
391
+ int32_t tag_number =
392
+ proto_field.proto_descriptors(index).tag_number();
393
+ """)
394
+
395
+ for msg in messages:
396
+ cls._IfMsg(out, msg)
397
+ out.write('return std::nullopt;\n')
398
+ out.write('}\n\n') # End function
399
+
400
+ @classmethod
401
+ def _IfMsg(cls, out, msg: Message):
402
+ out.write(f'if (msg->GetTypeName() == "{msg.type_name}") {{\n')
403
+ out.write('switch (tag_number) {\n')
404
+ for field in msg.fields:
405
+ if field.type == Type.MESSAGE:
406
+ cls._FieldCase(out, msg, field)
407
+ out.write('}\n') # End switch
408
+ out.write('}\n\n') # End if statement
409
+
410
+ @classmethod
411
+ def _FieldCase(cls, out, msg: Message, field: Field):
412
+ field_expr = f'static_cast<const {msg.cpp_name}*>(msg)->{field.name}()'
413
+ out.write(f'case {field.tag_number}: {{\n')
414
+ if field.is_repeated:
415
+ out.write(f'return NestedMessageIterator('
416
+ f'msg, tag_number, {field_expr}.size(), 0);\n')
417
+ else:
418
+ out.write(f'return GetProtoRepeated('
419
+ f'&{field_expr}, proto_field, index+1);\n')
420
+ out.write('}\n') # End case
421
+
422
+
423
+ class _SetProtoValue:
424
+ """Namespace class for SetProtoValue method builders."""
425
+
426
+ @classmethod
427
+ def GenPublic(cls, out):
428
+ out.write("""
429
+ std::optional<proto::Any> SetProtoValue(
430
+ const std::string& proto_name,
431
+ const proto::ProtoField& proto_field,
432
+ const std::string& value) {
433
+ return SetProtoValue(proto_name, proto_field, value, /*index=*/0);
434
+ }
435
+ """)
436
+
437
+ @classmethod
438
+ def GenPrivate(cls, out, messages: list[Message]):
439
+ out.write("""
440
+ std::optional<proto::Any> SetProtoValue(
441
+ const std::string& proto_name,
442
+ const proto::ProtoField& proto_field,
443
+ const std::string& value,
444
+ int32_t index) {
445
+ if (index >= proto_field.proto_descriptors_size()) {
446
+ return std::nullopt;
447
+ }
448
+ """)
449
+ for msg in messages:
450
+ cls._IfMsg(out, msg)
451
+ out.write("""
452
+ return std::nullopt;
453
+ }
454
+ """)
455
+
456
+ @classmethod
457
+ def _IfMsg(cls, out, msg: Message):
458
+ out.write(f'if (proto_name == "{msg.type_name}") {{\n')
459
+ out.write(
460
+ 'switch(proto_field.proto_descriptors(index).tag_number()) {\n')
461
+ for field in msg.fields:
462
+ cls._FieldCase(out, msg, field)
463
+ out.write("""
464
+ default:
465
+ return std::nullopt;\n
466
+ """)
467
+ out.write('}')
468
+ out.write('}\n') # End if statement
469
+
470
+ @classmethod
471
+ def _FieldCase(cls, out, msg: Message, field: Field):
472
+ if field.type == Type.STRING and not field.is_repeated:
473
+ out.write(f'case {field.tag_number}: {{\n')
474
+ out.write('proto::Any any;\n')
475
+ out.write(
476
+ f'any.set_type_url("type.googleapis.com/{msg.type_name}");\n')
477
+ out.write(f'{msg.cpp_name} response_value;\n')
478
+ out.write(f'response_value.set_{field.name}(value);')
479
+ out.write('response_value.SerializeToString(any.mutable_value());')
480
+ out.write('return any;')
481
+ out.write('}\n')
482
+
483
+
484
+ class _ConvertValue:
485
+ """Namespace class for base::Value->Message method builders."""
486
+
487
+ @classmethod
488
+ def GenPublic(cls, out, messages: list[Message]):
489
+ out.write(f"""
490
+ std::optional<proto::Any> ConvertToAnyWrappedProto(
491
+ const base::Value& object, const std::string& type_name) {{
492
+ proto::Any any;
493
+ any.set_type_url("type.googleapis.com/" + type_name);
494
+ """)
495
+ for msg in messages:
496
+ out.write(f"""
497
+ if (type_name == "{msg.type_name}") {{
498
+ {msg.cpp_name} msg;
499
+ if (Convert{msg.iname}(object, msg)) {{
500
+ msg.SerializeToString(any.mutable_value());
501
+ return any;
502
+ }}
503
+ }}
504
+ """)
505
+
506
+ out.write(f"""
507
+ return std::nullopt;
508
+ }}
509
+ """)
510
+
511
+ @classmethod
512
+ def GenPrivate(cls, out, messages: list[Message]):
513
+ for msg in messages:
514
+ out.write(f"""
515
+ bool Convert{msg.iname}(
516
+ const base::Value& object, {msg.cpp_name}& proto);
517
+ """)
518
+ for msg in messages:
519
+ cls._DefineConvert(out, msg)
520
+
521
+ @classmethod
522
+ def _DefineConvert(cls, out, msg: Message):
523
+ out.write(f"""
524
+ bool Convert{msg.iname}(
525
+ const base::Value& object, {msg.cpp_name}& proto) {{
526
+ const base::Value::Dict* asdict = object.GetIfDict();
527
+ if (!asdict) {{
528
+ return false;
529
+ }}
530
+ """)
531
+ for field in msg.fields:
532
+ if field.type == Type.GROUP:
533
+ continue
534
+ if field.type == Type.ENUM:
535
+ continue
536
+ out.write('if (const base::Value* field_value =\n')
537
+ out.write(f' asdict->Find("{field.desc.json_name}")) {{')
538
+ cls._FieldCase(out, msg, field)
539
+ out.write(f'}}')
540
+ out.write(f"""
541
+ return true;
542
+ }}
543
+ """)
544
+
545
+ @classmethod
546
+ def _FieldCase(cls, out, msg: Message, field: Field):
547
+ if field.is_repeated:
548
+ out.write(f"""
549
+ const auto* lst = field_value->GetIfList();
550
+ if (!lst) {{
551
+ return false;
552
+ }}
553
+ for (const base::Value& entry_value : *lst) {{
554
+ """)
555
+ if field.type == Type.MESSAGE:
556
+ out.write(f"""
557
+ if (!Convert{field.typename}(
558
+ entry_value, *proto.add_{field.name}())) {{
559
+ return false;
560
+ }}
561
+ """)
562
+ else:
563
+ vtype = BASE_VALUE_TYPES[field.type]
564
+ out.write(f"""
565
+ const {vtype.cpptype} v = entry_value.GetIf{vtype.getIfFn}();
566
+ if (!v) {{
567
+ return false;
568
+ }}
569
+ proto.add_{field.name}(*v);
570
+ """)
571
+ out.write("}") # end for loop
572
+ else:
573
+ if field.type == Type.MESSAGE:
574
+ out.write(f"""
575
+ if (!Convert{field.typename}(
576
+ *field_value, *proto.mutable_{field.name}())) {{
577
+ return false;
578
+ }}
579
+ """)
580
+ return
581
+ else:
582
+ vtype = BASE_VALUE_TYPES[field.type]
583
+ out.write(f"""
584
+ const {vtype.cpptype} v = field_value->GetIf{vtype.getIfFn}();
585
+ if (!v) {{
586
+ return false;
587
+ }}
588
+ proto.set_{field.name}(*v);
589
+ """)
590
+
591
+
592
+ def main(argv):
593
+ parser = optparse.OptionParser()
594
+ parser.add_option('--input_file', action='append', default=[])
595
+ parser.add_option('--output_cc')
596
+ parser.add_option('--include', action='append', default=[])
597
+ parser.add_option('--request', action='append', default=[])
598
+ parser.add_option('--response', action='append', default=[])
599
+ options, _ = parser.parse_args(argv)
600
+
601
+ input_files = list(options.input_file)
602
+ includes = set(options.include)
603
+ requests = set(options.request)
604
+ responses = set(options.response)
605
+
606
+ # Write to standard output or file specified by --output_cc.
607
+ out_cc = getattr(sys.stdout, 'buffer', sys.stdout)
608
+ if options.output_cc:
609
+ out_cc = open(options.output_cc, 'wb')
610
+
611
+ messages = KnownMessages()
612
+ for input_file in input_files:
613
+ fds = descriptor_pb2.FileDescriptorSet()
614
+ with open(input_file, 'rb') as fp:
615
+ fds.ParseFromString(fp.read())
616
+ messages.AddFileDescriptorSet(fds)
617
+
618
+ out_cc_str = StringIO()
619
+ GenerateProtoDescriptors(out_cc_str, includes, messages, requests,
620
+ responses)
621
+ out_cc.write(out_cc_str.getvalue().encode('utf-8'))
622
+
623
+ if options.output_cc:
624
+ out_cc.close()
625
+
626
+ return 0
627
+
628
+
629
+ if __name__ == '__main__':
630
+ sys.exit(main(sys.argv[1:]))
labels.txt ADDED
@@ -0,0 +1,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -2
2
+ 1
3
+ 126
4
+ 149
5
+ 180
6
+ 207
7
+ 103
8
+ 215
9
+ 254
10
+ 243
11
+ 289
12
+ 239
13
+ 299
14
+ 100
15
+ 361
16
+ 53
17
+ 104
18
+ 272
19
+ 420
20
+ 140
21
+ 12
22
+ 23
23
+ 363
24
+ 444
25
+ 158
26
+ 183
27
+ 29
28
+ 86
29
+ 57
30
+ 536
31
+ 562
32
+ 258
33
+ 236
34
+ 196
35
+ 263
36
+ 332
37
+ 572
38
+ 601
39
+ 172
40
+ 603
41
+ 227
42
+ 436
43
+ 129
44
+ 535
45
+ 81
46
+ 427
47
+ 385
48
+ 97
49
+ 408
50
+ 217
51
+ 164
52
+ 620
53
+ 508
54
+ 173
55
+ 577
56
+ 209
57
+ 82
58
+ 88
59
+ 388
60
+ 380
61
+ 99
62
+ 382
63
+ 71
64
+ 211
65
+ 340
66
+ 610
67
+ 350
68
+ 96
69
+ 353
70
+ 334
71
+ 336
72
+ 337
73
+ 30
74
+ 429
75
+ 92
76
+ 94
77
+ 383
78
+ 160
79
+ 539
80
+ 300
81
+ 303
82
+ 317
83
+ 315
84
+ 611
85
+ 304
86
+ 621
87
+ 208
88
+ 482
89
+ 210
90
+ 486
91
+ 70
92
+ 462
93
+ 150
94
+ 447
95
+ 407
96
+ 415
97
+ 417
98
+ 325
99
+ 309
100
+ 250
101
+ 533
102
+ 433
103
+ 134
104
+ 135
105
+ 137
106
+ 128
107
+ 423
108
+ 351
109
+ 295
110
+ 297
111
+ 404
112
+ 419
113
+ 412
114
+ 409
115
+ 405
116
+ 438
117
+ 437
118
+ 578
119
+ 607
120
+ 397
121
+ 424
122
+ 430
123
+ 293
124
+ 230
125
+ 542
126
+ 229
127
+ 234
128
+ 567
129
+ 264
130
+ 530
131
+ 218
132
+ 525
133
+ 532
134
+ 528
135
+ 247
136
+ 563
137
+ 400
138
+ 224
139
+ 576
140
+ 608
141
+ 434
142
+ 379
143
+ 56
144
+ 310
145
+ 470
146
+ 202
147
+ 571
148
+ 161
149
+ 157
150
+ 159
151
+ 448
152
+ 523
153
+ 83
154
+ 368
155
+ 144
156
+ 422
157
+ 442
158
+ 439
159
+ 531
160
+ 321
161
+ 609
162
+ 322
163
+ 253
164
+ 597
165
+ 398
166
+ 323
167
+ 472
168
+ 265
169
+ 102
170
+ 352
171
+ 245
172
+ 428
173
+ 604
174
+ 443
175
+ 25
176
+ 26
177
+ 27
178
+ 33
179
+ 377
180
+ 394
181
+ 354
182
+ 20
183
+ 358
184
+ 154
185
+ 194
186
+ 402
187
+ 411
188
+ 471
189
+ 564
190
+ 201
191
+ 602
192
+ 585
193
+ 560
194
+ 341
195
+ 421
196
+ 418
197
+ 406
198
+ 435
199
+ 561
200
+ 233
201
+ 540
202
+ 537
203
+ 554
204
+ 60
205
+ 67
206
+ 152
207
+ 171
208
+ 176
209
+ 492
210
+ 503
211
+ 493
212
+ 267
213
+ 268
214
+ 4
215
+ 431
216
+ 153
217
+ 453
218
+ 451
219
+ 457
220
+ 463
221
+ 465
222
+ 185
223
+ 186
224
+ 466
225
+ 467
226
+ 191
227
+ 192
228
+ 473
229
+ 479
230
+ 491
231
+ 507
232
+ 500
233
+ 519
234
+ 413
235
+ 414
236
+ 226
237
+ 237
238
+ 238
239
+ 559
240
+ 242
241
+ 259
242
+ 574
243
+ 575
244
+ 291
245
+ 580
246
+ 582
247
+ 294
248
+ 583
249
+ 589
250
+ 590
251
+ 296
252
+ 591
253
+ 594
254
+ 596
255
+ 598
256
+ 298
257
+ 343
258
+ 626
259
+ 231
260
+ 59
261
+ 629
262
+ 31
263
+ 28
264
+ 359
265
+ 32
266
+ 360
267
+ 36
268
+ 24
269
+ 432
270
+ 46
271
+ 367
272
+ 51
273
+ 366
274
+ 72
275
+ 76
276
+ 78
277
+ 345
278
+ 410
279
+ 565
280
+ 356
281
+ 141
282
+ 18
283
+ 15
284
+ 13
285
+ 50
286
+ 52
287
+ 625
288
+ 403
289
+ 370
290
+ 324
291
+ 496
292
+ 132
293
+ 426
294
+ 113
295
+ 527
296
+ 497
297
+ 401
298
+ 566
299
+ 526
300
+ 101
301
+ 399
302
+ 369
303
+ 48
304
+ 546
305
+ 249
306
+ 73
307
+ 371
308
+ 372
309
+ 573
310
+ 538
311
+ 494
312
+ 362
313
+ 277
314
+ 9
315
+ 151
316
+ 468
317
+ 19
318
+ 515
319
+ 545
320
+ 21
321
+ 184
322
+ 69
323
+ 440
324
+ 498
325
+ 469
326
+ 490
327
+ 474
328
+ 475
329
+ 477
330
+ 478
331
+ 476
332
+ 488
333
+ 481
334
+ 260
335
+ 328
336
+ 375
337
+ 628
338
+ 425
339
+ 47
340
+ 389
341
+ 391
342
+ 392
343
+ 495
344
+ 445
345
+ 446
346
+ 449
347
+ 170
348
+ 162
349
+ 163
350
+ 534
351
+ 544
352
+ 547
353
+ 548
354
+ 549
355
+ 550
356
+ 551
357
+ 552
358
+ 553
359
+ 555
360
+ 556
361
+ 558
362
+ 557
363
+ 579
364
+ 584
365
+ 586
366
+ 587
367
+ 588
368
+ 301
369
+ 450
370
+ 452
371
+ 455
372
+ 459
373
+ 357
374
+ 355
375
+ 454
376
+ 456
377
+ 458
378
+ 464
379
+ 327
380
+ 595
381
+ 511
382
+ 512
383
+ 513
384
+ 514
385
+ 516
386
+ 517
387
+ 612
388
+ 616
389
+ 613
390
+ 614
391
+ 615
392
+ 617
393
+ 618
394
+ 619
395
+ 600
396
+ 599
397
+ 62
398
+ 84
399
+ 64
400
+ 65
401
+ 374
402
+ 66
403
+ 68
404
+ 74
405
+ 376
406
+ 75
407
+ 373
408
+ 568
409
+ 569
410
+ 622
411
+ 570
412
+ 487
413
+ 485
414
+ 489
415
+ 484
416
+ 505
417
+ 524
418
+ 480
419
+ 520
420
+ 522
421
+ 518
422
+ 499
423
+ 483
424
+ 212
425
+ 378
426
+ 521
427
+ 214
428
+ 605
429
+ 606
430
+ 441
431
+ 390
432
+ 90
433
+ 93
434
+ 386
435
+ 387
436
+ 381
437
+ 364
438
+ 365
439
+ 131
440
+ 460
441
+ 461
442
+ 187
443
+ 543
444
+ 213
445
+ 89
446
+ 384
447
+ 95
448
+ 393
449
+ 395
450
+ 177
451
+ 501
452
+ 502
453
+ 504
454
+ 529
455
+ 541
456
+ 624
457
+ 335
458
+ 592
459
+ 581
460
+ 416
461
+ 506
462
+ 509
463
+ 510
464
+ 623
465
+ 593
466
+ 627
467
+ 396
468
+ 338
469
+ 63
470
+ 91
model-info.cc ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // DO NOT MODIFY. GENERATED BY gen_on_device_proto_descriptors.py
2
+
3
+ #include "components/optimization_guide/core/model_execution/on_device_model_execution_proto_descriptors.h"
4
+ #include "components/optimization_guide/core/optimization_guide_util.h"
5
+
6
+ #include "base/values.h"
7
+
8
+ namespace optimization_guide {
9
+
10
+ namespace {
11
+
12
+ std::optional<proto::Value> GetProtoValue(
13
+ const google::protobuf::MessageLite& msg,
14
+ const proto::ProtoField& proto_field, int32_t index) {
15
+ if (index >= proto_field.proto_descriptors_size()) {
16
+ return std::nullopt;
17
+ }
18
+ int32_t tag_number =
19
+ proto_field.proto_descriptors(index).tag_number();
20
+ return std::nullopt;
21
+ }
22
+
23
+ std::optional<NestedMessageIterator> GetProtoRepeated(
24
+ const google::protobuf::MessageLite* msg,
25
+ const proto::ProtoField& proto_field,
26
+ int32_t index) {
27
+ if (index >= proto_field.proto_descriptors_size()) {
28
+ return std::nullopt;
29
+ }
30
+ int32_t tag_number =
31
+ proto_field.proto_descriptors(index).tag_number();
32
+ return std::nullopt;
33
+ }
34
+
35
+
36
+ std::optional<proto::Any> SetProtoValue(
37
+ const std::string& proto_name,
38
+ const proto::ProtoField& proto_field,
39
+ const std::string& value,
40
+ int32_t index) {
41
+ if (index >= proto_field.proto_descriptors_size()) {
42
+ return std::nullopt;
43
+ }
44
+
45
+ return std::nullopt;
46
+ }
47
+ } // namespace
48
+
49
+
50
+ std::optional<proto::Value> GetProtoValue(
51
+ const google::protobuf::MessageLite& msg,
52
+ const proto::ProtoField& proto_field) {
53
+ return GetProtoValue(msg, proto_field, /*index=*/0);
54
+ }
55
+
56
+ std::optional<NestedMessageIterator> GetProtoRepeated(
57
+ const google::protobuf::MessageLite* msg,
58
+ const proto::ProtoField& proto_field) {
59
+ return GetProtoRepeated(msg, proto_field, /*index=*/0);
60
+ }
61
+
62
+ std::unique_ptr<google::protobuf::MessageLite> GetProtoFromAny(
63
+ const proto::Any& msg) {
64
+ return nullptr;
65
+ }
66
+
67
+
68
+ std::optional<proto::Any> SetProtoValue(
69
+ const std::string& proto_name,
70
+ const proto::ProtoField& proto_field,
71
+ const std::string& value) {
72
+ return SetProtoValue(proto_name, proto_field, value, /*index=*/0);
73
+ }
74
+ const google::protobuf::MessageLite* NestedMessageIterator::Get() const {
75
+ NOTREACHED_IN_MIGRATION();
76
+ return nullptr;
77
+ }
78
+
79
+ std::optional<proto::Any> ConvertToAnyWrappedProto(
80
+ const base::Value& object, const std::string& type_name) {
81
+ proto::Any any;
82
+ any.set_type_url("type.googleapis.com/" + type_name);
83
+
84
+ return std::nullopt;
85
+ }
86
+ NestedMessageIterator::NestedMessageIterator(
87
+ const google::protobuf::MessageLite* parent,
88
+ int32_t tag_number,
89
+ int32_t field_size,
90
+ int32_t offset) :
91
+ parent_(parent),
92
+ tag_number_(tag_number),
93
+ field_size_(field_size),
94
+ offset_(offset) {}
95
+ } // namespace optimization_guide
96
+
model-info.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00f81098848e728351ea9cd53ebf8300027d49a52213acc2e6df23b93332d089
3
+ size 165
model.tflite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:329b20f56d6438f20aef784d9bd7b686dd16550dc84967bb5be3dc0a1c29ce18
3
+ size 2737464
models.proto ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2019 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ syntax = "proto2";
5
+ option optimize_for = LITE_RUNTIME;
6
+ option java_package = "org.chromium.components.optimization_guide.proto";
7
+ option java_outer_classname = "ModelsProto";
8
+ package optimization_guide.proto;
9
+ import "common_types.proto";
10
+ // A generic handle for any type of model.
11
+ message Model {
12
+ reserved 3, 4;
13
+ oneof model {
14
+ DecisionTree decision_tree = 1;
15
+ Ensemble ensemble = 2;
16
+ // When passed from the server, this is the URL that the model can be
17
+ // downloaded from. When used internally within Chrome, this contains the
18
+ // absolute file path where the model file is saved on disk.
19
+ string download_url = 5;
20
+ }
21
+ // The tag number is high to allow models to be added and an uncommon number
22
+ // in case the proto this is generated from adds a similar functionality.
23
+ optional DoubleValue threshold = 123;
24
+ }
25
+ // An ensemble prediction model consisting of an ordered sequence of models.
26
+ // This message can be used to express bagged or boosted models.
27
+ message Ensemble {
28
+ reserved 2, 3, 4;
29
+ message Member { optional Model submodel = 1; }
30
+ // The tag number is set by the proto this is generated from and cannot be
31
+ // changed.
32
+ repeated Member members = 100;
33
+ }
34
+ // A decision tree model with its weight for use if included in an ensemble.
35
+ message DecisionTree {
36
+ reserved 2;
37
+ repeated TreeNode nodes = 1;
38
+ optional float weight = 3;
39
+ }
40
+ // A node of a decision tree that is a binary deicison or a leaf.
41
+ message TreeNode {
42
+ reserved 6, 7;
43
+ // Following fields are provided for convenience and better readability.
44
+ // Filling them in is not required.
45
+ optional Int32Value node_id = 1;
46
+ optional Int32Value depth = 2;
47
+ optional Int32Value subtree_size = 3;
48
+ oneof node_type {
49
+ BinaryNode binary_node = 4;
50
+ Leaf leaf = 5;
51
+ }
52
+ }
53
+ // A tree node that contains an inequality test that during evaluation
54
+ // determines whether to continue the left or right child.
55
+ message BinaryNode {
56
+ reserved 3, 5;
57
+ optional Int32Value left_child_id = 1;
58
+ optional Int32Value right_child_id = 2;
59
+ enum Direction {
60
+ LEFT = 0;
61
+ RIGHT = 1;
62
+ }
63
+ // When a datapoint satisfies the test, it should be propagated to the left
64
+ // child.
65
+ optional InequalityTest inequality_left_child_test = 4;
66
+ }
67
+ // Vector of values for use within Models.
68
+ message Vector {
69
+ repeated Value value = 1;
70
+ }
71
+ // A leaf node of a decision tree.
72
+ message Leaf {
73
+ reserved 2, 3;
74
+ optional Vector vector = 1;
75
+ }
76
+ // The ID for the features used during evaluation of a Model.
77
+ message FeatureId {
78
+ reserved 2;
79
+ optional StringValue id = 1;
80
+ }
81
+ // The set of inequality operations supported by binary nodes for
82
+ // decision tree models.
83
+ message InequalityTest {
84
+ reserved 4;
85
+ // When the feature is missing, the test's outcome is undefined.
86
+ optional FeatureId feature_id = 1;
87
+ enum Type {
88
+ LESS_OR_EQUAL = 0;
89
+ LESS_THAN = 1;
90
+ GREATER_OR_EQUAL = 2;
91
+ GREATER_THAN = 3;
92
+ };
93
+ optional Type type = 2;
94
+ optional Value threshold = 3;
95
+ }
96
+ // Represents a single value of any type, e.g. 5 or "abc".
97
+ message Value {
98
+ reserved 5;
99
+ oneof value {
100
+ float float_value = 1;
101
+ double double_value = 2;
102
+ int32 int32_value = 3;
103
+ int64 int64_value = 4;
104
+ }
105
+ }
106
+ // Wrapper message for `int32`.
107
+ //
108
+ // The JSON representation for `Int32Value` is JSON number.
109
+ message Int32Value {
110
+ // The int32 value.
111
+ optional int32 value = 1;
112
+ }
113
+ // Wrapper message for `string`.
114
+ //
115
+ // The JSON representation for `StringValue` is JSON string.
116
+ message StringValue {
117
+ // The string value.
118
+ optional string value = 1;
119
+ }
120
+ // Wrapper message for `double`.
121
+ //
122
+ // The JSON representation for `DoubleValue` is JSON number.
123
+ message DoubleValue {
124
+ // The double value.
125
+ optional double value = 1;
126
+ }
127
+ // Requests prediction models to be used for a set of optimization targets.
128
+ message GetModelsRequest {
129
+ reserved 2;
130
+ // Information about the requested models.
131
+ repeated ModelInfo requested_models = 1;
132
+ // Context in which this request is made.
133
+ //
134
+ // If the context matches one that requires more urgency (i.e.
135
+ // CONTEXT_PAGE_NAVIGATION), then no model updates will be returned for the
136
+ // requested models.
137
+ optional RequestContext request_context = 3;
138
+ // The field trials that are currently active when this request is made.
139
+ repeated FieldTrial active_field_trials = 4;
140
+ // The locale to associate with this request.
141
+ //
142
+ // It is the IETF language tag, defined in BCP 47. The region subtag is not
143
+ // included when it adds no distinguishing information to the language tag
144
+ // (e.g. both "en-US" and "fr" are correct here).
145
+ optional string locale = 5;
146
+ }
147
+ // Response to the GetModels request.
148
+ message GetModelsResponse {
149
+ // The models to be used during prediction for the requested optimization
150
+ // targets.
151
+ repeated PredictionModel models = 1;
152
+ // A set of model features and their values for the hosts contained in the
153
+ // request to be expected to be consulted with during prediction.
154
+ //
155
+ // It is not guaranteed that this set will contain an entry for every
156
+ // requested host.
157
+ repeated HostModelFeatures host_model_features = 2;
158
+ }
159
+ // Holds the prediction model for a particular optimization target.
160
+ message PredictionModel {
161
+ // Information about the model.
162
+ optional ModelInfo model_info = 1;
163
+ // The model to evaluate for the attached model information.
164
+ //
165
+ // This will only be set if the model that the client claims it has is stale.
166
+ // It is also guaranteed that the value populated as part of this field is one
167
+ // that the client claims to support based on the request's client model
168
+ // capabilities.
169
+ optional Model model = 2;
170
+ }
171
+ message AdditionalModelFile {
172
+ // When sent by the server, this contains the basenames of the additional
173
+ // files that should be kept and sent to this model's consumers. When used
174
+ // only locally within Chrome, the full path is given.
175
+ optional string file_path = 1;
176
+ }
177
+ // Metadata for a prediction model for a specific optimization target.
178
+ //
179
+ // Next ID: 8
180
+ message ModelInfo {
181
+ reserved 3;
182
+ // The optimization target for which the model predicts.
183
+ optional OptimizationTarget optimization_target = 1;
184
+ // The version of the model, which is specific to the optimization target.
185
+ optional int64 version = 2;
186
+ // The set of model types the requesting client can use to make predictions.
187
+ repeated ModelType supported_model_types = 4;
188
+ // The set of host model features that are referenced by the model.
189
+ //
190
+ // Note that this should only be populated if part of the response.
191
+ repeated string supported_host_model_features = 5;
192
+ // Additional files required by this model version.
193
+ //
194
+ // If populated, these files are included in the downloaded archive for this
195
+ // model and should be passed along to the consumer.
196
+ //
197
+ // This does not need to be sent to the server in the request for an update to
198
+ // this model. The server will ignore this if sent.
199
+ repeated AdditionalModelFile additional_files = 7;
200
+ // Mechanism used for model owners to attach metadata to the request or
201
+ // response.
202
+ //
203
+ // In practice, we expect this to be used as a way to negotiate capabilities.
204
+ // The client can provide the model features they can evaluate if this field
205
+ // is part of the request, and the server can provide the model features that
206
+ // are actually present in the model.
207
+ optional Any model_metadata = 6;
208
+ }
209
+ // The scenarios for which the optimization guide has models for.
210
+ enum OptimizationTarget {
211
+ OPTIMIZATION_TARGET_UNKNOWN = 0;
212
+ // Should only be applied when the page load is predicted to be painful.
213
+ OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD = 1;
214
+ // Target for supplying the language detection model via the model downloader.
215
+ OPTIMIZATION_TARGET_LANGUAGE_DETECTION = 2;
216
+ // Target for determining topics present on a page.
217
+ OPTIMIZATION_TARGET_PAGE_TOPICS = 3;
218
+ // Target for segmentation: New tab page user.
219
+ OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB = 4;
220
+ // Target for segmentation: Share user.
221
+ OPTIMIZATION_TARGET_SEGMENTATION_SHARE = 5;
222
+ // Target for segmentation: Voice user.
223
+ OPTIMIZATION_TARGET_SEGMENTATION_VOICE = 6;
224
+ // Target for model validation.
225
+ OPTIMIZATION_TARGET_MODEL_VALIDATION = 7;
226
+ // Target for determining entities present on a page.
227
+ OPTIMIZATION_TARGET_PAGE_ENTITIES = 8;
228
+ }
229
+ // The types of models that can be evaluated.
230
+ enum ModelType {
231
+ MODEL_TYPE_UNKNOWN = 0;
232
+ // A decision tree.
233
+ MODEL_TYPE_DECISION_TREE = 1;
234
+ // A model using only operations that are supported by TensorflowLite 2.3.0.
235
+ MODEL_TYPE_TFLITE_2_3_0 = 2;
236
+ // A model using only operations that are supported by TensorflowLite 2.3.0
237
+ // with updated FULLY_CONNECTED and BATCH_MUL versions for quantized models.
238
+ MODEL_TYPE_TFLITE_2_3_0_1 = 3;
239
+ }
240
+ // A set of model features and the host that it applies to.
241
+ message HostModelFeatures {
242
+ // The host that the features should be applied for.
243
+ optional string host = 1;
244
+ // The set of features and their values that apply to the host.
245
+ repeated ModelFeature model_features = 2;
246
+ }
247
+ // Information about a feature that is potentially referenced in a model.
248
+ message ModelFeature {
249
+ // The name of the feature to match if encountered in a model.
250
+ optional string feature_name = 1;
251
+ // The value of the feature to be used during prediction.
252
+ oneof feature_value {
253
+ double double_value = 2;
254
+ int64 int64_value = 3;
255
+ }
256
+ }
models_pb2.py ADDED
@@ -0,0 +1,1331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: models.proto
4
+
5
+ from google.protobuf.internal import enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from google.protobuf import reflection as _reflection
9
+ from google.protobuf import symbol_database as _symbol_database
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ import common_types_pb2 as common__types__pb2
16
+
17
+
18
+ DESCRIPTOR = _descriptor.FileDescriptor(
19
+ name='models.proto',
20
+ package='optimization_guide.proto',
21
+ syntax='proto2',
22
+ serialized_options=b'\n0org.chromium.components.optimization_guide.protoB\013ModelsProtoH\003',
23
+ create_key=_descriptor._internal_create_key,
24
+ serialized_pb=b'\n\x0cmodels.proto\x12\x18optimization_guide.proto\x1a\x12\x63ommon_types.proto\"\xe7\x01\n\x05Model\x12?\n\rdecision_tree\x18\x01 \x01(\x0b\x32&.optimization_guide.proto.DecisionTreeH\x00\x12\x36\n\x08\x65nsemble\x18\x02 \x01(\x0b\x32\".optimization_guide.proto.EnsembleH\x00\x12\x16\n\x0c\x64ownload_url\x18\x05 \x01(\tH\x00\x12\x38\n\tthreshold\x18{ \x01(\x0b\x32%.optimization_guide.proto.DoubleValueB\x07\n\x05modelJ\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"\x95\x01\n\x08\x45nsemble\x12:\n\x07members\x18\x64 \x03(\x0b\x32).optimization_guide.proto.Ensemble.Member\x1a;\n\x06Member\x12\x31\n\x08submodel\x18\x01 \x01(\x0b\x32\x1f.optimization_guide.proto.ModelJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"W\n\x0c\x44\x65\x63isionTree\x12\x31\n\x05nodes\x18\x01 \x03(\x0b\x32\".optimization_guide.proto.TreeNode\x12\x0e\n\x06weight\x18\x03 \x01(\x02J\x04\x08\x02\x10\x03\"\xb8\x02\n\x08TreeNode\x12\x35\n\x07node_id\x18\x01 \x01(\x0b\x32$.optimization_guide.proto.Int32Value\x12\x33\n\x05\x64\x65pth\x18\x02 \x01(\x0b\x32$.optimization_guide.proto.Int32Value\x12:\n\x0csubtree_size\x18\x03 \x01(\x0b\x32$.optimization_guide.proto.Int32Value\x12;\n\x0b\x62inary_node\x18\x04 \x01(\x0b\x32$.optimization_guide.proto.BinaryNodeH\x00\x12.\n\x04leaf\x18\x05 \x01(\x0b\x32\x1e.optimization_guide.proto.LeafH\x00\x42\x0b\n\tnode_typeJ\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08\"\x83\x02\n\nBinaryNode\x12;\n\rleft_child_id\x18\x01 \x01(\x0b\x32$.optimization_guide.proto.Int32Value\x12<\n\x0eright_child_id\x18\x02 \x01(\x0b\x32$.optimization_guide.proto.Int32Value\x12L\n\x1ainequality_left_child_test\x18\x04 \x01(\x0b\x32(.optimization_guide.proto.InequalityTest\" \n\tDirection\x12\x08\n\x04LEFT\x10\x00\x12\t\n\x05RIGHT\x10\x01J\x04\x08\x03\x10\x04J\x04\x08\x05\x10\x06\"8\n\x06Vector\x12.\n\x05value\x18\x01 \x03(\x0b\x32\x1f.optimization_guide.proto.Value\"D\n\x04Leaf\x12\x30\n\x06vector\x18\x01 \x01(\x0b\x32 .optimization_guide.proto.VectorJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"D\n\tFeatureId\x12\x31\n\x02id\x18\x01 \x01(\x0b\x32%.optimization_guide.proto.StringValueJ\x04\x08\x02\x10\x03\"\x92\x02\n\x0eInequalityTest\x12\x37\n\nfeature_id\x18\x01 \x01(\x0b\x32#.optimization_guide.proto.FeatureId\x12;\n\x04type\x18\x02 \x01(\x0e\x32-.optimization_guide.proto.InequalityTest.Type\x12\x32\n\tthreshold\x18\x03 \x01(\x0b\x32\x1f.optimization_guide.proto.Value\"P\n\x04Type\x12\x11\n\rLESS_OR_EQUAL\x10\x00\x12\r\n\tLESS_THAN\x10\x01\x12\x14\n\x10GREATER_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03J\x04\x08\x04\x10\x05\"s\n\x05Value\x12\x15\n\x0b\x66loat_value\x18\x01 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bint32_value\x18\x03 \x01(\x05H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x03H\x00\x42\x07\n\x05valueJ\x04\x08\x05\x10\x06\"\x1b\n\nInt32Value\x12\r\n\x05value\x18\x01 \x01(\x05\"\x1c\n\x0bStringValue\x12\r\n\x05value\x18\x01 \x01(\t\"\x1c\n\x0b\x44oubleValue\x12\r\n\x05value\x18\x01 \x01(\x01\"\xed\x01\n\x10GetModelsRequest\x12=\n\x10requested_models\x18\x01 \x03(\x0b\x32#.optimization_guide.proto.ModelInfo\x12\x41\n\x0frequest_context\x18\x03 \x01(\x0e\x32(.optimization_guide.proto.RequestContext\x12\x41\n\x13\x61\x63tive_field_trials\x18\x04 \x03(\x0b\x32$.optimization_guide.proto.FieldTrial\x12\x0e\n\x06locale\x18\x05 \x01(\tJ\x04\x08\x02\x10\x03\"\x98\x01\n\x11GetModelsResponse\x12\x39\n\x06models\x18\x01 \x03(\x0b\x32).optimization_guide.proto.PredictionModel\x12H\n\x13host_model_features\x18\x02 \x03(\x0b\x32+.optimization_guide.proto.HostModelFeatures\"z\n\x0fPredictionModel\x12\x37\n\nmodel_info\x18\x01 \x01(\x0b\x32#.optimization_guide.proto.ModelInfo\x12.\n\x05model\x18\x02 \x01(\x0b\x32\x1f.optimization_guide.proto.Model\"(\n\x13\x41\x64\x64itionalModelFile\x12\x11\n\tfile_path\x18\x01 \x01(\t\"\xd8\x02\n\tModelInfo\x12I\n\x13optimization_target\x18\x01 \x01(\x0e\x32,.optimization_guide.proto.OptimizationTarget\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x42\n\x15supported_model_types\x18\x04 \x03(\x0e\x32#.optimization_guide.proto.ModelType\x12%\n\x1dsupported_host_model_features\x18\x05 \x03(\t\x12G\n\x10\x61\x64\x64itional_files\x18\x07 \x03(\x0b\x32-.optimization_guide.proto.AdditionalModelFile\x12\x35\n\x0emodel_metadata\x18\x06 \x01(\x0b\x32\x1d.optimization_guide.proto.AnyJ\x04\x08\x03\x10\x04\"a\n\x11HostModelFeatures\x12\x0c\n\x04host\x18\x01 \x01(\t\x12>\n\x0emodel_features\x18\x02 \x03(\x0b\x32&.optimization_guide.proto.ModelFeature\"d\n\x0cModelFeature\x12\x14\n\x0c\x66\x65\x61ture_name\x18\x01 \x01(\t\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bint64_value\x18\x03 \x01(\x03H\x00\x42\x0f\n\rfeature_value*\x88\x03\n\x12OptimizationTarget\x12\x1f\n\x1bOPTIMIZATION_TARGET_UNKNOWN\x10\x00\x12)\n%OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD\x10\x01\x12*\n&OPTIMIZATION_TARGET_LANGUAGE_DETECTION\x10\x02\x12#\n\x1fOPTIMIZATION_TARGET_PAGE_TOPICS\x10\x03\x12,\n(OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB\x10\x04\x12*\n&OPTIMIZATION_TARGET_SEGMENTATION_SHARE\x10\x05\x12*\n&OPTIMIZATION_TARGET_SEGMENTATION_VOICE\x10\x06\x12(\n$OPTIMIZATION_TARGET_MODEL_VALIDATION\x10\x07\x12%\n!OPTIMIZATION_TARGET_PAGE_ENTITIES\x10\x08*}\n\tModelType\x12\x16\n\x12MODEL_TYPE_UNKNOWN\x10\x00\x12\x1c\n\x18MODEL_TYPE_DECISION_TREE\x10\x01\x12\x1b\n\x17MODEL_TYPE_TFLITE_2_3_0\x10\x02\x12\x1d\n\x19MODEL_TYPE_TFLITE_2_3_0_1\x10\x03\x42\x41\n0org.chromium.components.optimization_guide.protoB\x0bModelsProtoH\x03'
25
+ ,
26
+ dependencies=[common__types__pb2.DESCRIPTOR,])
27
+
28
+ _OPTIMIZATIONTARGET = _descriptor.EnumDescriptor(
29
+ name='OptimizationTarget',
30
+ full_name='optimization_guide.proto.OptimizationTarget',
31
+ filename=None,
32
+ file=DESCRIPTOR,
33
+ create_key=_descriptor._internal_create_key,
34
+ values=[
35
+ _descriptor.EnumValueDescriptor(
36
+ name='OPTIMIZATION_TARGET_UNKNOWN', index=0, number=0,
37
+ serialized_options=None,
38
+ type=None,
39
+ create_key=_descriptor._internal_create_key),
40
+ _descriptor.EnumValueDescriptor(
41
+ name='OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD', index=1, number=1,
42
+ serialized_options=None,
43
+ type=None,
44
+ create_key=_descriptor._internal_create_key),
45
+ _descriptor.EnumValueDescriptor(
46
+ name='OPTIMIZATION_TARGET_LANGUAGE_DETECTION', index=2, number=2,
47
+ serialized_options=None,
48
+ type=None,
49
+ create_key=_descriptor._internal_create_key),
50
+ _descriptor.EnumValueDescriptor(
51
+ name='OPTIMIZATION_TARGET_PAGE_TOPICS', index=3, number=3,
52
+ serialized_options=None,
53
+ type=None,
54
+ create_key=_descriptor._internal_create_key),
55
+ _descriptor.EnumValueDescriptor(
56
+ name='OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB', index=4, number=4,
57
+ serialized_options=None,
58
+ type=None,
59
+ create_key=_descriptor._internal_create_key),
60
+ _descriptor.EnumValueDescriptor(
61
+ name='OPTIMIZATION_TARGET_SEGMENTATION_SHARE', index=5, number=5,
62
+ serialized_options=None,
63
+ type=None,
64
+ create_key=_descriptor._internal_create_key),
65
+ _descriptor.EnumValueDescriptor(
66
+ name='OPTIMIZATION_TARGET_SEGMENTATION_VOICE', index=6, number=6,
67
+ serialized_options=None,
68
+ type=None,
69
+ create_key=_descriptor._internal_create_key),
70
+ _descriptor.EnumValueDescriptor(
71
+ name='OPTIMIZATION_TARGET_MODEL_VALIDATION', index=7, number=7,
72
+ serialized_options=None,
73
+ type=None,
74
+ create_key=_descriptor._internal_create_key),
75
+ _descriptor.EnumValueDescriptor(
76
+ name='OPTIMIZATION_TARGET_PAGE_ENTITIES', index=8, number=8,
77
+ serialized_options=None,
78
+ type=None,
79
+ create_key=_descriptor._internal_create_key),
80
+ ],
81
+ containing_type=None,
82
+ serialized_options=None,
83
+ serialized_start=2905,
84
+ serialized_end=3297,
85
+ )
86
+ _sym_db.RegisterEnumDescriptor(_OPTIMIZATIONTARGET)
87
+
88
+ OptimizationTarget = enum_type_wrapper.EnumTypeWrapper(_OPTIMIZATIONTARGET)
89
+ _MODELTYPE = _descriptor.EnumDescriptor(
90
+ name='ModelType',
91
+ full_name='optimization_guide.proto.ModelType',
92
+ filename=None,
93
+ file=DESCRIPTOR,
94
+ create_key=_descriptor._internal_create_key,
95
+ values=[
96
+ _descriptor.EnumValueDescriptor(
97
+ name='MODEL_TYPE_UNKNOWN', index=0, number=0,
98
+ serialized_options=None,
99
+ type=None,
100
+ create_key=_descriptor._internal_create_key),
101
+ _descriptor.EnumValueDescriptor(
102
+ name='MODEL_TYPE_DECISION_TREE', index=1, number=1,
103
+ serialized_options=None,
104
+ type=None,
105
+ create_key=_descriptor._internal_create_key),
106
+ _descriptor.EnumValueDescriptor(
107
+ name='MODEL_TYPE_TFLITE_2_3_0', index=2, number=2,
108
+ serialized_options=None,
109
+ type=None,
110
+ create_key=_descriptor._internal_create_key),
111
+ _descriptor.EnumValueDescriptor(
112
+ name='MODEL_TYPE_TFLITE_2_3_0_1', index=3, number=3,
113
+ serialized_options=None,
114
+ type=None,
115
+ create_key=_descriptor._internal_create_key),
116
+ ],
117
+ containing_type=None,
118
+ serialized_options=None,
119
+ serialized_start=3299,
120
+ serialized_end=3424,
121
+ )
122
+ _sym_db.RegisterEnumDescriptor(_MODELTYPE)
123
+
124
+ ModelType = enum_type_wrapper.EnumTypeWrapper(_MODELTYPE)
125
+ OPTIMIZATION_TARGET_UNKNOWN = 0
126
+ OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD = 1
127
+ OPTIMIZATION_TARGET_LANGUAGE_DETECTION = 2
128
+ OPTIMIZATION_TARGET_PAGE_TOPICS = 3
129
+ OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB = 4
130
+ OPTIMIZATION_TARGET_SEGMENTATION_SHARE = 5
131
+ OPTIMIZATION_TARGET_SEGMENTATION_VOICE = 6
132
+ OPTIMIZATION_TARGET_MODEL_VALIDATION = 7
133
+ OPTIMIZATION_TARGET_PAGE_ENTITIES = 8
134
+ MODEL_TYPE_UNKNOWN = 0
135
+ MODEL_TYPE_DECISION_TREE = 1
136
+ MODEL_TYPE_TFLITE_2_3_0 = 2
137
+ MODEL_TYPE_TFLITE_2_3_0_1 = 3
138
+
139
+
140
+ _BINARYNODE_DIRECTION = _descriptor.EnumDescriptor(
141
+ name='Direction',
142
+ full_name='optimization_guide.proto.BinaryNode.Direction',
143
+ filename=None,
144
+ file=DESCRIPTOR,
145
+ create_key=_descriptor._internal_create_key,
146
+ values=[
147
+ _descriptor.EnumValueDescriptor(
148
+ name='LEFT', index=0, number=0,
149
+ serialized_options=None,
150
+ type=None,
151
+ create_key=_descriptor._internal_create_key),
152
+ _descriptor.EnumValueDescriptor(
153
+ name='RIGHT', index=1, number=1,
154
+ serialized_options=None,
155
+ type=None,
156
+ create_key=_descriptor._internal_create_key),
157
+ ],
158
+ containing_type=None,
159
+ serialized_options=None,
160
+ serialized_start=1068,
161
+ serialized_end=1100,
162
+ )
163
+ _sym_db.RegisterEnumDescriptor(_BINARYNODE_DIRECTION)
164
+
165
+ _INEQUALITYTEST_TYPE = _descriptor.EnumDescriptor(
166
+ name='Type',
167
+ full_name='optimization_guide.proto.InequalityTest.Type',
168
+ filename=None,
169
+ file=DESCRIPTOR,
170
+ create_key=_descriptor._internal_create_key,
171
+ values=[
172
+ _descriptor.EnumValueDescriptor(
173
+ name='LESS_OR_EQUAL', index=0, number=0,
174
+ serialized_options=None,
175
+ type=None,
176
+ create_key=_descriptor._internal_create_key),
177
+ _descriptor.EnumValueDescriptor(
178
+ name='LESS_THAN', index=1, number=1,
179
+ serialized_options=None,
180
+ type=None,
181
+ create_key=_descriptor._internal_create_key),
182
+ _descriptor.EnumValueDescriptor(
183
+ name='GREATER_OR_EQUAL', index=2, number=2,
184
+ serialized_options=None,
185
+ type=None,
186
+ create_key=_descriptor._internal_create_key),
187
+ _descriptor.EnumValueDescriptor(
188
+ name='GREATER_THAN', index=3, number=3,
189
+ serialized_options=None,
190
+ type=None,
191
+ create_key=_descriptor._internal_create_key),
192
+ ],
193
+ containing_type=None,
194
+ serialized_options=None,
195
+ serialized_start=1501,
196
+ serialized_end=1581,
197
+ )
198
+ _sym_db.RegisterEnumDescriptor(_INEQUALITYTEST_TYPE)
199
+
200
+
201
+ _MODEL = _descriptor.Descriptor(
202
+ name='Model',
203
+ full_name='optimization_guide.proto.Model',
204
+ filename=None,
205
+ file=DESCRIPTOR,
206
+ containing_type=None,
207
+ create_key=_descriptor._internal_create_key,
208
+ fields=[
209
+ _descriptor.FieldDescriptor(
210
+ name='decision_tree', full_name='optimization_guide.proto.Model.decision_tree', index=0,
211
+ number=1, type=11, cpp_type=10, label=1,
212
+ has_default_value=False, default_value=None,
213
+ message_type=None, enum_type=None, containing_type=None,
214
+ is_extension=False, extension_scope=None,
215
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
216
+ _descriptor.FieldDescriptor(
217
+ name='ensemble', full_name='optimization_guide.proto.Model.ensemble', index=1,
218
+ number=2, type=11, cpp_type=10, label=1,
219
+ has_default_value=False, default_value=None,
220
+ message_type=None, enum_type=None, containing_type=None,
221
+ is_extension=False, extension_scope=None,
222
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
223
+ _descriptor.FieldDescriptor(
224
+ name='download_url', full_name='optimization_guide.proto.Model.download_url', index=2,
225
+ number=5, type=9, cpp_type=9, label=1,
226
+ has_default_value=False, default_value=b"".decode('utf-8'),
227
+ message_type=None, enum_type=None, containing_type=None,
228
+ is_extension=False, extension_scope=None,
229
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
230
+ _descriptor.FieldDescriptor(
231
+ name='threshold', full_name='optimization_guide.proto.Model.threshold', index=3,
232
+ number=123, type=11, cpp_type=10, label=1,
233
+ has_default_value=False, default_value=None,
234
+ message_type=None, enum_type=None, containing_type=None,
235
+ is_extension=False, extension_scope=None,
236
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
237
+ ],
238
+ extensions=[
239
+ ],
240
+ nested_types=[],
241
+ enum_types=[
242
+ ],
243
+ serialized_options=None,
244
+ is_extendable=False,
245
+ syntax='proto2',
246
+ extension_ranges=[],
247
+ oneofs=[
248
+ _descriptor.OneofDescriptor(
249
+ name='model', full_name='optimization_guide.proto.Model.model',
250
+ index=0, containing_type=None,
251
+ create_key=_descriptor._internal_create_key,
252
+ fields=[]),
253
+ ],
254
+ serialized_start=63,
255
+ serialized_end=294,
256
+ )
257
+
258
+
259
+ _ENSEMBLE_MEMBER = _descriptor.Descriptor(
260
+ name='Member',
261
+ full_name='optimization_guide.proto.Ensemble.Member',
262
+ filename=None,
263
+ file=DESCRIPTOR,
264
+ containing_type=None,
265
+ create_key=_descriptor._internal_create_key,
266
+ fields=[
267
+ _descriptor.FieldDescriptor(
268
+ name='submodel', full_name='optimization_guide.proto.Ensemble.Member.submodel', index=0,
269
+ number=1, type=11, cpp_type=10, label=1,
270
+ has_default_value=False, default_value=None,
271
+ message_type=None, enum_type=None, containing_type=None,
272
+ is_extension=False, extension_scope=None,
273
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
274
+ ],
275
+ extensions=[
276
+ ],
277
+ nested_types=[],
278
+ enum_types=[
279
+ ],
280
+ serialized_options=None,
281
+ is_extendable=False,
282
+ syntax='proto2',
283
+ extension_ranges=[],
284
+ oneofs=[
285
+ ],
286
+ serialized_start=369,
287
+ serialized_end=428,
288
+ )
289
+
290
+ _ENSEMBLE = _descriptor.Descriptor(
291
+ name='Ensemble',
292
+ full_name='optimization_guide.proto.Ensemble',
293
+ filename=None,
294
+ file=DESCRIPTOR,
295
+ containing_type=None,
296
+ create_key=_descriptor._internal_create_key,
297
+ fields=[
298
+ _descriptor.FieldDescriptor(
299
+ name='members', full_name='optimization_guide.proto.Ensemble.members', index=0,
300
+ number=100, type=11, cpp_type=10, label=3,
301
+ has_default_value=False, default_value=[],
302
+ message_type=None, enum_type=None, containing_type=None,
303
+ is_extension=False, extension_scope=None,
304
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
305
+ ],
306
+ extensions=[
307
+ ],
308
+ nested_types=[_ENSEMBLE_MEMBER, ],
309
+ enum_types=[
310
+ ],
311
+ serialized_options=None,
312
+ is_extendable=False,
313
+ syntax='proto2',
314
+ extension_ranges=[],
315
+ oneofs=[
316
+ ],
317
+ serialized_start=297,
318
+ serialized_end=446,
319
+ )
320
+
321
+
322
+ _DECISIONTREE = _descriptor.Descriptor(
323
+ name='DecisionTree',
324
+ full_name='optimization_guide.proto.DecisionTree',
325
+ filename=None,
326
+ file=DESCRIPTOR,
327
+ containing_type=None,
328
+ create_key=_descriptor._internal_create_key,
329
+ fields=[
330
+ _descriptor.FieldDescriptor(
331
+ name='nodes', full_name='optimization_guide.proto.DecisionTree.nodes', index=0,
332
+ number=1, type=11, cpp_type=10, label=3,
333
+ has_default_value=False, default_value=[],
334
+ message_type=None, enum_type=None, containing_type=None,
335
+ is_extension=False, extension_scope=None,
336
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
337
+ _descriptor.FieldDescriptor(
338
+ name='weight', full_name='optimization_guide.proto.DecisionTree.weight', index=1,
339
+ number=3, type=2, cpp_type=6, label=1,
340
+ has_default_value=False, default_value=float(0),
341
+ message_type=None, enum_type=None, containing_type=None,
342
+ is_extension=False, extension_scope=None,
343
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
344
+ ],
345
+ extensions=[
346
+ ],
347
+ nested_types=[],
348
+ enum_types=[
349
+ ],
350
+ serialized_options=None,
351
+ is_extendable=False,
352
+ syntax='proto2',
353
+ extension_ranges=[],
354
+ oneofs=[
355
+ ],
356
+ serialized_start=448,
357
+ serialized_end=535,
358
+ )
359
+
360
+
361
+ _TREENODE = _descriptor.Descriptor(
362
+ name='TreeNode',
363
+ full_name='optimization_guide.proto.TreeNode',
364
+ filename=None,
365
+ file=DESCRIPTOR,
366
+ containing_type=None,
367
+ create_key=_descriptor._internal_create_key,
368
+ fields=[
369
+ _descriptor.FieldDescriptor(
370
+ name='node_id', full_name='optimization_guide.proto.TreeNode.node_id', index=0,
371
+ number=1, type=11, cpp_type=10, label=1,
372
+ has_default_value=False, default_value=None,
373
+ message_type=None, enum_type=None, containing_type=None,
374
+ is_extension=False, extension_scope=None,
375
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
376
+ _descriptor.FieldDescriptor(
377
+ name='depth', full_name='optimization_guide.proto.TreeNode.depth', index=1,
378
+ number=2, type=11, cpp_type=10, label=1,
379
+ has_default_value=False, default_value=None,
380
+ message_type=None, enum_type=None, containing_type=None,
381
+ is_extension=False, extension_scope=None,
382
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
383
+ _descriptor.FieldDescriptor(
384
+ name='subtree_size', full_name='optimization_guide.proto.TreeNode.subtree_size', index=2,
385
+ number=3, type=11, cpp_type=10, label=1,
386
+ has_default_value=False, default_value=None,
387
+ message_type=None, enum_type=None, containing_type=None,
388
+ is_extension=False, extension_scope=None,
389
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
390
+ _descriptor.FieldDescriptor(
391
+ name='binary_node', full_name='optimization_guide.proto.TreeNode.binary_node', index=3,
392
+ number=4, type=11, cpp_type=10, label=1,
393
+ has_default_value=False, default_value=None,
394
+ message_type=None, enum_type=None, containing_type=None,
395
+ is_extension=False, extension_scope=None,
396
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
397
+ _descriptor.FieldDescriptor(
398
+ name='leaf', full_name='optimization_guide.proto.TreeNode.leaf', index=4,
399
+ number=5, type=11, cpp_type=10, label=1,
400
+ has_default_value=False, default_value=None,
401
+ message_type=None, enum_type=None, containing_type=None,
402
+ is_extension=False, extension_scope=None,
403
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
404
+ ],
405
+ extensions=[
406
+ ],
407
+ nested_types=[],
408
+ enum_types=[
409
+ ],
410
+ serialized_options=None,
411
+ is_extendable=False,
412
+ syntax='proto2',
413
+ extension_ranges=[],
414
+ oneofs=[
415
+ _descriptor.OneofDescriptor(
416
+ name='node_type', full_name='optimization_guide.proto.TreeNode.node_type',
417
+ index=0, containing_type=None,
418
+ create_key=_descriptor._internal_create_key,
419
+ fields=[]),
420
+ ],
421
+ serialized_start=538,
422
+ serialized_end=850,
423
+ )
424
+
425
+
426
+ _BINARYNODE = _descriptor.Descriptor(
427
+ name='BinaryNode',
428
+ full_name='optimization_guide.proto.BinaryNode',
429
+ filename=None,
430
+ file=DESCRIPTOR,
431
+ containing_type=None,
432
+ create_key=_descriptor._internal_create_key,
433
+ fields=[
434
+ _descriptor.FieldDescriptor(
435
+ name='left_child_id', full_name='optimization_guide.proto.BinaryNode.left_child_id', index=0,
436
+ number=1, type=11, cpp_type=10, label=1,
437
+ has_default_value=False, default_value=None,
438
+ message_type=None, enum_type=None, containing_type=None,
439
+ is_extension=False, extension_scope=None,
440
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
441
+ _descriptor.FieldDescriptor(
442
+ name='right_child_id', full_name='optimization_guide.proto.BinaryNode.right_child_id', index=1,
443
+ number=2, type=11, cpp_type=10, label=1,
444
+ has_default_value=False, default_value=None,
445
+ message_type=None, enum_type=None, containing_type=None,
446
+ is_extension=False, extension_scope=None,
447
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
448
+ _descriptor.FieldDescriptor(
449
+ name='inequality_left_child_test', full_name='optimization_guide.proto.BinaryNode.inequality_left_child_test', index=2,
450
+ number=4, type=11, cpp_type=10, label=1,
451
+ has_default_value=False, default_value=None,
452
+ message_type=None, enum_type=None, containing_type=None,
453
+ is_extension=False, extension_scope=None,
454
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
455
+ ],
456
+ extensions=[
457
+ ],
458
+ nested_types=[],
459
+ enum_types=[
460
+ _BINARYNODE_DIRECTION,
461
+ ],
462
+ serialized_options=None,
463
+ is_extendable=False,
464
+ syntax='proto2',
465
+ extension_ranges=[],
466
+ oneofs=[
467
+ ],
468
+ serialized_start=853,
469
+ serialized_end=1112,
470
+ )
471
+
472
+
473
+ _VECTOR = _descriptor.Descriptor(
474
+ name='Vector',
475
+ full_name='optimization_guide.proto.Vector',
476
+ filename=None,
477
+ file=DESCRIPTOR,
478
+ containing_type=None,
479
+ create_key=_descriptor._internal_create_key,
480
+ fields=[
481
+ _descriptor.FieldDescriptor(
482
+ name='value', full_name='optimization_guide.proto.Vector.value', index=0,
483
+ number=1, type=11, cpp_type=10, label=3,
484
+ has_default_value=False, default_value=[],
485
+ message_type=None, enum_type=None, containing_type=None,
486
+ is_extension=False, extension_scope=None,
487
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
488
+ ],
489
+ extensions=[
490
+ ],
491
+ nested_types=[],
492
+ enum_types=[
493
+ ],
494
+ serialized_options=None,
495
+ is_extendable=False,
496
+ syntax='proto2',
497
+ extension_ranges=[],
498
+ oneofs=[
499
+ ],
500
+ serialized_start=1114,
501
+ serialized_end=1170,
502
+ )
503
+
504
+
505
+ _LEAF = _descriptor.Descriptor(
506
+ name='Leaf',
507
+ full_name='optimization_guide.proto.Leaf',
508
+ filename=None,
509
+ file=DESCRIPTOR,
510
+ containing_type=None,
511
+ create_key=_descriptor._internal_create_key,
512
+ fields=[
513
+ _descriptor.FieldDescriptor(
514
+ name='vector', full_name='optimization_guide.proto.Leaf.vector', index=0,
515
+ number=1, type=11, cpp_type=10, label=1,
516
+ has_default_value=False, default_value=None,
517
+ message_type=None, enum_type=None, containing_type=None,
518
+ is_extension=False, extension_scope=None,
519
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
520
+ ],
521
+ extensions=[
522
+ ],
523
+ nested_types=[],
524
+ enum_types=[
525
+ ],
526
+ serialized_options=None,
527
+ is_extendable=False,
528
+ syntax='proto2',
529
+ extension_ranges=[],
530
+ oneofs=[
531
+ ],
532
+ serialized_start=1172,
533
+ serialized_end=1240,
534
+ )
535
+
536
+
537
+ _FEATUREID = _descriptor.Descriptor(
538
+ name='FeatureId',
539
+ full_name='optimization_guide.proto.FeatureId',
540
+ filename=None,
541
+ file=DESCRIPTOR,
542
+ containing_type=None,
543
+ create_key=_descriptor._internal_create_key,
544
+ fields=[
545
+ _descriptor.FieldDescriptor(
546
+ name='id', full_name='optimization_guide.proto.FeatureId.id', index=0,
547
+ number=1, type=11, cpp_type=10, label=1,
548
+ has_default_value=False, default_value=None,
549
+ message_type=None, enum_type=None, containing_type=None,
550
+ is_extension=False, extension_scope=None,
551
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
552
+ ],
553
+ extensions=[
554
+ ],
555
+ nested_types=[],
556
+ enum_types=[
557
+ ],
558
+ serialized_options=None,
559
+ is_extendable=False,
560
+ syntax='proto2',
561
+ extension_ranges=[],
562
+ oneofs=[
563
+ ],
564
+ serialized_start=1242,
565
+ serialized_end=1310,
566
+ )
567
+
568
+
569
+ _INEQUALITYTEST = _descriptor.Descriptor(
570
+ name='InequalityTest',
571
+ full_name='optimization_guide.proto.InequalityTest',
572
+ filename=None,
573
+ file=DESCRIPTOR,
574
+ containing_type=None,
575
+ create_key=_descriptor._internal_create_key,
576
+ fields=[
577
+ _descriptor.FieldDescriptor(
578
+ name='feature_id', full_name='optimization_guide.proto.InequalityTest.feature_id', index=0,
579
+ number=1, type=11, cpp_type=10, label=1,
580
+ has_default_value=False, default_value=None,
581
+ message_type=None, enum_type=None, containing_type=None,
582
+ is_extension=False, extension_scope=None,
583
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
584
+ _descriptor.FieldDescriptor(
585
+ name='type', full_name='optimization_guide.proto.InequalityTest.type', index=1,
586
+ number=2, type=14, cpp_type=8, label=1,
587
+ has_default_value=False, default_value=0,
588
+ message_type=None, enum_type=None, containing_type=None,
589
+ is_extension=False, extension_scope=None,
590
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
591
+ _descriptor.FieldDescriptor(
592
+ name='threshold', full_name='optimization_guide.proto.InequalityTest.threshold', index=2,
593
+ number=3, type=11, cpp_type=10, label=1,
594
+ has_default_value=False, default_value=None,
595
+ message_type=None, enum_type=None, containing_type=None,
596
+ is_extension=False, extension_scope=None,
597
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
598
+ ],
599
+ extensions=[
600
+ ],
601
+ nested_types=[],
602
+ enum_types=[
603
+ _INEQUALITYTEST_TYPE,
604
+ ],
605
+ serialized_options=None,
606
+ is_extendable=False,
607
+ syntax='proto2',
608
+ extension_ranges=[],
609
+ oneofs=[
610
+ ],
611
+ serialized_start=1313,
612
+ serialized_end=1587,
613
+ )
614
+
615
+
616
+ _VALUE = _descriptor.Descriptor(
617
+ name='Value',
618
+ full_name='optimization_guide.proto.Value',
619
+ filename=None,
620
+ file=DESCRIPTOR,
621
+ containing_type=None,
622
+ create_key=_descriptor._internal_create_key,
623
+ fields=[
624
+ _descriptor.FieldDescriptor(
625
+ name='float_value', full_name='optimization_guide.proto.Value.float_value', index=0,
626
+ number=1, type=2, cpp_type=6, label=1,
627
+ has_default_value=False, default_value=float(0),
628
+ message_type=None, enum_type=None, containing_type=None,
629
+ is_extension=False, extension_scope=None,
630
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
631
+ _descriptor.FieldDescriptor(
632
+ name='double_value', full_name='optimization_guide.proto.Value.double_value', index=1,
633
+ number=2, type=1, cpp_type=5, label=1,
634
+ has_default_value=False, default_value=float(0),
635
+ message_type=None, enum_type=None, containing_type=None,
636
+ is_extension=False, extension_scope=None,
637
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
638
+ _descriptor.FieldDescriptor(
639
+ name='int32_value', full_name='optimization_guide.proto.Value.int32_value', index=2,
640
+ number=3, type=5, cpp_type=1, label=1,
641
+ has_default_value=False, default_value=0,
642
+ message_type=None, enum_type=None, containing_type=None,
643
+ is_extension=False, extension_scope=None,
644
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
645
+ _descriptor.FieldDescriptor(
646
+ name='int64_value', full_name='optimization_guide.proto.Value.int64_value', index=3,
647
+ number=4, type=3, cpp_type=2, label=1,
648
+ has_default_value=False, default_value=0,
649
+ message_type=None, enum_type=None, containing_type=None,
650
+ is_extension=False, extension_scope=None,
651
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
652
+ ],
653
+ extensions=[
654
+ ],
655
+ nested_types=[],
656
+ enum_types=[
657
+ ],
658
+ serialized_options=None,
659
+ is_extendable=False,
660
+ syntax='proto2',
661
+ extension_ranges=[],
662
+ oneofs=[
663
+ _descriptor.OneofDescriptor(
664
+ name='value', full_name='optimization_guide.proto.Value.value',
665
+ index=0, containing_type=None,
666
+ create_key=_descriptor._internal_create_key,
667
+ fields=[]),
668
+ ],
669
+ serialized_start=1589,
670
+ serialized_end=1704,
671
+ )
672
+
673
+
674
+ _INT32VALUE = _descriptor.Descriptor(
675
+ name='Int32Value',
676
+ full_name='optimization_guide.proto.Int32Value',
677
+ filename=None,
678
+ file=DESCRIPTOR,
679
+ containing_type=None,
680
+ create_key=_descriptor._internal_create_key,
681
+ fields=[
682
+ _descriptor.FieldDescriptor(
683
+ name='value', full_name='optimization_guide.proto.Int32Value.value', index=0,
684
+ number=1, type=5, cpp_type=1, label=1,
685
+ has_default_value=False, default_value=0,
686
+ message_type=None, enum_type=None, containing_type=None,
687
+ is_extension=False, extension_scope=None,
688
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
689
+ ],
690
+ extensions=[
691
+ ],
692
+ nested_types=[],
693
+ enum_types=[
694
+ ],
695
+ serialized_options=None,
696
+ is_extendable=False,
697
+ syntax='proto2',
698
+ extension_ranges=[],
699
+ oneofs=[
700
+ ],
701
+ serialized_start=1706,
702
+ serialized_end=1733,
703
+ )
704
+
705
+
706
+ _STRINGVALUE = _descriptor.Descriptor(
707
+ name='StringValue',
708
+ full_name='optimization_guide.proto.StringValue',
709
+ filename=None,
710
+ file=DESCRIPTOR,
711
+ containing_type=None,
712
+ create_key=_descriptor._internal_create_key,
713
+ fields=[
714
+ _descriptor.FieldDescriptor(
715
+ name='value', full_name='optimization_guide.proto.StringValue.value', index=0,
716
+ number=1, type=9, cpp_type=9, label=1,
717
+ has_default_value=False, default_value=b"".decode('utf-8'),
718
+ message_type=None, enum_type=None, containing_type=None,
719
+ is_extension=False, extension_scope=None,
720
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
721
+ ],
722
+ extensions=[
723
+ ],
724
+ nested_types=[],
725
+ enum_types=[
726
+ ],
727
+ serialized_options=None,
728
+ is_extendable=False,
729
+ syntax='proto2',
730
+ extension_ranges=[],
731
+ oneofs=[
732
+ ],
733
+ serialized_start=1735,
734
+ serialized_end=1763,
735
+ )
736
+
737
+
738
+ _DOUBLEVALUE = _descriptor.Descriptor(
739
+ name='DoubleValue',
740
+ full_name='optimization_guide.proto.DoubleValue',
741
+ filename=None,
742
+ file=DESCRIPTOR,
743
+ containing_type=None,
744
+ create_key=_descriptor._internal_create_key,
745
+ fields=[
746
+ _descriptor.FieldDescriptor(
747
+ name='value', full_name='optimization_guide.proto.DoubleValue.value', index=0,
748
+ number=1, type=1, cpp_type=5, label=1,
749
+ has_default_value=False, default_value=float(0),
750
+ message_type=None, enum_type=None, containing_type=None,
751
+ is_extension=False, extension_scope=None,
752
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
753
+ ],
754
+ extensions=[
755
+ ],
756
+ nested_types=[],
757
+ enum_types=[
758
+ ],
759
+ serialized_options=None,
760
+ is_extendable=False,
761
+ syntax='proto2',
762
+ extension_ranges=[],
763
+ oneofs=[
764
+ ],
765
+ serialized_start=1765,
766
+ serialized_end=1793,
767
+ )
768
+
769
+
770
+ _GETMODELSREQUEST = _descriptor.Descriptor(
771
+ name='GetModelsRequest',
772
+ full_name='optimization_guide.proto.GetModelsRequest',
773
+ filename=None,
774
+ file=DESCRIPTOR,
775
+ containing_type=None,
776
+ create_key=_descriptor._internal_create_key,
777
+ fields=[
778
+ _descriptor.FieldDescriptor(
779
+ name='requested_models', full_name='optimization_guide.proto.GetModelsRequest.requested_models', index=0,
780
+ number=1, type=11, cpp_type=10, label=3,
781
+ has_default_value=False, default_value=[],
782
+ message_type=None, enum_type=None, containing_type=None,
783
+ is_extension=False, extension_scope=None,
784
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
785
+ _descriptor.FieldDescriptor(
786
+ name='request_context', full_name='optimization_guide.proto.GetModelsRequest.request_context', index=1,
787
+ number=3, type=14, cpp_type=8, label=1,
788
+ has_default_value=False, default_value=0,
789
+ message_type=None, enum_type=None, containing_type=None,
790
+ is_extension=False, extension_scope=None,
791
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
792
+ _descriptor.FieldDescriptor(
793
+ name='active_field_trials', full_name='optimization_guide.proto.GetModelsRequest.active_field_trials', index=2,
794
+ number=4, type=11, cpp_type=10, label=3,
795
+ has_default_value=False, default_value=[],
796
+ message_type=None, enum_type=None, containing_type=None,
797
+ is_extension=False, extension_scope=None,
798
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
799
+ _descriptor.FieldDescriptor(
800
+ name='locale', full_name='optimization_guide.proto.GetModelsRequest.locale', index=3,
801
+ number=5, type=9, cpp_type=9, label=1,
802
+ has_default_value=False, default_value=b"".decode('utf-8'),
803
+ message_type=None, enum_type=None, containing_type=None,
804
+ is_extension=False, extension_scope=None,
805
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
806
+ ],
807
+ extensions=[
808
+ ],
809
+ nested_types=[],
810
+ enum_types=[
811
+ ],
812
+ serialized_options=None,
813
+ is_extendable=False,
814
+ syntax='proto2',
815
+ extension_ranges=[],
816
+ oneofs=[
817
+ ],
818
+ serialized_start=1796,
819
+ serialized_end=2033,
820
+ )
821
+
822
+
823
+ _GETMODELSRESPONSE = _descriptor.Descriptor(
824
+ name='GetModelsResponse',
825
+ full_name='optimization_guide.proto.GetModelsResponse',
826
+ filename=None,
827
+ file=DESCRIPTOR,
828
+ containing_type=None,
829
+ create_key=_descriptor._internal_create_key,
830
+ fields=[
831
+ _descriptor.FieldDescriptor(
832
+ name='models', full_name='optimization_guide.proto.GetModelsResponse.models', index=0,
833
+ number=1, type=11, cpp_type=10, label=3,
834
+ has_default_value=False, default_value=[],
835
+ message_type=None, enum_type=None, containing_type=None,
836
+ is_extension=False, extension_scope=None,
837
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
838
+ _descriptor.FieldDescriptor(
839
+ name='host_model_features', full_name='optimization_guide.proto.GetModelsResponse.host_model_features', index=1,
840
+ number=2, type=11, cpp_type=10, label=3,
841
+ has_default_value=False, default_value=[],
842
+ message_type=None, enum_type=None, containing_type=None,
843
+ is_extension=False, extension_scope=None,
844
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
845
+ ],
846
+ extensions=[
847
+ ],
848
+ nested_types=[],
849
+ enum_types=[
850
+ ],
851
+ serialized_options=None,
852
+ is_extendable=False,
853
+ syntax='proto2',
854
+ extension_ranges=[],
855
+ oneofs=[
856
+ ],
857
+ serialized_start=2036,
858
+ serialized_end=2188,
859
+ )
860
+
861
+
862
+ _PREDICTIONMODEL = _descriptor.Descriptor(
863
+ name='PredictionModel',
864
+ full_name='optimization_guide.proto.PredictionModel',
865
+ filename=None,
866
+ file=DESCRIPTOR,
867
+ containing_type=None,
868
+ create_key=_descriptor._internal_create_key,
869
+ fields=[
870
+ _descriptor.FieldDescriptor(
871
+ name='model_info', full_name='optimization_guide.proto.PredictionModel.model_info', index=0,
872
+ number=1, type=11, cpp_type=10, label=1,
873
+ has_default_value=False, default_value=None,
874
+ message_type=None, enum_type=None, containing_type=None,
875
+ is_extension=False, extension_scope=None,
876
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
877
+ _descriptor.FieldDescriptor(
878
+ name='model', full_name='optimization_guide.proto.PredictionModel.model', index=1,
879
+ number=2, type=11, cpp_type=10, label=1,
880
+ has_default_value=False, default_value=None,
881
+ message_type=None, enum_type=None, containing_type=None,
882
+ is_extension=False, extension_scope=None,
883
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
884
+ ],
885
+ extensions=[
886
+ ],
887
+ nested_types=[],
888
+ enum_types=[
889
+ ],
890
+ serialized_options=None,
891
+ is_extendable=False,
892
+ syntax='proto2',
893
+ extension_ranges=[],
894
+ oneofs=[
895
+ ],
896
+ serialized_start=2190,
897
+ serialized_end=2312,
898
+ )
899
+
900
+
901
+ _ADDITIONALMODELFILE = _descriptor.Descriptor(
902
+ name='AdditionalModelFile',
903
+ full_name='optimization_guide.proto.AdditionalModelFile',
904
+ filename=None,
905
+ file=DESCRIPTOR,
906
+ containing_type=None,
907
+ create_key=_descriptor._internal_create_key,
908
+ fields=[
909
+ _descriptor.FieldDescriptor(
910
+ name='file_path', full_name='optimization_guide.proto.AdditionalModelFile.file_path', index=0,
911
+ number=1, type=9, cpp_type=9, label=1,
912
+ has_default_value=False, default_value=b"".decode('utf-8'),
913
+ message_type=None, enum_type=None, containing_type=None,
914
+ is_extension=False, extension_scope=None,
915
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
916
+ ],
917
+ extensions=[
918
+ ],
919
+ nested_types=[],
920
+ enum_types=[
921
+ ],
922
+ serialized_options=None,
923
+ is_extendable=False,
924
+ syntax='proto2',
925
+ extension_ranges=[],
926
+ oneofs=[
927
+ ],
928
+ serialized_start=2314,
929
+ serialized_end=2354,
930
+ )
931
+
932
+
933
+ _MODELINFO = _descriptor.Descriptor(
934
+ name='ModelInfo',
935
+ full_name='optimization_guide.proto.ModelInfo',
936
+ filename=None,
937
+ file=DESCRIPTOR,
938
+ containing_type=None,
939
+ create_key=_descriptor._internal_create_key,
940
+ fields=[
941
+ _descriptor.FieldDescriptor(
942
+ name='optimization_target', full_name='optimization_guide.proto.ModelInfo.optimization_target', index=0,
943
+ number=1, type=14, cpp_type=8, label=1,
944
+ has_default_value=False, default_value=0,
945
+ message_type=None, enum_type=None, containing_type=None,
946
+ is_extension=False, extension_scope=None,
947
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
948
+ _descriptor.FieldDescriptor(
949
+ name='version', full_name='optimization_guide.proto.ModelInfo.version', index=1,
950
+ number=2, type=3, cpp_type=2, label=1,
951
+ has_default_value=False, default_value=0,
952
+ message_type=None, enum_type=None, containing_type=None,
953
+ is_extension=False, extension_scope=None,
954
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
955
+ _descriptor.FieldDescriptor(
956
+ name='supported_model_types', full_name='optimization_guide.proto.ModelInfo.supported_model_types', index=2,
957
+ number=4, type=14, cpp_type=8, label=3,
958
+ has_default_value=False, default_value=[],
959
+ message_type=None, enum_type=None, containing_type=None,
960
+ is_extension=False, extension_scope=None,
961
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
962
+ _descriptor.FieldDescriptor(
963
+ name='supported_host_model_features', full_name='optimization_guide.proto.ModelInfo.supported_host_model_features', index=3,
964
+ number=5, type=9, cpp_type=9, label=3,
965
+ has_default_value=False, default_value=[],
966
+ message_type=None, enum_type=None, containing_type=None,
967
+ is_extension=False, extension_scope=None,
968
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
969
+ _descriptor.FieldDescriptor(
970
+ name='additional_files', full_name='optimization_guide.proto.ModelInfo.additional_files', index=4,
971
+ number=7, type=11, cpp_type=10, label=3,
972
+ has_default_value=False, default_value=[],
973
+ message_type=None, enum_type=None, containing_type=None,
974
+ is_extension=False, extension_scope=None,
975
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
976
+ _descriptor.FieldDescriptor(
977
+ name='model_metadata', full_name='optimization_guide.proto.ModelInfo.model_metadata', index=5,
978
+ number=6, type=11, cpp_type=10, label=1,
979
+ has_default_value=False, default_value=None,
980
+ message_type=None, enum_type=None, containing_type=None,
981
+ is_extension=False, extension_scope=None,
982
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
983
+ ],
984
+ extensions=[
985
+ ],
986
+ nested_types=[],
987
+ enum_types=[
988
+ ],
989
+ serialized_options=None,
990
+ is_extendable=False,
991
+ syntax='proto2',
992
+ extension_ranges=[],
993
+ oneofs=[
994
+ ],
995
+ serialized_start=2357,
996
+ serialized_end=2701,
997
+ )
998
+
999
+
1000
+ _HOSTMODELFEATURES = _descriptor.Descriptor(
1001
+ name='HostModelFeatures',
1002
+ full_name='optimization_guide.proto.HostModelFeatures',
1003
+ filename=None,
1004
+ file=DESCRIPTOR,
1005
+ containing_type=None,
1006
+ create_key=_descriptor._internal_create_key,
1007
+ fields=[
1008
+ _descriptor.FieldDescriptor(
1009
+ name='host', full_name='optimization_guide.proto.HostModelFeatures.host', index=0,
1010
+ number=1, type=9, cpp_type=9, label=1,
1011
+ has_default_value=False, default_value=b"".decode('utf-8'),
1012
+ message_type=None, enum_type=None, containing_type=None,
1013
+ is_extension=False, extension_scope=None,
1014
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
1015
+ _descriptor.FieldDescriptor(
1016
+ name='model_features', full_name='optimization_guide.proto.HostModelFeatures.model_features', index=1,
1017
+ number=2, type=11, cpp_type=10, label=3,
1018
+ has_default_value=False, default_value=[],
1019
+ message_type=None, enum_type=None, containing_type=None,
1020
+ is_extension=False, extension_scope=None,
1021
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
1022
+ ],
1023
+ extensions=[
1024
+ ],
1025
+ nested_types=[],
1026
+ enum_types=[
1027
+ ],
1028
+ serialized_options=None,
1029
+ is_extendable=False,
1030
+ syntax='proto2',
1031
+ extension_ranges=[],
1032
+ oneofs=[
1033
+ ],
1034
+ serialized_start=2703,
1035
+ serialized_end=2800,
1036
+ )
1037
+
1038
+
1039
+ _MODELFEATURE = _descriptor.Descriptor(
1040
+ name='ModelFeature',
1041
+ full_name='optimization_guide.proto.ModelFeature',
1042
+ filename=None,
1043
+ file=DESCRIPTOR,
1044
+ containing_type=None,
1045
+ create_key=_descriptor._internal_create_key,
1046
+ fields=[
1047
+ _descriptor.FieldDescriptor(
1048
+ name='feature_name', full_name='optimization_guide.proto.ModelFeature.feature_name', index=0,
1049
+ number=1, type=9, cpp_type=9, label=1,
1050
+ has_default_value=False, default_value=b"".decode('utf-8'),
1051
+ message_type=None, enum_type=None, containing_type=None,
1052
+ is_extension=False, extension_scope=None,
1053
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
1054
+ _descriptor.FieldDescriptor(
1055
+ name='double_value', full_name='optimization_guide.proto.ModelFeature.double_value', index=1,
1056
+ number=2, type=1, cpp_type=5, label=1,
1057
+ has_default_value=False, default_value=float(0),
1058
+ message_type=None, enum_type=None, containing_type=None,
1059
+ is_extension=False, extension_scope=None,
1060
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
1061
+ _descriptor.FieldDescriptor(
1062
+ name='int64_value', full_name='optimization_guide.proto.ModelFeature.int64_value', index=2,
1063
+ number=3, type=3, cpp_type=2, label=1,
1064
+ has_default_value=False, default_value=0,
1065
+ message_type=None, enum_type=None, containing_type=None,
1066
+ is_extension=False, extension_scope=None,
1067
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
1068
+ ],
1069
+ extensions=[
1070
+ ],
1071
+ nested_types=[],
1072
+ enum_types=[
1073
+ ],
1074
+ serialized_options=None,
1075
+ is_extendable=False,
1076
+ syntax='proto2',
1077
+ extension_ranges=[],
1078
+ oneofs=[
1079
+ _descriptor.OneofDescriptor(
1080
+ name='feature_value', full_name='optimization_guide.proto.ModelFeature.feature_value',
1081
+ index=0, containing_type=None,
1082
+ create_key=_descriptor._internal_create_key,
1083
+ fields=[]),
1084
+ ],
1085
+ serialized_start=2802,
1086
+ serialized_end=2902,
1087
+ )
1088
+
1089
+ _MODEL.fields_by_name['decision_tree'].message_type = _DECISIONTREE
1090
+ _MODEL.fields_by_name['ensemble'].message_type = _ENSEMBLE
1091
+ _MODEL.fields_by_name['threshold'].message_type = _DOUBLEVALUE
1092
+ _MODEL.oneofs_by_name['model'].fields.append(
1093
+ _MODEL.fields_by_name['decision_tree'])
1094
+ _MODEL.fields_by_name['decision_tree'].containing_oneof = _MODEL.oneofs_by_name['model']
1095
+ _MODEL.oneofs_by_name['model'].fields.append(
1096
+ _MODEL.fields_by_name['ensemble'])
1097
+ _MODEL.fields_by_name['ensemble'].containing_oneof = _MODEL.oneofs_by_name['model']
1098
+ _MODEL.oneofs_by_name['model'].fields.append(
1099
+ _MODEL.fields_by_name['download_url'])
1100
+ _MODEL.fields_by_name['download_url'].containing_oneof = _MODEL.oneofs_by_name['model']
1101
+ _ENSEMBLE_MEMBER.fields_by_name['submodel'].message_type = _MODEL
1102
+ _ENSEMBLE_MEMBER.containing_type = _ENSEMBLE
1103
+ _ENSEMBLE.fields_by_name['members'].message_type = _ENSEMBLE_MEMBER
1104
+ _DECISIONTREE.fields_by_name['nodes'].message_type = _TREENODE
1105
+ _TREENODE.fields_by_name['node_id'].message_type = _INT32VALUE
1106
+ _TREENODE.fields_by_name['depth'].message_type = _INT32VALUE
1107
+ _TREENODE.fields_by_name['subtree_size'].message_type = _INT32VALUE
1108
+ _TREENODE.fields_by_name['binary_node'].message_type = _BINARYNODE
1109
+ _TREENODE.fields_by_name['leaf'].message_type = _LEAF
1110
+ _TREENODE.oneofs_by_name['node_type'].fields.append(
1111
+ _TREENODE.fields_by_name['binary_node'])
1112
+ _TREENODE.fields_by_name['binary_node'].containing_oneof = _TREENODE.oneofs_by_name['node_type']
1113
+ _TREENODE.oneofs_by_name['node_type'].fields.append(
1114
+ _TREENODE.fields_by_name['leaf'])
1115
+ _TREENODE.fields_by_name['leaf'].containing_oneof = _TREENODE.oneofs_by_name['node_type']
1116
+ _BINARYNODE.fields_by_name['left_child_id'].message_type = _INT32VALUE
1117
+ _BINARYNODE.fields_by_name['right_child_id'].message_type = _INT32VALUE
1118
+ _BINARYNODE.fields_by_name['inequality_left_child_test'].message_type = _INEQUALITYTEST
1119
+ _BINARYNODE_DIRECTION.containing_type = _BINARYNODE
1120
+ _VECTOR.fields_by_name['value'].message_type = _VALUE
1121
+ _LEAF.fields_by_name['vector'].message_type = _VECTOR
1122
+ _FEATUREID.fields_by_name['id'].message_type = _STRINGVALUE
1123
+ _INEQUALITYTEST.fields_by_name['feature_id'].message_type = _FEATUREID
1124
+ _INEQUALITYTEST.fields_by_name['type'].enum_type = _INEQUALITYTEST_TYPE
1125
+ _INEQUALITYTEST.fields_by_name['threshold'].message_type = _VALUE
1126
+ _INEQUALITYTEST_TYPE.containing_type = _INEQUALITYTEST
1127
+ _VALUE.oneofs_by_name['value'].fields.append(
1128
+ _VALUE.fields_by_name['float_value'])
1129
+ _VALUE.fields_by_name['float_value'].containing_oneof = _VALUE.oneofs_by_name['value']
1130
+ _VALUE.oneofs_by_name['value'].fields.append(
1131
+ _VALUE.fields_by_name['double_value'])
1132
+ _VALUE.fields_by_name['double_value'].containing_oneof = _VALUE.oneofs_by_name['value']
1133
+ _VALUE.oneofs_by_name['value'].fields.append(
1134
+ _VALUE.fields_by_name['int32_value'])
1135
+ _VALUE.fields_by_name['int32_value'].containing_oneof = _VALUE.oneofs_by_name['value']
1136
+ _VALUE.oneofs_by_name['value'].fields.append(
1137
+ _VALUE.fields_by_name['int64_value'])
1138
+ _VALUE.fields_by_name['int64_value'].containing_oneof = _VALUE.oneofs_by_name['value']
1139
+ _GETMODELSREQUEST.fields_by_name['requested_models'].message_type = _MODELINFO
1140
+ _GETMODELSREQUEST.fields_by_name['request_context'].enum_type = common__types__pb2._REQUESTCONTEXT
1141
+ _GETMODELSREQUEST.fields_by_name['active_field_trials'].message_type = common__types__pb2._FIELDTRIAL
1142
+ _GETMODELSRESPONSE.fields_by_name['models'].message_type = _PREDICTIONMODEL
1143
+ _GETMODELSRESPONSE.fields_by_name['host_model_features'].message_type = _HOSTMODELFEATURES
1144
+ _PREDICTIONMODEL.fields_by_name['model_info'].message_type = _MODELINFO
1145
+ _PREDICTIONMODEL.fields_by_name['model'].message_type = _MODEL
1146
+ _MODELINFO.fields_by_name['optimization_target'].enum_type = _OPTIMIZATIONTARGET
1147
+ _MODELINFO.fields_by_name['supported_model_types'].enum_type = _MODELTYPE
1148
+ _MODELINFO.fields_by_name['additional_files'].message_type = _ADDITIONALMODELFILE
1149
+ _MODELINFO.fields_by_name['model_metadata'].message_type = common__types__pb2._ANY
1150
+ _HOSTMODELFEATURES.fields_by_name['model_features'].message_type = _MODELFEATURE
1151
+ _MODELFEATURE.oneofs_by_name['feature_value'].fields.append(
1152
+ _MODELFEATURE.fields_by_name['double_value'])
1153
+ _MODELFEATURE.fields_by_name['double_value'].containing_oneof = _MODELFEATURE.oneofs_by_name['feature_value']
1154
+ _MODELFEATURE.oneofs_by_name['feature_value'].fields.append(
1155
+ _MODELFEATURE.fields_by_name['int64_value'])
1156
+ _MODELFEATURE.fields_by_name['int64_value'].containing_oneof = _MODELFEATURE.oneofs_by_name['feature_value']
1157
+ DESCRIPTOR.message_types_by_name['Model'] = _MODEL
1158
+ DESCRIPTOR.message_types_by_name['Ensemble'] = _ENSEMBLE
1159
+ DESCRIPTOR.message_types_by_name['DecisionTree'] = _DECISIONTREE
1160
+ DESCRIPTOR.message_types_by_name['TreeNode'] = _TREENODE
1161
+ DESCRIPTOR.message_types_by_name['BinaryNode'] = _BINARYNODE
1162
+ DESCRIPTOR.message_types_by_name['Vector'] = _VECTOR
1163
+ DESCRIPTOR.message_types_by_name['Leaf'] = _LEAF
1164
+ DESCRIPTOR.message_types_by_name['FeatureId'] = _FEATUREID
1165
+ DESCRIPTOR.message_types_by_name['InequalityTest'] = _INEQUALITYTEST
1166
+ DESCRIPTOR.message_types_by_name['Value'] = _VALUE
1167
+ DESCRIPTOR.message_types_by_name['Int32Value'] = _INT32VALUE
1168
+ DESCRIPTOR.message_types_by_name['StringValue'] = _STRINGVALUE
1169
+ DESCRIPTOR.message_types_by_name['DoubleValue'] = _DOUBLEVALUE
1170
+ DESCRIPTOR.message_types_by_name['GetModelsRequest'] = _GETMODELSREQUEST
1171
+ DESCRIPTOR.message_types_by_name['GetModelsResponse'] = _GETMODELSRESPONSE
1172
+ DESCRIPTOR.message_types_by_name['PredictionModel'] = _PREDICTIONMODEL
1173
+ DESCRIPTOR.message_types_by_name['AdditionalModelFile'] = _ADDITIONALMODELFILE
1174
+ DESCRIPTOR.message_types_by_name['ModelInfo'] = _MODELINFO
1175
+ DESCRIPTOR.message_types_by_name['HostModelFeatures'] = _HOSTMODELFEATURES
1176
+ DESCRIPTOR.message_types_by_name['ModelFeature'] = _MODELFEATURE
1177
+ DESCRIPTOR.enum_types_by_name['OptimizationTarget'] = _OPTIMIZATIONTARGET
1178
+ DESCRIPTOR.enum_types_by_name['ModelType'] = _MODELTYPE
1179
+ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
1180
+
1181
+ Model = _reflection.GeneratedProtocolMessageType('Model', (_message.Message,), {
1182
+ 'DESCRIPTOR' : _MODEL,
1183
+ '__module__' : 'models_pb2'
1184
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Model)
1185
+ })
1186
+ _sym_db.RegisterMessage(Model)
1187
+
1188
+ Ensemble = _reflection.GeneratedProtocolMessageType('Ensemble', (_message.Message,), {
1189
+
1190
+ 'Member' : _reflection.GeneratedProtocolMessageType('Member', (_message.Message,), {
1191
+ 'DESCRIPTOR' : _ENSEMBLE_MEMBER,
1192
+ '__module__' : 'models_pb2'
1193
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Ensemble.Member)
1194
+ })
1195
+ ,
1196
+ 'DESCRIPTOR' : _ENSEMBLE,
1197
+ '__module__' : 'models_pb2'
1198
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Ensemble)
1199
+ })
1200
+ _sym_db.RegisterMessage(Ensemble)
1201
+ _sym_db.RegisterMessage(Ensemble.Member)
1202
+
1203
+ DecisionTree = _reflection.GeneratedProtocolMessageType('DecisionTree', (_message.Message,), {
1204
+ 'DESCRIPTOR' : _DECISIONTREE,
1205
+ '__module__' : 'models_pb2'
1206
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.DecisionTree)
1207
+ })
1208
+ _sym_db.RegisterMessage(DecisionTree)
1209
+
1210
+ TreeNode = _reflection.GeneratedProtocolMessageType('TreeNode', (_message.Message,), {
1211
+ 'DESCRIPTOR' : _TREENODE,
1212
+ '__module__' : 'models_pb2'
1213
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.TreeNode)
1214
+ })
1215
+ _sym_db.RegisterMessage(TreeNode)
1216
+
1217
+ BinaryNode = _reflection.GeneratedProtocolMessageType('BinaryNode', (_message.Message,), {
1218
+ 'DESCRIPTOR' : _BINARYNODE,
1219
+ '__module__' : 'models_pb2'
1220
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.BinaryNode)
1221
+ })
1222
+ _sym_db.RegisterMessage(BinaryNode)
1223
+
1224
+ Vector = _reflection.GeneratedProtocolMessageType('Vector', (_message.Message,), {
1225
+ 'DESCRIPTOR' : _VECTOR,
1226
+ '__module__' : 'models_pb2'
1227
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Vector)
1228
+ })
1229
+ _sym_db.RegisterMessage(Vector)
1230
+
1231
+ Leaf = _reflection.GeneratedProtocolMessageType('Leaf', (_message.Message,), {
1232
+ 'DESCRIPTOR' : _LEAF,
1233
+ '__module__' : 'models_pb2'
1234
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Leaf)
1235
+ })
1236
+ _sym_db.RegisterMessage(Leaf)
1237
+
1238
+ FeatureId = _reflection.GeneratedProtocolMessageType('FeatureId', (_message.Message,), {
1239
+ 'DESCRIPTOR' : _FEATUREID,
1240
+ '__module__' : 'models_pb2'
1241
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.FeatureId)
1242
+ })
1243
+ _sym_db.RegisterMessage(FeatureId)
1244
+
1245
+ InequalityTest = _reflection.GeneratedProtocolMessageType('InequalityTest', (_message.Message,), {
1246
+ 'DESCRIPTOR' : _INEQUALITYTEST,
1247
+ '__module__' : 'models_pb2'
1248
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.InequalityTest)
1249
+ })
1250
+ _sym_db.RegisterMessage(InequalityTest)
1251
+
1252
+ Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), {
1253
+ 'DESCRIPTOR' : _VALUE,
1254
+ '__module__' : 'models_pb2'
1255
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Value)
1256
+ })
1257
+ _sym_db.RegisterMessage(Value)
1258
+
1259
+ Int32Value = _reflection.GeneratedProtocolMessageType('Int32Value', (_message.Message,), {
1260
+ 'DESCRIPTOR' : _INT32VALUE,
1261
+ '__module__' : 'models_pb2'
1262
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.Int32Value)
1263
+ })
1264
+ _sym_db.RegisterMessage(Int32Value)
1265
+
1266
+ StringValue = _reflection.GeneratedProtocolMessageType('StringValue', (_message.Message,), {
1267
+ 'DESCRIPTOR' : _STRINGVALUE,
1268
+ '__module__' : 'models_pb2'
1269
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.StringValue)
1270
+ })
1271
+ _sym_db.RegisterMessage(StringValue)
1272
+
1273
+ DoubleValue = _reflection.GeneratedProtocolMessageType('DoubleValue', (_message.Message,), {
1274
+ 'DESCRIPTOR' : _DOUBLEVALUE,
1275
+ '__module__' : 'models_pb2'
1276
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.DoubleValue)
1277
+ })
1278
+ _sym_db.RegisterMessage(DoubleValue)
1279
+
1280
+ GetModelsRequest = _reflection.GeneratedProtocolMessageType('GetModelsRequest', (_message.Message,), {
1281
+ 'DESCRIPTOR' : _GETMODELSREQUEST,
1282
+ '__module__' : 'models_pb2'
1283
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.GetModelsRequest)
1284
+ })
1285
+ _sym_db.RegisterMessage(GetModelsRequest)
1286
+
1287
+ GetModelsResponse = _reflection.GeneratedProtocolMessageType('GetModelsResponse', (_message.Message,), {
1288
+ 'DESCRIPTOR' : _GETMODELSRESPONSE,
1289
+ '__module__' : 'models_pb2'
1290
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.GetModelsResponse)
1291
+ })
1292
+ _sym_db.RegisterMessage(GetModelsResponse)
1293
+
1294
+ PredictionModel = _reflection.GeneratedProtocolMessageType('PredictionModel', (_message.Message,), {
1295
+ 'DESCRIPTOR' : _PREDICTIONMODEL,
1296
+ '__module__' : 'models_pb2'
1297
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.PredictionModel)
1298
+ })
1299
+ _sym_db.RegisterMessage(PredictionModel)
1300
+
1301
+ AdditionalModelFile = _reflection.GeneratedProtocolMessageType('AdditionalModelFile', (_message.Message,), {
1302
+ 'DESCRIPTOR' : _ADDITIONALMODELFILE,
1303
+ '__module__' : 'models_pb2'
1304
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.AdditionalModelFile)
1305
+ })
1306
+ _sym_db.RegisterMessage(AdditionalModelFile)
1307
+
1308
+ ModelInfo = _reflection.GeneratedProtocolMessageType('ModelInfo', (_message.Message,), {
1309
+ 'DESCRIPTOR' : _MODELINFO,
1310
+ '__module__' : 'models_pb2'
1311
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.ModelInfo)
1312
+ })
1313
+ _sym_db.RegisterMessage(ModelInfo)
1314
+
1315
+ HostModelFeatures = _reflection.GeneratedProtocolMessageType('HostModelFeatures', (_message.Message,), {
1316
+ 'DESCRIPTOR' : _HOSTMODELFEATURES,
1317
+ '__module__' : 'models_pb2'
1318
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.HostModelFeatures)
1319
+ })
1320
+ _sym_db.RegisterMessage(HostModelFeatures)
1321
+
1322
+ ModelFeature = _reflection.GeneratedProtocolMessageType('ModelFeature', (_message.Message,), {
1323
+ 'DESCRIPTOR' : _MODELFEATURE,
1324
+ '__module__' : 'models_pb2'
1325
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.ModelFeature)
1326
+ })
1327
+ _sym_db.RegisterMessage(ModelFeature)
1328
+
1329
+
1330
+ DESCRIPTOR._options = None
1331
+ # @@protoc_insertion_point(module_scope)
override_list.binarypb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64a74f8982c6b70c85d24e81c32e6be7153dfc1b9aa478a55bb1881db18c3547
3
+ size 1111102
override_list.pb.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ad86e3c79ac3361688f6f0f287a8fbbe83d68c40dd778024f50747bcf4c290b
3
+ size 467851
page_topics_model_metadata.proto ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ syntax = "proto2";
5
+ option optimize_for = LITE_RUNTIME;
6
+ option java_package = "org.chromium.components.optimization_guide.proto";
7
+ option java_outer_classname = "PageTopicsModelMetadataProto";
8
+ package optimization_guide.proto;
9
+ enum PageTopicsSupportedOutput {
10
+ PAGE_TOPICS_SUPPORTED_OUTPUT_UNKNOWN = 0;
11
+ // Supports evaluating whether page content is FLoC-protected.
12
+ PAGE_TOPICS_SUPPORTED_OUTPUT_FLOC_PROTECTED = 1;
13
+ // Supports evaluating categories of page content.
14
+ PAGE_TOPICS_SUPPORTED_OUTPUT_CATEGORIES = 2;
15
+ }
16
+ message PageTopicsFlocProtectedPostprocessingParams {
17
+ // The name of the category to evaluate whether page content is
18
+ // FLoC-protected.
19
+ optional string category_name = 1;
20
+ }
21
+ message PageTopicsCategoryPostprocessingParams {
22
+ // Output at most max_categories, and only those with min_category_weight.
23
+ optional int32 max_categories = 1;
24
+ // The minimum weight a category must have for it to be in the output.
25
+ optional float min_category_weight = 2;
26
+ // The minimum weight after category weights are normalized that the top N
27
+ // categories must have.
28
+ optional float min_normalized_weight_within_top_n = 3;
29
+ // The minimum weight for the NONE label has to be to remove all labels.
30
+ optional float min_none_weight = 4;
31
+ }
32
+ message PageTopicsOutputPostprocessingParams {
33
+ // The parameters to use to post-process how FLoC-protected the page content
34
+ // is.
35
+ //
36
+ // Will only be included if PAGE_TOPICS_SUPPORTED_OUTPUT_FLOC_PROTECTED is
37
+ // supported by the model.
38
+ optional PageTopicsFlocProtectedPostprocessingParams floc_protected_params =
39
+ 1;
40
+ // The parameters to use to post-process categories.
41
+ //
42
+ // Will only be included if PAGE_TOPICS_SUPPORTED_OUTPUT_CATEGORIES is
43
+ // supported by the model.
44
+ optional PageTopicsCategoryPostprocessingParams category_params = 2;
45
+ }
46
+ message PageTopicsModelMetadata {
47
+ // The version of the model sent by the server, and thus, will only be
48
+ // populated by the server.
49
+ optional int64 version = 1;
50
+ // The supported output.
51
+ //
52
+ // If sent by the client, this represents the output that the client knows
53
+ // how to support. If sent by the server, this represents the outputs of the
54
+ // model.
55
+ repeated PageTopicsSupportedOutput supported_output = 2;
56
+ // A set of postprocessing parameters per supported output and will only be
57
+ // populated by the server.
58
+ optional PageTopicsOutputPostprocessingParams output_postprocessing_params =
59
+ 3;
60
+ }
page_topics_model_metadata_pb2.py ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: page_topics_model_metadata.proto
4
+
5
+ from google.protobuf.internal import enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from google.protobuf import reflection as _reflection
9
+ from google.protobuf import symbol_database as _symbol_database
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor.FileDescriptor(
18
+ name='page_topics_model_metadata.proto',
19
+ package='optimization_guide.proto',
20
+ syntax='proto2',
21
+ serialized_options=b'\n0org.chromium.components.optimization_guide.protoB\034PageTopicsModelMetadataProtoH\003',
22
+ create_key=_descriptor._internal_create_key,
23
+ serialized_pb=b'\n page_topics_model_metadata.proto\x12\x18optimization_guide.proto\"D\n+PageTopicsFlocProtectedPostprocessingParams\x12\x15\n\rcategory_name\x18\x01 \x01(\t\"\xa2\x01\n&PageTopicsCategoryPostprocessingParams\x12\x16\n\x0emax_categories\x18\x01 \x01(\x05\x12\x1b\n\x13min_category_weight\x18\x02 \x01(\x02\x12*\n\"min_normalized_weight_within_top_n\x18\x03 \x01(\x02\x12\x17\n\x0fmin_none_weight\x18\x04 \x01(\x02\"\xe7\x01\n$PageTopicsOutputPostprocessingParams\x12\x64\n\x15\x66loc_protected_params\x18\x01 \x01(\x0b\x32\x45.optimization_guide.proto.PageTopicsFlocProtectedPostprocessingParams\x12Y\n\x0f\x63\x61tegory_params\x18\x02 \x01(\x0b\x32@.optimization_guide.proto.PageTopicsCategoryPostprocessingParams\"\xdf\x01\n\x17PageTopicsModelMetadata\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12M\n\x10supported_output\x18\x02 \x03(\x0e\x32\x33.optimization_guide.proto.PageTopicsSupportedOutput\x12\x64\n\x1coutput_postprocessing_params\x18\x03 \x01(\x0b\x32>.optimization_guide.proto.PageTopicsOutputPostprocessingParams*\xa3\x01\n\x19PageTopicsSupportedOutput\x12(\n$PAGE_TOPICS_SUPPORTED_OUTPUT_UNKNOWN\x10\x00\x12/\n+PAGE_TOPICS_SUPPORTED_OUTPUT_FLOC_PROTECTED\x10\x01\x12+\n\'PAGE_TOPICS_SUPPORTED_OUTPUT_CATEGORIES\x10\x02\x42R\n0org.chromium.components.optimization_guide.protoB\x1cPageTopicsModelMetadataProtoH\x03'
24
+ )
25
+
26
+ _PAGETOPICSSUPPORTEDOUTPUT = _descriptor.EnumDescriptor(
27
+ name='PageTopicsSupportedOutput',
28
+ full_name='optimization_guide.proto.PageTopicsSupportedOutput',
29
+ filename=None,
30
+ file=DESCRIPTOR,
31
+ create_key=_descriptor._internal_create_key,
32
+ values=[
33
+ _descriptor.EnumValueDescriptor(
34
+ name='PAGE_TOPICS_SUPPORTED_OUTPUT_UNKNOWN', index=0, number=0,
35
+ serialized_options=None,
36
+ type=None,
37
+ create_key=_descriptor._internal_create_key),
38
+ _descriptor.EnumValueDescriptor(
39
+ name='PAGE_TOPICS_SUPPORTED_OUTPUT_FLOC_PROTECTED', index=1, number=1,
40
+ serialized_options=None,
41
+ type=None,
42
+ create_key=_descriptor._internal_create_key),
43
+ _descriptor.EnumValueDescriptor(
44
+ name='PAGE_TOPICS_SUPPORTED_OUTPUT_CATEGORIES', index=2, number=2,
45
+ serialized_options=None,
46
+ type=None,
47
+ create_key=_descriptor._internal_create_key),
48
+ ],
49
+ containing_type=None,
50
+ serialized_options=None,
51
+ serialized_start=758,
52
+ serialized_end=921,
53
+ )
54
+ _sym_db.RegisterEnumDescriptor(_PAGETOPICSSUPPORTEDOUTPUT)
55
+
56
+ PageTopicsSupportedOutput = enum_type_wrapper.EnumTypeWrapper(_PAGETOPICSSUPPORTEDOUTPUT)
57
+ PAGE_TOPICS_SUPPORTED_OUTPUT_UNKNOWN = 0
58
+ PAGE_TOPICS_SUPPORTED_OUTPUT_FLOC_PROTECTED = 1
59
+ PAGE_TOPICS_SUPPORTED_OUTPUT_CATEGORIES = 2
60
+
61
+
62
+
63
+ _PAGETOPICSFLOCPROTECTEDPOSTPROCESSINGPARAMS = _descriptor.Descriptor(
64
+ name='PageTopicsFlocProtectedPostprocessingParams',
65
+ full_name='optimization_guide.proto.PageTopicsFlocProtectedPostprocessingParams',
66
+ filename=None,
67
+ file=DESCRIPTOR,
68
+ containing_type=None,
69
+ create_key=_descriptor._internal_create_key,
70
+ fields=[
71
+ _descriptor.FieldDescriptor(
72
+ name='category_name', full_name='optimization_guide.proto.PageTopicsFlocProtectedPostprocessingParams.category_name', index=0,
73
+ number=1, type=9, cpp_type=9, label=1,
74
+ has_default_value=False, default_value=b"".decode('utf-8'),
75
+ message_type=None, enum_type=None, containing_type=None,
76
+ is_extension=False, extension_scope=None,
77
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
78
+ ],
79
+ extensions=[
80
+ ],
81
+ nested_types=[],
82
+ enum_types=[
83
+ ],
84
+ serialized_options=None,
85
+ is_extendable=False,
86
+ syntax='proto2',
87
+ extension_ranges=[],
88
+ oneofs=[
89
+ ],
90
+ serialized_start=62,
91
+ serialized_end=130,
92
+ )
93
+
94
+
95
+ _PAGETOPICSCATEGORYPOSTPROCESSINGPARAMS = _descriptor.Descriptor(
96
+ name='PageTopicsCategoryPostprocessingParams',
97
+ full_name='optimization_guide.proto.PageTopicsCategoryPostprocessingParams',
98
+ filename=None,
99
+ file=DESCRIPTOR,
100
+ containing_type=None,
101
+ create_key=_descriptor._internal_create_key,
102
+ fields=[
103
+ _descriptor.FieldDescriptor(
104
+ name='max_categories', full_name='optimization_guide.proto.PageTopicsCategoryPostprocessingParams.max_categories', index=0,
105
+ number=1, type=5, cpp_type=1, label=1,
106
+ has_default_value=False, default_value=0,
107
+ message_type=None, enum_type=None, containing_type=None,
108
+ is_extension=False, extension_scope=None,
109
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
110
+ _descriptor.FieldDescriptor(
111
+ name='min_category_weight', full_name='optimization_guide.proto.PageTopicsCategoryPostprocessingParams.min_category_weight', index=1,
112
+ number=2, type=2, cpp_type=6, label=1,
113
+ has_default_value=False, default_value=float(0),
114
+ message_type=None, enum_type=None, containing_type=None,
115
+ is_extension=False, extension_scope=None,
116
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
117
+ _descriptor.FieldDescriptor(
118
+ name='min_normalized_weight_within_top_n', full_name='optimization_guide.proto.PageTopicsCategoryPostprocessingParams.min_normalized_weight_within_top_n', index=2,
119
+ number=3, type=2, cpp_type=6, label=1,
120
+ has_default_value=False, default_value=float(0),
121
+ message_type=None, enum_type=None, containing_type=None,
122
+ is_extension=False, extension_scope=None,
123
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
124
+ _descriptor.FieldDescriptor(
125
+ name='min_none_weight', full_name='optimization_guide.proto.PageTopicsCategoryPostprocessingParams.min_none_weight', index=3,
126
+ number=4, type=2, cpp_type=6, label=1,
127
+ has_default_value=False, default_value=float(0),
128
+ message_type=None, enum_type=None, containing_type=None,
129
+ is_extension=False, extension_scope=None,
130
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
131
+ ],
132
+ extensions=[
133
+ ],
134
+ nested_types=[],
135
+ enum_types=[
136
+ ],
137
+ serialized_options=None,
138
+ is_extendable=False,
139
+ syntax='proto2',
140
+ extension_ranges=[],
141
+ oneofs=[
142
+ ],
143
+ serialized_start=133,
144
+ serialized_end=295,
145
+ )
146
+
147
+
148
+ _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS = _descriptor.Descriptor(
149
+ name='PageTopicsOutputPostprocessingParams',
150
+ full_name='optimization_guide.proto.PageTopicsOutputPostprocessingParams',
151
+ filename=None,
152
+ file=DESCRIPTOR,
153
+ containing_type=None,
154
+ create_key=_descriptor._internal_create_key,
155
+ fields=[
156
+ _descriptor.FieldDescriptor(
157
+ name='floc_protected_params', full_name='optimization_guide.proto.PageTopicsOutputPostprocessingParams.floc_protected_params', index=0,
158
+ number=1, type=11, cpp_type=10, label=1,
159
+ has_default_value=False, default_value=None,
160
+ message_type=None, enum_type=None, containing_type=None,
161
+ is_extension=False, extension_scope=None,
162
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
163
+ _descriptor.FieldDescriptor(
164
+ name='category_params', full_name='optimization_guide.proto.PageTopicsOutputPostprocessingParams.category_params', index=1,
165
+ number=2, type=11, cpp_type=10, label=1,
166
+ has_default_value=False, default_value=None,
167
+ message_type=None, enum_type=None, containing_type=None,
168
+ is_extension=False, extension_scope=None,
169
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
170
+ ],
171
+ extensions=[
172
+ ],
173
+ nested_types=[],
174
+ enum_types=[
175
+ ],
176
+ serialized_options=None,
177
+ is_extendable=False,
178
+ syntax='proto2',
179
+ extension_ranges=[],
180
+ oneofs=[
181
+ ],
182
+ serialized_start=298,
183
+ serialized_end=529,
184
+ )
185
+
186
+
187
+ _PAGETOPICSMODELMETADATA = _descriptor.Descriptor(
188
+ name='PageTopicsModelMetadata',
189
+ full_name='optimization_guide.proto.PageTopicsModelMetadata',
190
+ filename=None,
191
+ file=DESCRIPTOR,
192
+ containing_type=None,
193
+ create_key=_descriptor._internal_create_key,
194
+ fields=[
195
+ _descriptor.FieldDescriptor(
196
+ name='version', full_name='optimization_guide.proto.PageTopicsModelMetadata.version', index=0,
197
+ number=1, type=3, cpp_type=2, label=1,
198
+ has_default_value=False, default_value=0,
199
+ message_type=None, enum_type=None, containing_type=None,
200
+ is_extension=False, extension_scope=None,
201
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
202
+ _descriptor.FieldDescriptor(
203
+ name='supported_output', full_name='optimization_guide.proto.PageTopicsModelMetadata.supported_output', index=1,
204
+ number=2, type=14, cpp_type=8, label=3,
205
+ has_default_value=False, default_value=[],
206
+ message_type=None, enum_type=None, containing_type=None,
207
+ is_extension=False, extension_scope=None,
208
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
209
+ _descriptor.FieldDescriptor(
210
+ name='output_postprocessing_params', full_name='optimization_guide.proto.PageTopicsModelMetadata.output_postprocessing_params', index=2,
211
+ number=3, type=11, cpp_type=10, label=1,
212
+ has_default_value=False, default_value=None,
213
+ message_type=None, enum_type=None, containing_type=None,
214
+ is_extension=False, extension_scope=None,
215
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
216
+ ],
217
+ extensions=[
218
+ ],
219
+ nested_types=[],
220
+ enum_types=[
221
+ ],
222
+ serialized_options=None,
223
+ is_extendable=False,
224
+ syntax='proto2',
225
+ extension_ranges=[],
226
+ oneofs=[
227
+ ],
228
+ serialized_start=532,
229
+ serialized_end=755,
230
+ )
231
+
232
+ _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS.fields_by_name['floc_protected_params'].message_type = _PAGETOPICSFLOCPROTECTEDPOSTPROCESSINGPARAMS
233
+ _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS.fields_by_name['category_params'].message_type = _PAGETOPICSCATEGORYPOSTPROCESSINGPARAMS
234
+ _PAGETOPICSMODELMETADATA.fields_by_name['supported_output'].enum_type = _PAGETOPICSSUPPORTEDOUTPUT
235
+ _PAGETOPICSMODELMETADATA.fields_by_name['output_postprocessing_params'].message_type = _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS
236
+ DESCRIPTOR.message_types_by_name['PageTopicsFlocProtectedPostprocessingParams'] = _PAGETOPICSFLOCPROTECTEDPOSTPROCESSINGPARAMS
237
+ DESCRIPTOR.message_types_by_name['PageTopicsCategoryPostprocessingParams'] = _PAGETOPICSCATEGORYPOSTPROCESSINGPARAMS
238
+ DESCRIPTOR.message_types_by_name['PageTopicsOutputPostprocessingParams'] = _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS
239
+ DESCRIPTOR.message_types_by_name['PageTopicsModelMetadata'] = _PAGETOPICSMODELMETADATA
240
+ DESCRIPTOR.enum_types_by_name['PageTopicsSupportedOutput'] = _PAGETOPICSSUPPORTEDOUTPUT
241
+ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
242
+
243
+ PageTopicsFlocProtectedPostprocessingParams = _reflection.GeneratedProtocolMessageType('PageTopicsFlocProtectedPostprocessingParams', (_message.Message,), {
244
+ 'DESCRIPTOR' : _PAGETOPICSFLOCPROTECTEDPOSTPROCESSINGPARAMS,
245
+ '__module__' : 'page_topics_model_metadata_pb2'
246
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.PageTopicsFlocProtectedPostprocessingParams)
247
+ })
248
+ _sym_db.RegisterMessage(PageTopicsFlocProtectedPostprocessingParams)
249
+
250
+ PageTopicsCategoryPostprocessingParams = _reflection.GeneratedProtocolMessageType('PageTopicsCategoryPostprocessingParams', (_message.Message,), {
251
+ 'DESCRIPTOR' : _PAGETOPICSCATEGORYPOSTPROCESSINGPARAMS,
252
+ '__module__' : 'page_topics_model_metadata_pb2'
253
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.PageTopicsCategoryPostprocessingParams)
254
+ })
255
+ _sym_db.RegisterMessage(PageTopicsCategoryPostprocessingParams)
256
+
257
+ PageTopicsOutputPostprocessingParams = _reflection.GeneratedProtocolMessageType('PageTopicsOutputPostprocessingParams', (_message.Message,), {
258
+ 'DESCRIPTOR' : _PAGETOPICSOUTPUTPOSTPROCESSINGPARAMS,
259
+ '__module__' : 'page_topics_model_metadata_pb2'
260
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.PageTopicsOutputPostprocessingParams)
261
+ })
262
+ _sym_db.RegisterMessage(PageTopicsOutputPostprocessingParams)
263
+
264
+ PageTopicsModelMetadata = _reflection.GeneratedProtocolMessageType('PageTopicsModelMetadata', (_message.Message,), {
265
+ 'DESCRIPTOR' : _PAGETOPICSMODELMETADATA,
266
+ '__module__' : 'page_topics_model_metadata_pb2'
267
+ # @@protoc_insertion_point(class_scope:optimization_guide.proto.PageTopicsModelMetadata)
268
+ })
269
+ _sym_db.RegisterMessage(PageTopicsModelMetadata)
270
+
271
+
272
+ DESCRIPTOR._options = None
273
+ # @@protoc_insertion_point(module_scope)
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ streamlit
2
+ trafilatura
3
+ numpy
4
+ pandas
5
+ requests
6
+ ai-edge-litert
taxonomy_v2.csv ADDED
@@ -0,0 +1,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ID,Topic
2
+ 1,/Arts & Entertainment
3
+ 350,/Arts & Entertainment/Celebrities & Entertainment News
4
+ 351,/Arts & Entertainment/Comics & Animation
5
+ 352,/Arts & Entertainment/Events & Listings
6
+ 353,"/Arts & Entertainment/Events & Listings/Bars, Clubs & Nightlife"
7
+ 4,/Arts & Entertainment/Events & Listings/Concerts & Music Festivals
8
+ 354,/Arts & Entertainment/Events & Listings/Event Ticket Sales
9
+ 355,/Arts & Entertainment/Events & Listings/Expos & Conventions
10
+ 356,/Arts & Entertainment/Events & Listings/Film Festivals
11
+ 357,/Arts & Entertainment/Events & Listings/Food & Beverage Events
12
+ 9,/Arts & Entertainment/Events & Listings/Live Sporting Events
13
+ 12,/Arts & Entertainment/Movies
14
+ 13,/Arts & Entertainment/Movies/Action & Adventure Films
15
+ 15,/Arts & Entertainment/Movies/Comedy Films
16
+ 18,/Arts & Entertainment/Movies/Drama Films
17
+ 19,/Arts & Entertainment/Movies/Family Films
18
+ 20,/Arts & Entertainment/Movies/Horror Films
19
+ 21,/Arts & Entertainment/Movies/Romance Films
20
+ 358,/Arts & Entertainment/Movies/Science Fiction & Fantasy Films
21
+ 23,/Arts & Entertainment/Music & Audio
22
+ 24,/Arts & Entertainment/Music & Audio/Blues
23
+ 25,/Arts & Entertainment/Music & Audio/Classical Music
24
+ 26,/Arts & Entertainment/Music & Audio/Country Music
25
+ 27,/Arts & Entertainment/Music & Audio/Dance & Electronic Music
26
+ 359,/Arts & Entertainment/Music & Audio/DJ Resources & Equipment
27
+ 28,/Arts & Entertainment/Music & Audio/Folk & Traditional Music
28
+ 29,/Arts & Entertainment/Music & Audio/Jazz
29
+ 30,/Arts & Entertainment/Music & Audio/Musical Instruments
30
+ 31,/Arts & Entertainment/Music & Audio/Pop Music
31
+ 32,/Arts & Entertainment/Music & Audio/Rap & Hip-Hop
32
+ 33,/Arts & Entertainment/Music & Audio/Rock Music
33
+ 36,/Arts & Entertainment/Music & Audio/Rock Music/Indie & Alternative Music
34
+ 360,/Arts & Entertainment/Music & Audio/Rock Music/Metal (Music)
35
+ 361,/Arts & Entertainment/Performing Arts
36
+ 362,/Arts & Entertainment/Performing Arts/Broadway & Musical Theater
37
+ 363,/Arts & Entertainment/TV & Video
38
+ 364,/Arts & Entertainment/TV & Video/Live Video Streaming
39
+ 365,/Arts & Entertainment/TV & Video/Movie & TV Streaming
40
+ 46,/Arts & Entertainment/TV & Video/TV Comedies
41
+ 47,/Arts & Entertainment/TV & Video/TV Documentary & Nonfiction
42
+ 48,/Arts & Entertainment/TV & Video/TV Dramas
43
+ 50,/Arts & Entertainment/TV & Video/TV Family-Oriented Shows
44
+ 366,/Arts & Entertainment/TV & Video/TV Game Shows
45
+ 51,/Arts & Entertainment/TV & Video/TV Reality Shows
46
+ 52,/Arts & Entertainment/TV & Video/TV Sci-Fi & Fantasy Shows
47
+ 367,/Arts & Entertainment/TV & Video/TV Talk Shows
48
+ 53,/Arts & Entertainment/Visual Art & Design
49
+ 368,/Arts & Entertainment/Visual Art & Design/Architecture
50
+ 56,/Arts & Entertainment/Visual Art & Design/Photographic & Digital Arts
51
+ 57,/Autos & Vehicles
52
+ 369,/Autos & Vehicles/Bicycles & Accessories
53
+ 370,/Autos & Vehicles/Boats & Watercraft
54
+ 371,/Autos & Vehicles/Campers & RVs
55
+ 59,/Autos & Vehicles/Classic Vehicles
56
+ 372,/Autos & Vehicles/Commercial Vehicles
57
+ 60,/Autos & Vehicles/Custom & Performance Vehicles
58
+ 62,/Autos & Vehicles/Motor Vehicles (By Type)
59
+ 63,/Autos & Vehicles/Motor Vehicles (By Type)/Autonomous Vehicles
60
+ 373,/Autos & Vehicles/Motor Vehicles (By Type)/Compact Cars
61
+ 64,/Autos & Vehicles/Motor Vehicles (By Type)/Convertibles
62
+ 65,/Autos & Vehicles/Motor Vehicles (By Type)/Coupes
63
+ 374,/Autos & Vehicles/Motor Vehicles (By Type)/Diesel Vehicles
64
+ 66,/Autos & Vehicles/Motor Vehicles (By Type)/Hatchbacks
65
+ 67,/Autos & Vehicles/Motor Vehicles (By Type)/Hybrid & Alternative Vehicles
66
+ 375,/Autos & Vehicles/Motor Vehicles (By Type)/Hybrid & Alternative Vehicles/Electric & Plug-In Vehicles
67
+ 68,/Autos & Vehicles/Motor Vehicles (By Type)/Luxury Vehicles
68
+ 69,/Autos & Vehicles/Motor Vehicles (By Type)/Microcars & Subcompacts
69
+ 70,/Autos & Vehicles/Motor Vehicles (By Type)/Motorcycles
70
+ 71,/Autos & Vehicles/Motor Vehicles (By Type)/Off-Road Vehicles
71
+ 73,/Autos & Vehicles/Motor Vehicles (By Type)/Scooters & Mopeds
72
+ 74,/Autos & Vehicles/Motor Vehicles (By Type)/Sedans
73
+ 376,/Autos & Vehicles/Motor Vehicles (By Type)/Sports Cars
74
+ 75,/Autos & Vehicles/Motor Vehicles (By Type)/Station Wagons
75
+ 377,"/Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs"
76
+ 72,"/Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/Pickup Trucks"
77
+ 76,"/Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/SUVs & Crossovers"
78
+ 78,"/Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/Vans & Minivans"
79
+ 81,/Autos & Vehicles/Vehicle Parts & Accessories
80
+ 378,/Autos & Vehicles/Vehicle Parts & Accessories/High Performance & Aftermarket Auto Parts
81
+ 379,/Autos & Vehicles/Vehicle Parts & Accessories/Vehicle Wheels & Tires
82
+ 82,/Autos & Vehicles/Vehicle Repair & Maintenance
83
+ 83,/Autos & Vehicles/Vehicle Shopping
84
+ 84,/Autos & Vehicles/Vehicle Shopping/Used Vehicles
85
+ 86,/Beauty & Fitness
86
+ 380,/Beauty & Fitness/Beauty Services & Spas
87
+ 381,/Beauty & Fitness/Beauty Services & Spas/Manicures & Pedicures
88
+ 382,/Beauty & Fitness/Cosmetology & Beauty Professionals
89
+ 88,/Beauty & Fitness/Face & Body Care
90
+ 91,/Beauty & Fitness/Face & Body Care/Clean Beauty
91
+ 383,/Beauty & Fitness/Face & Body Care/Hygiene & Toiletries
92
+ 89,"/Beauty & Fitness/Face & Body Care/Hygiene & Toiletries/Antiperspirants, Deodorants & Body Sprays"
93
+ 384,/Beauty & Fitness/Face & Body Care/Hygiene & Toiletries/Feminine Hygiene Products
94
+ 92,/Beauty & Fitness/Face & Body Care/Make-Up & Cosmetics
95
+ 94,/Beauty & Fitness/Face & Body Care/Perfumes & Fragrances
96
+ 385,/Beauty & Fitness/Face & Body Care/Skin & Nail Care
97
+ 90,/Beauty & Fitness/Face & Body Care/Skin & Nail Care/Bath & Body Products
98
+ 386,/Beauty & Fitness/Face & Body Care/Skin & Nail Care/Face Care Products
99
+ 93,/Beauty & Fitness/Face & Body Care/Skin & Nail Care/Nail Care Products
100
+ 387,/Beauty & Fitness/Face & Body Care/Sun Care & Tanning Products
101
+ 388,/Beauty & Fitness/Face & Body Care/Unwanted Body & Facial Hair Removal
102
+ 95,/Beauty & Fitness/Face & Body Care/Unwanted Body & Facial Hair Removal/Razors & Shavers
103
+ 96,/Beauty & Fitness/Fashion & Style
104
+ 97,/Beauty & Fitness/Fitness
105
+ 389,/Beauty & Fitness/Fitness/Fitness Equipment & Accessories
106
+ 390,/Beauty & Fitness/Fitness/Fitness Equipment & Accessories/Fitness Technology Products
107
+ 391,/Beauty & Fitness/Fitness/Fitness Instruction & Personal Training
108
+ 392,/Beauty & Fitness/Fitness/Gyms & Health Clubs
109
+ 393,/Beauty & Fitness/Fitness/High Intensity Interval Training
110
+ 394,/Beauty & Fitness/Fitness/Yoga & Pilates
111
+ 99,/Beauty & Fitness/Hair Care
112
+ 395,/Beauty & Fitness/Hair Care/Shampoos & Conditioners
113
+ 100,/Books & Literature
114
+ 396,/Books & Literature/Audiobooks
115
+ 397,/Books & Literature/Book Retailers
116
+ 101,/Books & Literature/Children's Literature
117
+ 398,/Books & Literature/Fan Fiction
118
+ 399,/Books & Literature/Literary Classics
119
+ 400,/Books & Literature/Magazines
120
+ 102,/Books & Literature/Poetry
121
+ 401,/Books & Literature/Writers Resources
122
+ 103,/Business & Industrial
123
+ 104,/Business & Industrial/Advertising & Marketing
124
+ 402,/Business & Industrial/Building Materials & Supplies
125
+ 403,/Business & Industrial/Business Finance
126
+ 113,/Business & Industrial/Business Finance/Commercial Lending
127
+ 404,/Business & Industrial/Business Services
128
+ 405,/Business & Industrial/Business Services/Corporate Events
129
+ 406,/Business & Industrial/Business Services/Fire & Security Services
130
+ 407,/Business & Industrial/Business Services/Merchant Services & Payment Systems
131
+ 408,/Business & Industrial/Business Services/Office Supplies
132
+ 409,/Business & Industrial/Business Services/Office Supplies/Office Furniture
133
+ 410,/Business & Industrial/Business Services/Signage
134
+ 411,/Business & Industrial/Construction Consulting & Contracting
135
+ 412,/Business & Industrial/Document & Printing Services
136
+ 413,/Business & Industrial/Event Planning
137
+ 414,/Business & Industrial/Food Service
138
+ 415,/Business & Industrial/Industrial Materials & Equipment
139
+ 416,/Business & Industrial/Industrial Materials & Equipment/Work Safety Protective Gear
140
+ 417,/Business & Industrial/Moving & Relocation
141
+ 418,/Business & Industrial/Payroll Services
142
+ 419,/Business & Industrial/Recruitment & Staffing
143
+ 126,/Computers & Electronics
144
+ 420,/Computers & Electronics/Computer Hardware
145
+ 421,/Computers & Electronics/Computer Hardware/Computer Components
146
+ 422,/Computers & Electronics/Computer Hardware/Computer Drives & Storage
147
+ 128,/Computers & Electronics/Computer Hardware/Computer Peripherals
148
+ 134,/Computers & Electronics/Computer Hardware/Desktop Computers
149
+ 135,/Computers & Electronics/Computer Hardware/Laptops & Notebooks
150
+ 423,/Computers & Electronics/Computer Security
151
+ 129,/Computers & Electronics/Consumer Electronics
152
+ 424,/Computers & Electronics/Consumer Electronics/Audio Equipment
153
+ 425,/Computers & Electronics/Consumer Electronics/Audio Equipment/Headphones
154
+ 426,/Computers & Electronics/Consumer Electronics/Audio Equipment/Speakers
155
+ 427,/Computers & Electronics/Consumer Electronics/Audio Equipment/Stereo Systems & Components
156
+ 428,/Computers & Electronics/Consumer Electronics/Camera & Photo Equipment
157
+ 429,/Computers & Electronics/Consumer Electronics/Car Audio
158
+ 430,/Computers & Electronics/Consumer Electronics/Gadgets & Portable Electronics
159
+ 431,/Computers & Electronics/Consumer Electronics/Game Systems & Consoles
160
+ 432,/Computers & Electronics/Consumer Electronics/Game Systems & Consoles/Handheld Game Consoles
161
+ 131,/Computers & Electronics/Consumer Electronics/Home Automation
162
+ 132,/Computers & Electronics/Consumer Electronics/Home Theater Systems
163
+ 433,/Computers & Electronics/Consumer Electronics/Televisions
164
+ 434,/Computers & Electronics/Electronics & Electrical
165
+ 435,/Computers & Electronics/Electronics & Electrical/Power Supplies
166
+ 436,/Computers & Electronics/Enterprise Technology
167
+ 137,/Computers & Electronics/Networking
168
+ 437,/Computers & Electronics/Networking/Network Monitoring & Management
169
+ 438,/Computers & Electronics/Networking/Networking Equipment
170
+ 140,/Computers & Electronics/Software
171
+ 439,/Computers & Electronics/Software/Business & Productivity Software
172
+ 440,/Computers & Electronics/Software/Business & Productivity Software/Accounting & Financial Software
173
+ 441,/Computers & Electronics/Software/Business & Productivity Software/Collaboration & Conferencing Software
174
+ 442,/Computers & Electronics/Software/Multimedia Software
175
+ 141,/Computers & Electronics/Software/Multimedia Software/Audio & Music Software
176
+ 144,/Computers & Electronics/Software/Multimedia Software/Graphics & Animation Software
177
+ 443,/Computers & Electronics/Software/Multimedia Software/Photo & Video Software
178
+ 149,/Finance
179
+ 150,/Finance/Accounting & Auditing
180
+ 151,/Finance/Accounting & Auditing/Tax Preparation & Planning
181
+ 444,/Finance/Banking
182
+ 445,/Finance/Banking/Debit & Checking Services
183
+ 446,/Finance/Banking/Savings Accounts
184
+ 447,/Finance/Credit & Lending
185
+ 448,/Finance/Credit & Lending/Auto Financing
186
+ 152,/Finance/Credit & Lending/Credit Cards
187
+ 449,/Finance/Credit & Lending/Credit Reporting & Monitoring
188
+ 157,/Finance/Credit & Lending/Home Financing
189
+ 170,/Finance/Credit & Lending/Personal Loans
190
+ 171,/Finance/Credit & Lending/Student Loans & College Financing
191
+ 153,/Finance/Financial Planning & Management
192
+ 154,/Finance/Financial Planning & Management/Retirement & Pension
193
+ 158,/Finance/Insurance
194
+ 159,/Finance/Insurance/Auto Insurance
195
+ 160,/Finance/Insurance/Health Insurance
196
+ 161,/Finance/Insurance/Home Insurance
197
+ 162,/Finance/Insurance/Life Insurance
198
+ 163,/Finance/Insurance/Travel Insurance
199
+ 164,/Finance/Investing
200
+ 172,/Food & Drink
201
+ 173,/Food & Drink/Cooking & Recipes
202
+ 176,/Food & Drink/Cooking & Recipes/Vegetarian Cuisine
203
+ 177,/Food & Drink/Cooking & Recipes/Vegetarian Cuisine/Vegan Cuisine
204
+ 450,/Food & Drink/Food
205
+ 451,/Food & Drink/Food/Baked Goods
206
+ 452,/Food & Drink/Food/Breakfast Foods
207
+ 453,/Food & Drink/Food/Candy & Sweets
208
+ 454,/Food & Drink/Food/Condiments & Dressings
209
+ 455,/Food & Drink/Food/Dairy & Eggs
210
+ 456,/Food & Drink/Food/Gourmet & Specialty Foods
211
+ 457,/Food & Drink/Food/Meat & Seafood
212
+ 458,/Food & Drink/Food/Meat & Seafood/Fish & Seafood
213
+ 459,/Food & Drink/Food/Organic & Natural Foods
214
+ 460,/Food & Drink/Grocery Delivery Services
215
+ 461,/Food & Drink/Restaurant Delivery Services
216
+ 462,/Food & Drink/Restaurants
217
+ 463,/Food & Drink/Restaurants/Fast Food
218
+ 464,/Food & Drink/Restaurants/Pizzerias
219
+ 180,/Games
220
+ 465,/Games/Board Games
221
+ 183,/Games/Computer & Video Games
222
+ 184,/Games/Computer & Video Games/Action & Platform Games
223
+ 185,/Games/Computer & Video Games/Adventure Games
224
+ 186,/Games/Computer & Video Games/Casual Games
225
+ 187,/Games/Computer & Video Games/Competitive Video Gaming
226
+ 466,/Games/Computer & Video Games/Driving & Racing Games
227
+ 467,/Games/Computer & Video Games/Shooter Games
228
+ 191,/Games/Computer & Video Games/Sports Games
229
+ 192,/Games/Computer & Video Games/Strategy Games
230
+ 468,/Games/Family-Oriented Games & Activities
231
+ 194,/Games/Roleplaying Games
232
+ 196,/Hobbies & Leisure
233
+ 469,/Hobbies & Leisure/Art & Craft Supplies
234
+ 470,/Hobbies & Leisure/Boating
235
+ 471,/Hobbies & Leisure/Holidays & Seasonal Events
236
+ 201,/Hobbies & Leisure/Outdoors
237
+ 202,/Hobbies & Leisure/Outdoors/Fishing
238
+ 472,/Hobbies & Leisure/Outdoors/Hiking & Camping
239
+ 207,/Home & Garden
240
+ 473,/Home & Garden/Bed & Bath
241
+ 474,/Home & Garden/Bed & Bath/Bathroom
242
+ 475,/Home & Garden/Bed & Bath/Bedroom
243
+ 476,/Home & Garden/Bed & Bath/Bedroom/Bedding & Bed Linens
244
+ 477,/Home & Garden/Bed & Bath/Bedroom/Beds & Headboards
245
+ 478,/Home & Garden/Bed & Bath/Bedroom/Mattresses
246
+ 479,/Home & Garden/Cleaning Services
247
+ 209,/Home & Garden/Home & Interior Decor
248
+ 210,/Home & Garden/Home Appliances
249
+ 480,/Home & Garden/Home Appliances/Vacuums & Floor Care
250
+ 481,/Home & Garden/Home Appliances/Water Filters & Purifiers
251
+ 482,/Home & Garden/Home Furnishings
252
+ 483,/Home & Garden/Home Furnishings/Countertops
253
+ 484,/Home & Garden/Home Furnishings/Curtains & Window Treatments
254
+ 485,/Home & Garden/Home Furnishings/Kitchen & Dining Furniture
255
+ 486,/Home & Garden/Home Furnishings/Lamps & Lighting
256
+ 487,/Home & Garden/Home Furnishings/Living Room Furniture
257
+ 488,/Home & Garden/Home Furnishings/Living Room Furniture/Sofas & Armchairs
258
+ 489,/Home & Garden/Home Furnishings/Outdoor Furniture
259
+ 490,/Home & Garden/Home Furnishings/Rugs & Carpets
260
+ 211,/Home & Garden/Home Improvement
261
+ 491,/Home & Garden/Home Improvement/Construction & Power Tools
262
+ 492,/Home & Garden/Home Improvement/Doors & Windows
263
+ 493,/Home & Garden/Home Improvement/Flooring
264
+ 494,/Home & Garden/Home Improvement/House Painting & Finishing
265
+ 495,/Home & Garden/Home Improvement/Locks & Locksmiths
266
+ 496,/Home & Garden/Home Improvement/Plumbing
267
+ 497,/Home & Garden/Home Improvement/Roofing
268
+ 212,/Home & Garden/Home Safety & Security
269
+ 498,/Home & Garden/Home Storage & Shelving
270
+ 499,/Home & Garden/Home Storage & Shelving/Cabinetry
271
+ 500,"/Home & Garden/Home Swimming Pools, Saunas & Spas"
272
+ 213,/Home & Garden/Household Supplies
273
+ 501,/Home & Garden/Household Supplies/Household Batteries
274
+ 502,/Home & Garden/Household Supplies/Household Cleaning Supplies
275
+ 503,/Home & Garden/HVAC & Climate Control
276
+ 504,/Home & Garden/HVAC & Climate Control/Air Conditioners
277
+ 505,/Home & Garden/HVAC & Climate Control/Fireplaces & Stoves
278
+ 506,/Home & Garden/HVAC & Climate Control/Household Fans
279
+ 507,/Home & Garden/Kitchen & Dining
280
+ 508,/Home & Garden/Kitchen & Dining/Cookware & Diningware
281
+ 509,/Home & Garden/Kitchen & Dining/Cookware & Diningware/Cookware
282
+ 510,/Home & Garden/Kitchen & Dining/Cookware & Diningware/Diningware
283
+ 511,/Home & Garden/Kitchen & Dining/Dishwashers
284
+ 512,/Home & Garden/Kitchen & Dining/Microwaves
285
+ 513,"/Home & Garden/Kitchen & Dining/Ranges, Cooktops & Ovens"
286
+ 514,/Home & Garden/Kitchen & Dining/Refrigerators & Freezers
287
+ 515,/Home & Garden/Kitchen & Dining/Small Kitchen Appliances
288
+ 516,/Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Blenders & Juicers
289
+ 517,/Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Coffee & Espresso Makers
290
+ 518,/Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Food Mixers
291
+ 519,"/Home & Garden/Patio, Lawn & Garden"
292
+ 520,"/Home & Garden/Patio, Lawn & Garden/Barbecues & Grills"
293
+ 208,"/Home & Garden/Patio, Lawn & Garden/Gardening"
294
+ 214,"/Home & Garden/Patio, Lawn & Garden/Landscape Design"
295
+ 521,"/Home & Garden/Patio, Lawn & Garden/Yard Maintenance"
296
+ 522,"/Home & Garden/Patio, Lawn & Garden/Yard Maintenance/Lawn Mowers"
297
+ 523,/Home & Garden/Pest Control
298
+ 524,/Home & Garden/Washers & Dryers
299
+ 215,/Internet & Telecom
300
+ 525,/Internet & Telecom/Communications Equipment
301
+ 526,/Internet & Telecom/Communications Equipment/Radio Equipment
302
+ 527,/Internet & Telecom/Mobile & Wireless Accessories
303
+ 528,/Internet & Telecom/Mobile Phones
304
+ 529,/Internet & Telecom/Mobile Phones/Mobile Phone Repair & Services
305
+ 530,/Internet & Telecom/Service Providers
306
+ 531,/Internet & Telecom/Service Providers/Cable & Satellite Providers
307
+ 217,/Internet & Telecom/Service Providers/ISPs
308
+ 218,/Internet & Telecom/Service Providers/Phone Service Providers
309
+ 532,/Internet & Telecom/Voice & Video Chat
310
+ 533,/Internet & Telecom/Web Services
311
+ 534,/Internet & Telecom/Web Services/Cloud Storage
312
+ 535,/Internet & Telecom/Web Services/Search Engine Optimization & Marketing
313
+ 224,/Internet & Telecom/Web Services/Web Design & Development
314
+ 536,/Internet & Telecom/Web Services/Web Hosting & Domain Registration
315
+ 226,/Jobs & Education
316
+ 227,/Jobs & Education/Education
317
+ 537,/Jobs & Education/Education/Business Education
318
+ 229,/Jobs & Education/Education/Colleges & Universities
319
+ 538,/Jobs & Education/Education/Computer Education
320
+ 230,/Jobs & Education/Education/Distance Learning
321
+ 231,/Jobs & Education/Education/Early Childhood Education
322
+ 277,/Jobs & Education/Education/Foreign Language Study
323
+ 539,/Jobs & Education/Education/Health Education & Medical Training
324
+ 233,/Jobs & Education/Education/Homeschooling
325
+ 540,/Jobs & Education/Education/Legal Education
326
+ 541,/Jobs & Education/Education/Open Online Courses
327
+ 542,/Jobs & Education/Education/Primary & Secondary Schooling (K-12)
328
+ 543,/Jobs & Education/Education/Private Tutoring Services
329
+ 544,/Jobs & Education/Education/School Supplies & Classroom Equipment
330
+ 234,/Jobs & Education/Education/Standardized & Admissions Tests
331
+ 545,/Jobs & Education/Education/Study Abroad
332
+ 546,/Jobs & Education/Education/Visual Arts & Design Education
333
+ 547,/Jobs & Education/Internships
334
+ 236,/Jobs & Education/Jobs
335
+ 237,/Jobs & Education/Jobs/Career Resources & Planning
336
+ 238,/Jobs & Education/Jobs/Job Listings
337
+ 548,/Jobs & Education/Jobs/Job Listings/Accounting & Finance Jobs
338
+ 549,/Jobs & Education/Jobs/Job Listings/Clerical & Administrative Jobs
339
+ 550,/Jobs & Education/Jobs/Job Listings/Education Jobs
340
+ 551,/Jobs & Education/Jobs/Job Listings/Executive & Management Jobs
341
+ 552,/Jobs & Education/Jobs/Job Listings/Government & Public Sector Jobs
342
+ 553,/Jobs & Education/Jobs/Job Listings/Health & Medical Jobs
343
+ 554,/Jobs & Education/Jobs/Job Listings/IT & Technical Jobs
344
+ 555,/Jobs & Education/Jobs/Job Listings/Legal Jobs
345
+ 556,/Jobs & Education/Jobs/Job Listings/Retail Jobs
346
+ 557,/Jobs & Education/Jobs/Job Listings/Sales & Marketing Jobs
347
+ 558,/Jobs & Education/Jobs/Job Listings/Temporary & Seasonal Jobs
348
+ 559,/Jobs & Education/Jobs/Resumes & Portfolios
349
+ 239,/Law & Government
350
+ 560,/Law & Government/Labor & Employment Law
351
+ 242,/Law & Government/Legal Services
352
+ 243,/News
353
+ 561,/News/Business News
354
+ 245,/News/Local News
355
+ 247,/News/Politics
356
+ 249,/News/World News
357
+ 250,/Online Communities
358
+ 253,/Online Communities/Social Networks
359
+ 254,/People & Society
360
+ 562,/People & Society/Charity & Philanthropy
361
+ 258,/People & Society/Parenting
362
+ 259,/People & Society/Parenting/Adoption
363
+ 260,/People & Society/Parenting/Babies & Toddlers
364
+ 563,/People & Society/Parenting/Child Care
365
+ 263,/Pets & Animals
366
+ 264,/Pets & Animals/Pet Food & Pet Care Supplies
367
+ 265,/Pets & Animals/Pets
368
+ 267,/Pets & Animals/Pets/Cats
369
+ 268,/Pets & Animals/Pets/Dogs
370
+ 272,/Real Estate
371
+ 564,/Real Estate/Property Development
372
+ 565,/Real Estate/Real Estate Listings
373
+ 566,/Real Estate/Real Estate Listings/Commercial Properties
374
+ 567,/Real Estate/Real Estate Listings/Residential Rentals
375
+ 568,/Real Estate/Real Estate Listings/Residential Rentals/Furnished Rentals
376
+ 569,/Real Estate/Real Estate Listings/Residential Sales
377
+ 570,/Real Estate/Real Estate Services
378
+ 571,/Real Estate/Real Estate Services/Property Inspections & Appraisals
379
+ 289,/Shopping
380
+ 572,/Shopping/Apparel
381
+ 573,/Shopping/Apparel/Apparel Services
382
+ 574,/Shopping/Apparel/Athletic Apparel
383
+ 575,/Shopping/Apparel/Casual Apparel
384
+ 576,/Shopping/Apparel/Casual Apparel/T-Shirts
385
+ 291,/Shopping/Apparel/Children's Clothing
386
+ 577,/Shopping/Apparel/Clothing Accessories
387
+ 578,/Shopping/Apparel/Clothing Accessories/Gems & Jewelry
388
+ 579,/Shopping/Apparel/Clothing Accessories/Gems & Jewelry/Rings
389
+ 580,/Shopping/Apparel/Clothing Accessories/Handbags & Purses
390
+ 581,/Shopping/Apparel/Clothing Accessories/Socks & Hosiery
391
+ 582,/Shopping/Apparel/Clothing Accessories/Watches
392
+ 294,/Shopping/Apparel/Costumes
393
+ 583,/Shopping/Apparel/Eyewear
394
+ 584,/Shopping/Apparel/Eyewear/Sunglasses
395
+ 585,/Shopping/Apparel/Footwear
396
+ 586,/Shopping/Apparel/Footwear/Athletic Shoes
397
+ 587,/Shopping/Apparel/Footwear/Boots
398
+ 588,/Shopping/Apparel/Footwear/Casual Shoes
399
+ 589,/Shopping/Apparel/Formal Wear
400
+ 590,/Shopping/Apparel/Headwear
401
+ 296,/Shopping/Apparel/Men's Clothing
402
+ 591,/Shopping/Apparel/Outerwear
403
+ 592,/Shopping/Apparel/Pants & Shorts
404
+ 593,/Shopping/Apparel/Shirts & Tops
405
+ 594,/Shopping/Apparel/Sleepwear
406
+ 595,/Shopping/Apparel/Suits & Business Attire
407
+ 596,/Shopping/Apparel/Swimwear
408
+ 597,/Shopping/Apparel/Undergarments
409
+ 598,/Shopping/Apparel/Uniforms & Workwear
410
+ 298,/Shopping/Apparel/Women's Clothing
411
+ 599,/Shopping/Apparel/Women's Clothing/Dresses
412
+ 600,/Shopping/Apparel/Women's Clothing/Skirts
413
+ 293,/Shopping/Coupons & Discount Offers
414
+ 601,/Shopping/Gifts & Special Event Items
415
+ 295,/Shopping/Gifts & Special Event Items/Flowers
416
+ 297,/Shopping/Gifts & Special Event Items/Party & Holiday Supplies
417
+ 602,/Shopping/Luxury Goods
418
+ 603,/Shopping/Mass Merchants & Department Stores
419
+ 604,/Shopping/Photo & Video Services
420
+ 605,/Shopping/Photo & Video Services/Event & Studio Photography
421
+ 606,/Shopping/Photo & Video Services/Photo Printing Services
422
+ 607,/Shopping/Product Reviews & Price Comparisons
423
+ 608,/Shopping/Toys
424
+ 299,/Sports
425
+ 300,/Sports/American Football
426
+ 301,/Sports/Australian Football
427
+ 303,/Sports/Baseball
428
+ 304,/Sports/Basketball
429
+ 609,/Sports/Combat Sports
430
+ 309,/Sports/Cricket
431
+ 310,/Sports/Cycling
432
+ 315,/Sports/Golf
433
+ 317,/Sports/Hockey
434
+ 610,/Sports/Motor Sports
435
+ 321,/Sports/Olympics
436
+ 322,/Sports/Rugby
437
+ 323,/Sports/Running & Walking
438
+ 325,/Sports/Soccer
439
+ 611,/Sports/Sporting Goods
440
+ 612,/Sports/Sporting Goods/Baseball & Softball Equipment
441
+ 613,/Sports/Sporting Goods/Golf Equipment
442
+ 614,/Sports/Sporting Goods/Hockey Equipment
443
+ 615,/Sports/Sporting Goods/Skateboarding Equipment
444
+ 616,/Sports/Sporting Goods/Soccer Equipment
445
+ 617,/Sports/Sporting Goods/Squash & Racquetball Equipment
446
+ 618,/Sports/Sporting Goods/Water Sports Equipment
447
+ 619,/Sports/Sporting Goods/Winter Sports Equipment
448
+ 328,/Sports/Tennis
449
+ 620,/Sports/Water Sports
450
+ 327,/Sports/Water Sports/Swimming
451
+ 621,/Sports/Winter Sports
452
+ 324,/Sports/Winter Sports/Skiing & Snowboarding
453
+ 332,/Travel & Transportation
454
+ 334,/Travel & Transportation/Air Travel
455
+ 345,/Travel & Transportation/Beaches & Islands
456
+ 335,/Travel & Transportation/Business Travel
457
+ 336,/Travel & Transportation/Car Rentals
458
+ 337,/Travel & Transportation/Cruises & Charters
459
+ 338,/Travel & Transportation/Family Travel
460
+ 340,/Travel & Transportation/Hotels & Accommodations
461
+ 622,/Travel & Transportation/Hotels & Accommodations/Vacation Rentals & Short-Term Stays
462
+ 341,/Travel & Transportation/Long Distance Bus & Rail
463
+ 343,/Travel & Transportation/Luggage & Travel Accessories
464
+ 623,/Travel & Transportation/Luggage & Travel Accessories/Backpacks & Utility Bags
465
+ 624,/Travel & Transportation/Luxury Travel
466
+ 625,/Travel & Transportation/Mountain & Ski Resorts
467
+ 626,/Travel & Transportation/Travel Agencies & Services
468
+ 627,/Travel & Transportation/Travel Agencies & Services/Guided Tours & Escorted Vacations
469
+ 628,/Travel & Transportation/Travel Agencies & Services/Sightseeing Tours
470
+ 629,/Travel & Transportation/Travel Agencies & Services/Vacation Offers
taxonomy_v2.md ADDED
@@ -0,0 +1,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ | ID | Topic |
2
+ | --- | -------------------------------------------------------------------------------------------------------- |
3
+ | 1 | /Arts & Entertainment |
4
+ | 350 | /Arts & Entertainment/Celebrities & Entertainment News |
5
+ | 351 | /Arts & Entertainment/Comics & Animation |
6
+ | 352 | /Arts & Entertainment/Events & Listings |
7
+ | 353 | /Arts & Entertainment/Events & Listings/Bars, Clubs & Nightlife |
8
+ | 4 | /Arts & Entertainment/Events & Listings/Concerts & Music Festivals |
9
+ | 354 | /Arts & Entertainment/Events & Listings/Event Ticket Sales |
10
+ | 355 | /Arts & Entertainment/Events & Listings/Expos & Conventions |
11
+ | 356 | /Arts & Entertainment/Events & Listings/Film Festivals |
12
+ | 357 | /Arts & Entertainment/Events & Listings/Food & Beverage Events |
13
+ | 9 | /Arts & Entertainment/Events & Listings/Live Sporting Events |
14
+ | 12 | /Arts & Entertainment/Movies |
15
+ | 13 | /Arts & Entertainment/Movies/Action & Adventure Films |
16
+ | 15 | /Arts & Entertainment/Movies/Comedy Films |
17
+ | 18 | /Arts & Entertainment/Movies/Drama Films |
18
+ | 19 | /Arts & Entertainment/Movies/Family Films |
19
+ | 20 | /Arts & Entertainment/Movies/Horror Films |
20
+ | 21 | /Arts & Entertainment/Movies/Romance Films |
21
+ | 358 | /Arts & Entertainment/Movies/Science Fiction & Fantasy Films |
22
+ | 23 | /Arts & Entertainment/Music & Audio |
23
+ | 24 | /Arts & Entertainment/Music & Audio/Blues |
24
+ | 25 | /Arts & Entertainment/Music & Audio/Classical Music |
25
+ | 26 | /Arts & Entertainment/Music & Audio/Country Music |
26
+ | 27 | /Arts & Entertainment/Music & Audio/Dance & Electronic Music |
27
+ | 359 | /Arts & Entertainment/Music & Audio/DJ Resources & Equipment |
28
+ | 28 | /Arts & Entertainment/Music & Audio/Folk & Traditional Music |
29
+ | 29 | /Arts & Entertainment/Music & Audio/Jazz |
30
+ | 30 | /Arts & Entertainment/Music & Audio/Musical Instruments |
31
+ | 31 | /Arts & Entertainment/Music & Audio/Pop Music |
32
+ | 32 | /Arts & Entertainment/Music & Audio/Rap & Hip-Hop |
33
+ | 33 | /Arts & Entertainment/Music & Audio/Rock Music |
34
+ | 36 | /Arts & Entertainment/Music & Audio/Rock Music/Indie & Alternative Music |
35
+ | 360 | /Arts & Entertainment/Music & Audio/Rock Music/Metal (Music) |
36
+ | 361 | /Arts & Entertainment/Performing Arts |
37
+ | 362 | /Arts & Entertainment/Performing Arts/Broadway & Musical Theater |
38
+ | 363 | /Arts & Entertainment/TV & Video |
39
+ | 364 | /Arts & Entertainment/TV & Video/Live Video Streaming |
40
+ | 365 | /Arts & Entertainment/TV & Video/Movie & TV Streaming |
41
+ | 46 | /Arts & Entertainment/TV & Video/TV Comedies |
42
+ | 47 | /Arts & Entertainment/TV & Video/TV Documentary & Nonfiction |
43
+ | 48 | /Arts & Entertainment/TV & Video/TV Dramas |
44
+ | 50 | /Arts & Entertainment/TV & Video/TV Family-Oriented Shows |
45
+ | 366 | /Arts & Entertainment/TV & Video/TV Game Shows |
46
+ | 51 | /Arts & Entertainment/TV & Video/TV Reality Shows |
47
+ | 52 | /Arts & Entertainment/TV & Video/TV Sci-Fi & Fantasy Shows |
48
+ | 367 | /Arts & Entertainment/TV & Video/TV Talk Shows |
49
+ | 53 | /Arts & Entertainment/Visual Art & Design |
50
+ | 368 | /Arts & Entertainment/Visual Art & Design/Architecture |
51
+ | 56 | /Arts & Entertainment/Visual Art & Design/Photographic & Digital Arts |
52
+ | 57 | /Autos & Vehicles |
53
+ | 369 | /Autos & Vehicles/Bicycles & Accessories |
54
+ | 370 | /Autos & Vehicles/Boats & Watercraft |
55
+ | 371 | /Autos & Vehicles/Campers & RVs |
56
+ | 59 | /Autos & Vehicles/Classic Vehicles |
57
+ | 372 | /Autos & Vehicles/Commercial Vehicles |
58
+ | 60 | /Autos & Vehicles/Custom & Performance Vehicles |
59
+ | 62 | /Autos & Vehicles/Motor Vehicles (By Type) |
60
+ | 63 | /Autos & Vehicles/Motor Vehicles (By Type)/Autonomous Vehicles |
61
+ | 373 | /Autos & Vehicles/Motor Vehicles (By Type)/Compact Cars |
62
+ | 64 | /Autos & Vehicles/Motor Vehicles (By Type)/Convertibles |
63
+ | 65 | /Autos & Vehicles/Motor Vehicles (By Type)/Coupes |
64
+ | 374 | /Autos & Vehicles/Motor Vehicles (By Type)/Diesel Vehicles |
65
+ | 66 | /Autos & Vehicles/Motor Vehicles (By Type)/Hatchbacks |
66
+ | 67 | /Autos & Vehicles/Motor Vehicles (By Type)/Hybrid & Alternative Vehicles |
67
+ | 375 | /Autos & Vehicles/Motor Vehicles (By Type)/Hybrid & Alternative Vehicles/Electric & Plug-In Vehicles |
68
+ | 68 | /Autos & Vehicles/Motor Vehicles (By Type)/Luxury Vehicles |
69
+ | 69 | /Autos & Vehicles/Motor Vehicles (By Type)/Microcars & Subcompacts |
70
+ | 70 | /Autos & Vehicles/Motor Vehicles (By Type)/Motorcycles |
71
+ | 71 | /Autos & Vehicles/Motor Vehicles (By Type)/Off-Road Vehicles |
72
+ | 73 | /Autos & Vehicles/Motor Vehicles (By Type)/Scooters & Mopeds |
73
+ | 74 | /Autos & Vehicles/Motor Vehicles (By Type)/Sedans |
74
+ | 376 | /Autos & Vehicles/Motor Vehicles (By Type)/Sports Cars |
75
+ | 75 | /Autos & Vehicles/Motor Vehicles (By Type)/Station Wagons |
76
+ | 377 | /Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs |
77
+ | 72 | /Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/Pickup Trucks |
78
+ | 76 | /Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/SUVs & Crossovers |
79
+ | 78 | /Autos & Vehicles/Motor Vehicles (By Type)/Trucks, Vans & SUVs/Vans & Minivans |
80
+ | 81 | /Autos & Vehicles/Vehicle Parts & Accessories |
81
+ | 378 | /Autos & Vehicles/Vehicle Parts & Accessories/High Performance & Aftermarket Auto Parts |
82
+ | 379 | /Autos & Vehicles/Vehicle Parts & Accessories/Vehicle Wheels & Tires |
83
+ | 82 | /Autos & Vehicles/Vehicle Repair & Maintenance |
84
+ | 83 | /Autos & Vehicles/Vehicle Shopping |
85
+ | 84 | /Autos & Vehicles/Vehicle Shopping/Used Vehicles |
86
+ | 86 | /Beauty & Fitness |
87
+ | 380 | /Beauty & Fitness/Beauty Services & Spas |
88
+ | 381 | /Beauty & Fitness/Beauty Services & Spas/Manicures & Pedicures |
89
+ | 382 | /Beauty & Fitness/Cosmetology & Beauty Professionals |
90
+ | 88 | /Beauty & Fitness/Face & Body Care |
91
+ | 91 | /Beauty & Fitness/Face & Body Care/Clean Beauty |
92
+ | 383 | /Beauty & Fitness/Face & Body Care/Hygiene & Toiletries |
93
+ | 89 | /Beauty & Fitness/Face & Body Care/Hygiene & Toiletries/Antiperspirants, Deodorants & Body Sprays |
94
+ | 384 | /Beauty & Fitness/Face & Body Care/Hygiene & Toiletries/Feminine Hygiene Products |
95
+ | 92 | /Beauty & Fitness/Face & Body Care/Make-Up & Cosmetics |
96
+ | 94 | /Beauty & Fitness/Face & Body Care/Perfumes & Fragrances |
97
+ | 385 | /Beauty & Fitness/Face & Body Care/Skin & Nail Care |
98
+ | 90 | /Beauty & Fitness/Face & Body Care/Skin & Nail Care/Bath & Body Products |
99
+ | 386 | /Beauty & Fitness/Face & Body Care/Skin & Nail Care/Face Care Products |
100
+ | 93 | /Beauty & Fitness/Face & Body Care/Skin & Nail Care/Nail Care Products |
101
+ | 387 | /Beauty & Fitness/Face & Body Care/Sun Care & Tanning Products |
102
+ | 388 | /Beauty & Fitness/Face & Body Care/Unwanted Body & Facial Hair Removal |
103
+ | 95 | /Beauty & Fitness/Face & Body Care/Unwanted Body & Facial Hair Removal/Razors & Shavers |
104
+ | 96 | /Beauty & Fitness/Fashion & Style |
105
+ | 97 | /Beauty & Fitness/Fitness |
106
+ | 389 | /Beauty & Fitness/Fitness/Fitness Equipment & Accessories |
107
+ | 390 | /Beauty & Fitness/Fitness/Fitness Equipment & Accessories/Fitness Technology Products |
108
+ | 391 | /Beauty & Fitness/Fitness/Fitness Instruction & Personal Training |
109
+ | 392 | /Beauty & Fitness/Fitness/Gyms & Health Clubs |
110
+ | 393 | /Beauty & Fitness/Fitness/High Intensity Interval Training |
111
+ | 394 | /Beauty & Fitness/Fitness/Yoga & Pilates |
112
+ | 99 | /Beauty & Fitness/Hair Care |
113
+ | 395 | /Beauty & Fitness/Hair Care/Shampoos & Conditioners |
114
+ | 100 | /Books & Literature |
115
+ | 396 | /Books & Literature/Audiobooks |
116
+ | 397 | /Books & Literature/Book Retailers |
117
+ | 101 | /Books & Literature/Children's Literature |
118
+ | 398 | /Books & Literature/Fan Fiction |
119
+ | 399 | /Books & Literature/Literary Classics |
120
+ | 400 | /Books & Literature/Magazines |
121
+ | 102 | /Books & Literature/Poetry |
122
+ | 401 | /Books & Literature/Writers Resources |
123
+ | 103 | /Business & Industrial |
124
+ | 104 | /Business & Industrial/Advertising & Marketing |
125
+ | 402 | /Business & Industrial/Building Materials & Supplies |
126
+ | 403 | /Business & Industrial/Business Finance |
127
+ | 113 | /Business & Industrial/Business Finance/Commercial Lending |
128
+ | 404 | /Business & Industrial/Business Services |
129
+ | 405 | /Business & Industrial/Business Services/Corporate Events |
130
+ | 406 | /Business & Industrial/Business Services/Fire & Security Services |
131
+ | 407 | /Business & Industrial/Business Services/Merchant Services & Payment Systems |
132
+ | 408 | /Business & Industrial/Business Services/Office Supplies |
133
+ | 409 | /Business & Industrial/Business Services/Office Supplies/Office Furniture |
134
+ | 410 | /Business & Industrial/Business Services/Signage |
135
+ | 411 | /Business & Industrial/Construction Consulting & Contracting |
136
+ | 412 | /Business & Industrial/Document & Printing Services |
137
+ | 413 | /Business & Industrial/Event Planning |
138
+ | 414 | /Business & Industrial/Food Service |
139
+ | 415 | /Business & Industrial/Industrial Materials & Equipment |
140
+ | 416 | /Business & Industrial/Industrial Materials & Equipment/Work Safety Protective Gear |
141
+ | 417 | /Business & Industrial/Moving & Relocation |
142
+ | 418 | /Business & Industrial/Payroll Services |
143
+ | 419 | /Business & Industrial/Recruitment & Staffing |
144
+ | 126 | /Computers & Electronics |
145
+ | 420 | /Computers & Electronics/Computer Hardware |
146
+ | 421 | /Computers & Electronics/Computer Hardware/Computer Components |
147
+ | 422 | /Computers & Electronics/Computer Hardware/Computer Drives & Storage |
148
+ | 128 | /Computers & Electronics/Computer Hardware/Computer Peripherals |
149
+ | 134 | /Computers & Electronics/Computer Hardware/Desktop Computers |
150
+ | 135 | /Computers & Electronics/Computer Hardware/Laptops & Notebooks |
151
+ | 423 | /Computers & Electronics/Computer Security |
152
+ | 129 | /Computers & Electronics/Consumer Electronics |
153
+ | 424 | /Computers & Electronics/Consumer Electronics/Audio Equipment |
154
+ | 425 | /Computers & Electronics/Consumer Electronics/Audio Equipment/Headphones |
155
+ | 426 | /Computers & Electronics/Consumer Electronics/Audio Equipment/Speakers |
156
+ | 427 | /Computers & Electronics/Consumer Electronics/Audio Equipment/Stereo Systems & Components |
157
+ | 428 | /Computers & Electronics/Consumer Electronics/Camera & Photo Equipment |
158
+ | 429 | /Computers & Electronics/Consumer Electronics/Car Audio |
159
+ | 430 | /Computers & Electronics/Consumer Electronics/Gadgets & Portable Electronics |
160
+ | 431 | /Computers & Electronics/Consumer Electronics/Game Systems & Consoles |
161
+ | 432 | /Computers & Electronics/Consumer Electronics/Game Systems & Consoles/Handheld Game Consoles |
162
+ | 131 | /Computers & Electronics/Consumer Electronics/Home Automation |
163
+ | 132 | /Computers & Electronics/Consumer Electronics/Home Theater Systems |
164
+ | 433 | /Computers & Electronics/Consumer Electronics/Televisions |
165
+ | 434 | /Computers & Electronics/Electronics & Electrical |
166
+ | 435 | /Computers & Electronics/Electronics & Electrical/Power Supplies |
167
+ | 436 | /Computers & Electronics/Enterprise Technology |
168
+ | 137 | /Computers & Electronics/Networking |
169
+ | 437 | /Computers & Electronics/Networking/Network Monitoring & Management |
170
+ | 438 | /Computers & Electronics/Networking/Networking Equipment |
171
+ | 140 | /Computers & Electronics/Software |
172
+ | 439 | /Computers & Electronics/Software/Business & Productivity Software |
173
+ | 440 | /Computers & Electronics/Software/Business & Productivity Software/Accounting & Financial Software |
174
+ | 441 | /Computers & Electronics/Software/Business & Productivity Software/Collaboration & Conferencing Software |
175
+ | 442 | /Computers & Electronics/Software/Multimedia Software |
176
+ | 141 | /Computers & Electronics/Software/Multimedia Software/Audio & Music Software |
177
+ | 144 | /Computers & Electronics/Software/Multimedia Software/Graphics & Animation Software |
178
+ | 443 | /Computers & Electronics/Software/Multimedia Software/Photo & Video Software |
179
+ | 149 | /Finance |
180
+ | 150 | /Finance/Accounting & Auditing |
181
+ | 151 | /Finance/Accounting & Auditing/Tax Preparation & Planning |
182
+ | 444 | /Finance/Banking |
183
+ | 445 | /Finance/Banking/Debit & Checking Services |
184
+ | 446 | /Finance/Banking/Savings Accounts |
185
+ | 447 | /Finance/Credit & Lending |
186
+ | 448 | /Finance/Credit & Lending/Auto Financing |
187
+ | 152 | /Finance/Credit & Lending/Credit Cards |
188
+ | 449 | /Finance/Credit & Lending/Credit Reporting & Monitoring |
189
+ | 157 | /Finance/Credit & Lending/Home Financing |
190
+ | 170 | /Finance/Credit & Lending/Personal Loans |
191
+ | 171 | /Finance/Credit & Lending/Student Loans & College Financing |
192
+ | 153 | /Finance/Financial Planning & Management |
193
+ | 154 | /Finance/Financial Planning & Management/Retirement & Pension |
194
+ | 158 | /Finance/Insurance |
195
+ | 159 | /Finance/Insurance/Auto Insurance |
196
+ | 160 | /Finance/Insurance/Health Insurance |
197
+ | 161 | /Finance/Insurance/Home Insurance |
198
+ | 162 | /Finance/Insurance/Life Insurance |
199
+ | 163 | /Finance/Insurance/Travel Insurance |
200
+ | 164 | /Finance/Investing |
201
+ | 172 | /Food & Drink |
202
+ | 173 | /Food & Drink/Cooking & Recipes |
203
+ | 176 | /Food & Drink/Cooking & Recipes/Vegetarian Cuisine |
204
+ | 177 | /Food & Drink/Cooking & Recipes/Vegetarian Cuisine/Vegan Cuisine |
205
+ | 450 | /Food & Drink/Food |
206
+ | 451 | /Food & Drink/Food/Baked Goods |
207
+ | 452 | /Food & Drink/Food/Breakfast Foods |
208
+ | 453 | /Food & Drink/Food/Candy & Sweets |
209
+ | 454 | /Food & Drink/Food/Condiments & Dressings |
210
+ | 455 | /Food & Drink/Food/Dairy & Eggs |
211
+ | 456 | /Food & Drink/Food/Gourmet & Specialty Foods |
212
+ | 457 | /Food & Drink/Food/Meat & Seafood |
213
+ | 458 | /Food & Drink/Food/Meat & Seafood/Fish & Seafood |
214
+ | 459 | /Food & Drink/Food/Organic & Natural Foods |
215
+ | 460 | /Food & Drink/Grocery Delivery Services |
216
+ | 461 | /Food & Drink/Restaurant Delivery Services |
217
+ | 462 | /Food & Drink/Restaurants |
218
+ | 463 | /Food & Drink/Restaurants/Fast Food |
219
+ | 464 | /Food & Drink/Restaurants/Pizzerias |
220
+ | 180 | /Games |
221
+ | 465 | /Games/Board Games |
222
+ | 183 | /Games/Computer & Video Games |
223
+ | 184 | /Games/Computer & Video Games/Action & Platform Games |
224
+ | 185 | /Games/Computer & Video Games/Adventure Games |
225
+ | 186 | /Games/Computer & Video Games/Casual Games |
226
+ | 187 | /Games/Computer & Video Games/Competitive Video Gaming |
227
+ | 466 | /Games/Computer & Video Games/Driving & Racing Games |
228
+ | 467 | /Games/Computer & Video Games/Shooter Games |
229
+ | 191 | /Games/Computer & Video Games/Sports Games |
230
+ | 192 | /Games/Computer & Video Games/Strategy Games |
231
+ | 468 | /Games/Family-Oriented Games & Activities |
232
+ | 194 | /Games/Roleplaying Games |
233
+ | 196 | /Hobbies & Leisure |
234
+ | 469 | /Hobbies & Leisure/Art & Craft Supplies |
235
+ | 470 | /Hobbies & Leisure/Boating |
236
+ | 471 | /Hobbies & Leisure/Holidays & Seasonal Events |
237
+ | 201 | /Hobbies & Leisure/Outdoors |
238
+ | 202 | /Hobbies & Leisure/Outdoors/Fishing |
239
+ | 472 | /Hobbies & Leisure/Outdoors/Hiking & Camping |
240
+ | 207 | /Home & Garden |
241
+ | 473 | /Home & Garden/Bed & Bath |
242
+ | 474 | /Home & Garden/Bed & Bath/Bathroom |
243
+ | 475 | /Home & Garden/Bed & Bath/Bedroom |
244
+ | 476 | /Home & Garden/Bed & Bath/Bedroom/Bedding & Bed Linens |
245
+ | 477 | /Home & Garden/Bed & Bath/Bedroom/Beds & Headboards |
246
+ | 478 | /Home & Garden/Bed & Bath/Bedroom/Mattresses |
247
+ | 479 | /Home & Garden/Cleaning Services |
248
+ | 209 | /Home & Garden/Home & Interior Decor |
249
+ | 210 | /Home & Garden/Home Appliances |
250
+ | 480 | /Home & Garden/Home Appliances/Vacuums & Floor Care |
251
+ | 481 | /Home & Garden/Home Appliances/Water Filters & Purifiers |
252
+ | 482 | /Home & Garden/Home Furnishings |
253
+ | 483 | /Home & Garden/Home Furnishings/Countertops |
254
+ | 484 | /Home & Garden/Home Furnishings/Curtains & Window Treatments |
255
+ | 485 | /Home & Garden/Home Furnishings/Kitchen & Dining Furniture |
256
+ | 486 | /Home & Garden/Home Furnishings/Lamps & Lighting |
257
+ | 487 | /Home & Garden/Home Furnishings/Living Room Furniture |
258
+ | 488 | /Home & Garden/Home Furnishings/Living Room Furniture/Sofas & Armchairs |
259
+ | 489 | /Home & Garden/Home Furnishings/Outdoor Furniture |
260
+ | 490 | /Home & Garden/Home Furnishings/Rugs & Carpets |
261
+ | 211 | /Home & Garden/Home Improvement |
262
+ | 491 | /Home & Garden/Home Improvement/Construction & Power Tools |
263
+ | 492 | /Home & Garden/Home Improvement/Doors & Windows |
264
+ | 493 | /Home & Garden/Home Improvement/Flooring |
265
+ | 494 | /Home & Garden/Home Improvement/House Painting & Finishing |
266
+ | 495 | /Home & Garden/Home Improvement/Locks & Locksmiths |
267
+ | 496 | /Home & Garden/Home Improvement/Plumbing |
268
+ | 497 | /Home & Garden/Home Improvement/Roofing |
269
+ | 212 | /Home & Garden/Home Safety & Security |
270
+ | 498 | /Home & Garden/Home Storage & Shelving |
271
+ | 499 | /Home & Garden/Home Storage & Shelving/Cabinetry |
272
+ | 500 | /Home & Garden/Home Swimming Pools, Saunas & Spas |
273
+ | 213 | /Home & Garden/Household Supplies |
274
+ | 501 | /Home & Garden/Household Supplies/Household Batteries |
275
+ | 502 | /Home & Garden/Household Supplies/Household Cleaning Supplies |
276
+ | 503 | /Home & Garden/HVAC & Climate Control |
277
+ | 504 | /Home & Garden/HVAC & Climate Control/Air Conditioners |
278
+ | 505 | /Home & Garden/HVAC & Climate Control/Fireplaces & Stoves |
279
+ | 506 | /Home & Garden/HVAC & Climate Control/Household Fans |
280
+ | 507 | /Home & Garden/Kitchen & Dining |
281
+ | 508 | /Home & Garden/Kitchen & Dining/Cookware & Diningware |
282
+ | 509 | /Home & Garden/Kitchen & Dining/Cookware & Diningware/Cookware |
283
+ | 510 | /Home & Garden/Kitchen & Dining/Cookware & Diningware/Diningware |
284
+ | 511 | /Home & Garden/Kitchen & Dining/Dishwashers |
285
+ | 512 | /Home & Garden/Kitchen & Dining/Microwaves |
286
+ | 513 | /Home & Garden/Kitchen & Dining/Ranges, Cooktops & Ovens |
287
+ | 514 | /Home & Garden/Kitchen & Dining/Refrigerators & Freezers |
288
+ | 515 | /Home & Garden/Kitchen & Dining/Small Kitchen Appliances |
289
+ | 516 | /Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Blenders & Juicers |
290
+ | 517 | /Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Coffee & Espresso Makers |
291
+ | 518 | /Home & Garden/Kitchen & Dining/Small Kitchen Appliances/Food Mixers |
292
+ | 519 | /Home & Garden/Patio, Lawn & Garden |
293
+ | 520 | /Home & Garden/Patio, Lawn & Garden/Barbecues & Grills |
294
+ | 208 | /Home & Garden/Patio, Lawn & Garden/Gardening |
295
+ | 214 | /Home & Garden/Patio, Lawn & Garden/Landscape Design |
296
+ | 521 | /Home & Garden/Patio, Lawn & Garden/Yard Maintenance |
297
+ | 522 | /Home & Garden/Patio, Lawn & Garden/Yard Maintenance/Lawn Mowers |
298
+ | 523 | /Home & Garden/Pest Control |
299
+ | 524 | /Home & Garden/Washers & Dryers |
300
+ | 215 | /Internet & Telecom |
301
+ | 525 | /Internet & Telecom/Communications Equipment |
302
+ | 526 | /Internet & Telecom/Communications Equipment/Radio Equipment |
303
+ | 527 | /Internet & Telecom/Mobile & Wireless Accessories |
304
+ | 528 | /Internet & Telecom/Mobile Phones |
305
+ | 529 | /Internet & Telecom/Mobile Phones/Mobile Phone Repair & Services |
306
+ | 530 | /Internet & Telecom/Service Providers |
307
+ | 531 | /Internet & Telecom/Service Providers/Cable & Satellite Providers |
308
+ | 217 | /Internet & Telecom/Service Providers/ISPs |
309
+ | 218 | /Internet & Telecom/Service Providers/Phone Service Providers |
310
+ | 532 | /Internet & Telecom/Voice & Video Chat |
311
+ | 533 | /Internet & Telecom/Web Services |
312
+ | 534 | /Internet & Telecom/Web Services/Cloud Storage |
313
+ | 535 | /Internet & Telecom/Web Services/Search Engine Optimization & Marketing |
314
+ | 224 | /Internet & Telecom/Web Services/Web Design & Development |
315
+ | 536 | /Internet & Telecom/Web Services/Web Hosting & Domain Registration |
316
+ | 226 | /Jobs & Education |
317
+ | 227 | /Jobs & Education/Education |
318
+ | 537 | /Jobs & Education/Education/Business Education |
319
+ | 229 | /Jobs & Education/Education/Colleges & Universities |
320
+ | 538 | /Jobs & Education/Education/Computer Education |
321
+ | 230 | /Jobs & Education/Education/Distance Learning |
322
+ | 231 | /Jobs & Education/Education/Early Childhood Education |
323
+ | 277 | /Jobs & Education/Education/Foreign Language Study |
324
+ | 539 | /Jobs & Education/Education/Health Education & Medical Training |
325
+ | 233 | /Jobs & Education/Education/Homeschooling |
326
+ | 540 | /Jobs & Education/Education/Legal Education |
327
+ | 541 | /Jobs & Education/Education/Open Online Courses |
328
+ | 542 | /Jobs & Education/Education/Primary & Secondary Schooling (K-12) |
329
+ | 543 | /Jobs & Education/Education/Private Tutoring Services |
330
+ | 544 | /Jobs & Education/Education/School Supplies & Classroom Equipment |
331
+ | 234 | /Jobs & Education/Education/Standardized & Admissions Tests |
332
+ | 545 | /Jobs & Education/Education/Study Abroad |
333
+ | 546 | /Jobs & Education/Education/Visual Arts & Design Education |
334
+ | 547 | /Jobs & Education/Internships |
335
+ | 236 | /Jobs & Education/Jobs |
336
+ | 237 | /Jobs & Education/Jobs/Career Resources & Planning |
337
+ | 238 | /Jobs & Education/Jobs/Job Listings |
338
+ | 548 | /Jobs & Education/Jobs/Job Listings/Accounting & Finance Jobs |
339
+ | 549 | /Jobs & Education/Jobs/Job Listings/Clerical & Administrative Jobs |
340
+ | 550 | /Jobs & Education/Jobs/Job Listings/Education Jobs |
341
+ | 551 | /Jobs & Education/Jobs/Job Listings/Executive & Management Jobs |
342
+ | 552 | /Jobs & Education/Jobs/Job Listings/Government & Public Sector Jobs |
343
+ | 553 | /Jobs & Education/Jobs/Job Listings/Health & Medical Jobs |
344
+ | 554 | /Jobs & Education/Jobs/Job Listings/IT & Technical Jobs |
345
+ | 555 | /Jobs & Education/Jobs/Job Listings/Legal Jobs |
346
+ | 556 | /Jobs & Education/Jobs/Job Listings/Retail Jobs |
347
+ | 557 | /Jobs & Education/Jobs/Job Listings/Sales & Marketing Jobs |
348
+ | 558 | /Jobs & Education/Jobs/Job Listings/Temporary & Seasonal Jobs |
349
+ | 559 | /Jobs & Education/Jobs/Resumes & Portfolios |
350
+ | 239 | /Law & Government |
351
+ | 560 | /Law & Government/Labor & Employment Law |
352
+ | 242 | /Law & Government/Legal Services |
353
+ | 243 | /News |
354
+ | 561 | /News/Business News |
355
+ | 245 | /News/Local News |
356
+ | 247 | /News/Politics |
357
+ | 249 | /News/World News |
358
+ | 250 | /Online Communities |
359
+ | 253 | /Online Communities/Social Networks |
360
+ | 254 | /People & Society |
361
+ | 562 | /People & Society/Charity & Philanthropy |
362
+ | 258 | /People & Society/Parenting |
363
+ | 259 | /People & Society/Parenting/Adoption |
364
+ | 260 | /People & Society/Parenting/Babies & Toddlers |
365
+ | 563 | /People & Society/Parenting/Child Care |
366
+ | 263 | /Pets & Animals |
367
+ | 264 | /Pets & Animals/Pet Food & Pet Care Supplies |
368
+ | 265 | /Pets & Animals/Pets |
369
+ | 267 | /Pets & Animals/Pets/Cats |
370
+ | 268 | /Pets & Animals/Pets/Dogs |
371
+ | 272 | /Real Estate |
372
+ | 564 | /Real Estate/Property Development |
373
+ | 565 | /Real Estate/Real Estate Listings |
374
+ | 566 | /Real Estate/Real Estate Listings/Commercial Properties |
375
+ | 567 | /Real Estate/Real Estate Listings/Residential Rentals |
376
+ | 568 | /Real Estate/Real Estate Listings/Residential Rentals/Furnished Rentals |
377
+ | 569 | /Real Estate/Real Estate Listings/Residential Sales |
378
+ | 570 | /Real Estate/Real Estate Services |
379
+ | 571 | /Real Estate/Real Estate Services/Property Inspections & Appraisals |
380
+ | 289 | /Shopping |
381
+ | 572 | /Shopping/Apparel |
382
+ | 573 | /Shopping/Apparel/Apparel Services |
383
+ | 574 | /Shopping/Apparel/Athletic Apparel |
384
+ | 575 | /Shopping/Apparel/Casual Apparel |
385
+ | 576 | /Shopping/Apparel/Casual Apparel/T-Shirts |
386
+ | 291 | /Shopping/Apparel/Children's Clothing |
387
+ | 577 | /Shopping/Apparel/Clothing Accessories |
388
+ | 578 | /Shopping/Apparel/Clothing Accessories/Gems & Jewelry |
389
+ | 579 | /Shopping/Apparel/Clothing Accessories/Gems & Jewelry/Rings |
390
+ | 580 | /Shopping/Apparel/Clothing Accessories/Handbags & Purses |
391
+ | 581 | /Shopping/Apparel/Clothing Accessories/Socks & Hosiery |
392
+ | 582 | /Shopping/Apparel/Clothing Accessories/Watches |
393
+ | 294 | /Shopping/Apparel/Costumes |
394
+ | 583 | /Shopping/Apparel/Eyewear |
395
+ | 584 | /Shopping/Apparel/Eyewear/Sunglasses |
396
+ | 585 | /Shopping/Apparel/Footwear |
397
+ | 586 | /Shopping/Apparel/Footwear/Athletic Shoes |
398
+ | 587 | /Shopping/Apparel/Footwear/Boots |
399
+ | 588 | /Shopping/Apparel/Footwear/Casual Shoes |
400
+ | 589 | /Shopping/Apparel/Formal Wear |
401
+ | 590 | /Shopping/Apparel/Headwear |
402
+ | 296 | /Shopping/Apparel/Men's Clothing |
403
+ | 591 | /Shopping/Apparel/Outerwear |
404
+ | 592 | /Shopping/Apparel/Pants & Shorts |
405
+ | 593 | /Shopping/Apparel/Shirts & Tops |
406
+ | 594 | /Shopping/Apparel/Sleepwear |
407
+ | 595 | /Shopping/Apparel/Suits & Business Attire |
408
+ | 596 | /Shopping/Apparel/Swimwear |
409
+ | 597 | /Shopping/Apparel/Undergarments |
410
+ | 598 | /Shopping/Apparel/Uniforms & Workwear |
411
+ | 298 | /Shopping/Apparel/Women's Clothing |
412
+ | 599 | /Shopping/Apparel/Women's Clothing/Dresses |
413
+ | 600 | /Shopping/Apparel/Women's Clothing/Skirts |
414
+ | 293 | /Shopping/Coupons & Discount Offers |
415
+ | 601 | /Shopping/Gifts & Special Event Items |
416
+ | 295 | /Shopping/Gifts & Special Event Items/Flowers |
417
+ | 297 | /Shopping/Gifts & Special Event Items/Party & Holiday Supplies |
418
+ | 602 | /Shopping/Luxury Goods |
419
+ | 603 | /Shopping/Mass Merchants & Department Stores |
420
+ | 604 | /Shopping/Photo & Video Services |
421
+ | 605 | /Shopping/Photo & Video Services/Event & Studio Photography |
422
+ | 606 | /Shopping/Photo & Video Services/Photo Printing Services |
423
+ | 607 | /Shopping/Product Reviews & Price Comparisons |
424
+ | 608 | /Shopping/Toys |
425
+ | 299 | /Sports |
426
+ | 300 | /Sports/American Football |
427
+ | 301 | /Sports/Australian Football |
428
+ | 303 | /Sports/Baseball |
429
+ | 304 | /Sports/Basketball |
430
+ | 609 | /Sports/Combat Sports |
431
+ | 309 | /Sports/Cricket |
432
+ | 310 | /Sports/Cycling |
433
+ | 315 | /Sports/Golf |
434
+ | 317 | /Sports/Hockey |
435
+ | 610 | /Sports/Motor Sports |
436
+ | 321 | /Sports/Olympics |
437
+ | 322 | /Sports/Rugby |
438
+ | 323 | /Sports/Running & Walking |
439
+ | 325 | /Sports/Soccer |
440
+ | 611 | /Sports/Sporting Goods |
441
+ | 612 | /Sports/Sporting Goods/Baseball & Softball Equipment |
442
+ | 613 | /Sports/Sporting Goods/Golf Equipment |
443
+ | 614 | /Sports/Sporting Goods/Hockey Equipment |
444
+ | 615 | /Sports/Sporting Goods/Skateboarding Equipment |
445
+ | 616 | /Sports/Sporting Goods/Soccer Equipment |
446
+ | 617 | /Sports/Sporting Goods/Squash & Racquetball Equipment |
447
+ | 618 | /Sports/Sporting Goods/Water Sports Equipment |
448
+ | 619 | /Sports/Sporting Goods/Winter Sports Equipment |
449
+ | 328 | /Sports/Tennis |
450
+ | 620 | /Sports/Water Sports |
451
+ | 327 | /Sports/Water Sports/Swimming |
452
+ | 621 | /Sports/Winter Sports |
453
+ | 324 | /Sports/Winter Sports/Skiing & Snowboarding |
454
+ | 332 | /Travel & Transportation |
455
+ | 334 | /Travel & Transportation/Air Travel |
456
+ | 345 | /Travel & Transportation/Beaches & Islands |
457
+ | 335 | /Travel & Transportation/Business Travel |
458
+ | 336 | /Travel & Transportation/Car Rentals |
459
+ | 337 | /Travel & Transportation/Cruises & Charters |
460
+ | 338 | /Travel & Transportation/Family Travel |
461
+ | 340 | /Travel & Transportation/Hotels & Accommodations |
462
+ | 622 | /Travel & Transportation/Hotels & Accommodations/Vacation Rentals & Short-Term Stays |
463
+ | 341 | /Travel & Transportation/Long Distance Bus & Rail |
464
+ | 343 | /Travel & Transportation/Luggage & Travel Accessories |
465
+ | 623 | /Travel & Transportation/Luggage & Travel Accessories/Backpacks & Utility Bags |
466
+ | 624 | /Travel & Transportation/Luxury Travel |
467
+ | 625 | /Travel & Transportation/Mountain & Ski Resorts |
468
+ | 626 | /Travel & Transportation/Travel Agencies & Services |
469
+ | 627 | /Travel & Transportation/Travel Agencies & Services/Guided Tours & Escorted Vacations |
470
+ | 628 | /Travel & Transportation/Travel Agencies & Services/Sightseeing Tours |
471
+ | 629 | /Travel & Transportation/Travel Agencies & Services/Vacation Offers |
vocab.txt ADDED
The diff for this file is too large to render. See raw diff