-
Notifications
You must be signed in to change notification settings - Fork 0
/
grams.proto
97 lines (79 loc) · 1.34 KB
/
grams.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
syntax = "proto3";
package grams;
message Header {
string msg_type = 1;
uint64 total = 2;
}
message Unigram {
bytes str = 1;
fixed32 id = 2;
fixed32 weight = 3;
}
message Bigram {
fixed32 id1 = 1;
fixed32 id2 = 2;
fixed32 weight = 3;
}
message Trigram {
fixed32 id1 = 1;
fixed32 id2 = 2;
fixed32 id3 = 3;
fixed32 weight = 4;
}
message LemId {
bytes str = 1;
fixed32 id = 2;
}
message IdFreq {
fixed32 id = 1;
fixed32 weight = 2;
}
message LemFreq {
bytes str = 1;
fixed32 id = 2;
fixed32 weight = 3;
}
message Phrase {
repeated fixed32 ids = 1;
}
//////////////////////////////////
message Lem2AndWords {
fixed32 lid1 = 1;
fixed32 lid2 = 2;
fixed32 wid1 = 3;
fixed32 wid2 = 4;
fixed32 count = 5;
}
message Lem2Group {
fixed32 lid1 = 1;
fixed32 lid2 = 2;
double weight = 3;
message Case {
fixed32 wid1 = 1;
fixed32 wid2 = 2;
fixed32 count = 3;
}
repeated Case cases = 5;
}
message Lem3AndWords {
fixed32 lid1 = 1;
fixed32 lid2 = 2;
fixed32 lid3 = 3;
fixed32 wid1 = 4;
fixed32 wid2 = 5;
fixed32 wid3 = 6;
fixed32 count = 7;
}
message Lem3Group {
fixed32 lid1 = 1;
fixed32 lid2 = 2;
fixed32 lid3 = 3;
double weight = 4;
message Case {
fixed32 wid1 = 1;
fixed32 wid2 = 2;
fixed32 wid3 = 3;
fixed32 count = 4;
}
repeated Case cases = 5;
}