-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataset.proto
59 lines (48 loc) · 1.3 KB
/
dataset.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
syntax = "proto3";
package zvelo.msg;
option go_package = "zvelo.io/msg";
import "zvelo/msg/category.proto";
enum DataSetType {
CATEGORIZATION = 0;
ADFRAUD = 1;
// 2 is reserved
KEYWORD = 3;
MALICIOUS = 4;
ECHO = 5; // for internal zvelo use only
SENTIMENT = 6; // returns keywords & sentiment
}
message DataSet {
message Categorization {
repeated Category values = 1;
}
message AdFraud {
bool verdict = 1;
string signature = 2;
}
message Sentiment {
map<string, float> values = 1;
}
message Keyword {
repeated string values = 1;
}
message Malicious {
Category category = 1;
// 2 reserved for signature
bool verdict = 3;
}
message Echo {
string url = 1;
}
Categorization categorization = 1;
AdFraud adfraud = 2;
// 3 is reserved
// We expect that only keyword or sentiment will
// be populated at a given point in time to not
// duplicate data. If sentiment is not nil, then
// it contains all of the keywords in its map,
// and as such we don't have to populate Keyword.
Keyword keyword = 4;
Malicious malicious = 5;
Echo echo = 6;
Sentiment sentiment = 7;
}