@ccmaymay/concrete 4.15.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ActiveLearnerClientService.js +249 -249
- package/ActiveLearnerServerService.js +642 -642
- package/AnnotateCommunicationService.js +696 -696
- package/AnnotateWithContextService.js +298 -298
- package/FeedbackService.js +750 -750
- package/FetchCommunicationService.js +709 -709
- package/README.md +125 -0
- package/ResultsServerService.js +2138 -2138
- package/SearchProxyService.js +962 -962
- package/SearchService.js +685 -685
- package/Service.js +373 -373
- package/StoreCommunicationService.js +255 -255
- package/SummarizationService.js +479 -479
- package/access_types.js +168 -168
- package/annotate_types.js +26 -26
- package/audio_types.js +110 -110
- package/cluster_types.js +398 -398
- package/communication_fu.js +432 -432
- package/communication_types.js +845 -845
- package/concrete.js +64 -64
- package/context_types.js +65 -65
- package/email_types.js +477 -477
- package/entities_types.js +658 -658
- package/ex_types.js +82 -82
- package/language_types.js +123 -123
- package/learn_types.js +207 -207
- package/linking_types.js +286 -286
- package/metadata_types.js +926 -926
- package/nitf_types.js +1005 -1005
- package/package.json +26 -5
- package/results_types.js +18 -18
- package/search_types.js +661 -661
- package/services_types.js +384 -384
- package/situations_types.js +1268 -1268
- package/spans_types.js +151 -151
- package/structure_types.js +2311 -2311
- package/summarization_types.js +433 -433
- package/tokenization_fu.js +33 -33
- package/tokentagging_fu.js +241 -241
- package/twitter_types.js +1553 -1553
- package/util.js +117 -117
- package/uuid_types.js +67 -67
package/learn_types.js
CHANGED
@@ -1,207 +1,207 @@
|
|
1
|
-
//
|
2
|
-
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
-
//
|
4
|
-
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
//
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
const thrift = require('thrift');
|
9
|
-
const Thrift = thrift.Thrift;
|
10
|
-
const Int64 = require('node-int64');
|
11
|
-
|
12
|
-
const services_ttypes = require('./services_types');
|
13
|
-
const uuid_ttypes = require('./uuid_types');
|
14
|
-
const communication_ttypes = require('./communication_types');
|
15
|
-
|
16
|
-
|
17
|
-
const ttypes = module.exports = {};
|
18
|
-
const AnnotationTask = module.exports.AnnotationTask = class {
|
19
|
-
constructor(args) {
|
20
|
-
this.type = null;
|
21
|
-
this.language = null;
|
22
|
-
this.unitType = null;
|
23
|
-
this.units = null;
|
24
|
-
if (args) {
|
25
|
-
if (args.type !== undefined && args.type !== null) {
|
26
|
-
this.type = args.type;
|
27
|
-
} else {
|
28
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
|
29
|
-
}
|
30
|
-
if (args.language !== undefined && args.language !== null) {
|
31
|
-
this.language = args.language;
|
32
|
-
}
|
33
|
-
if (args.unitType !== undefined && args.unitType !== null) {
|
34
|
-
this.unitType = args.unitType;
|
35
|
-
} else {
|
36
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field unitType is unset!');
|
37
|
-
}
|
38
|
-
if (args.units !== undefined && args.units !== null) {
|
39
|
-
this.units = Thrift.copyList(args.units, [services_ttypes.AnnotationUnitIdentifier]);
|
40
|
-
} else {
|
41
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field units is unset!');
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
read (input) {
|
47
|
-
input.readStructBegin();
|
48
|
-
while (true) {
|
49
|
-
const ret = input.readFieldBegin();
|
50
|
-
const ftype = ret.ftype;
|
51
|
-
const fid = ret.fid;
|
52
|
-
if (ftype == Thrift.Type.STOP) {
|
53
|
-
break;
|
54
|
-
}
|
55
|
-
switch (fid) {
|
56
|
-
case 1:
|
57
|
-
if (ftype == Thrift.Type.I32) {
|
58
|
-
this.type = input.readI32();
|
59
|
-
} else {
|
60
|
-
input.skip(ftype);
|
61
|
-
}
|
62
|
-
break;
|
63
|
-
case 2:
|
64
|
-
if (ftype == Thrift.Type.STRING) {
|
65
|
-
this.language = input.readString();
|
66
|
-
} else {
|
67
|
-
input.skip(ftype);
|
68
|
-
}
|
69
|
-
break;
|
70
|
-
case 3:
|
71
|
-
if (ftype == Thrift.Type.I32) {
|
72
|
-
this.unitType = input.readI32();
|
73
|
-
} else {
|
74
|
-
input.skip(ftype);
|
75
|
-
}
|
76
|
-
break;
|
77
|
-
case 4:
|
78
|
-
if (ftype == Thrift.Type.LIST) {
|
79
|
-
this.units = [];
|
80
|
-
const _rtmp31 = input.readListBegin();
|
81
|
-
const _size0 = _rtmp31.size || 0;
|
82
|
-
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
83
|
-
let elem3 = null;
|
84
|
-
elem3 = new services_ttypes.AnnotationUnitIdentifier();
|
85
|
-
elem3.read(input);
|
86
|
-
this.units.push(elem3);
|
87
|
-
}
|
88
|
-
input.readListEnd();
|
89
|
-
} else {
|
90
|
-
input.skip(ftype);
|
91
|
-
}
|
92
|
-
break;
|
93
|
-
default:
|
94
|
-
input.skip(ftype);
|
95
|
-
}
|
96
|
-
input.readFieldEnd();
|
97
|
-
}
|
98
|
-
input.readStructEnd();
|
99
|
-
return;
|
100
|
-
}
|
101
|
-
|
102
|
-
write (output) {
|
103
|
-
output.writeStructBegin('AnnotationTask');
|
104
|
-
if (this.type !== null && this.type !== undefined) {
|
105
|
-
output.writeFieldBegin('type', Thrift.Type.I32, 1);
|
106
|
-
output.writeI32(this.type);
|
107
|
-
output.writeFieldEnd();
|
108
|
-
}
|
109
|
-
if (this.language !== null && this.language !== undefined) {
|
110
|
-
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
|
111
|
-
output.writeString(this.language);
|
112
|
-
output.writeFieldEnd();
|
113
|
-
}
|
114
|
-
if (this.unitType !== null && this.unitType !== undefined) {
|
115
|
-
output.writeFieldBegin('unitType', Thrift.Type.I32, 3);
|
116
|
-
output.writeI32(this.unitType);
|
117
|
-
output.writeFieldEnd();
|
118
|
-
}
|
119
|
-
if (this.units !== null && this.units !== undefined) {
|
120
|
-
output.writeFieldBegin('units', Thrift.Type.LIST, 4);
|
121
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.units.length);
|
122
|
-
for (let iter4 in this.units) {
|
123
|
-
if (this.units.hasOwnProperty(iter4)) {
|
124
|
-
iter4 = this.units[iter4];
|
125
|
-
iter4.write(output);
|
126
|
-
}
|
127
|
-
}
|
128
|
-
output.writeListEnd();
|
129
|
-
output.writeFieldEnd();
|
130
|
-
}
|
131
|
-
output.writeFieldStop();
|
132
|
-
output.writeStructEnd();
|
133
|
-
return;
|
134
|
-
}
|
135
|
-
|
136
|
-
};
|
137
|
-
const Annotation = module.exports.Annotation = class {
|
138
|
-
constructor(args) {
|
139
|
-
this.id = null;
|
140
|
-
this.communication = null;
|
141
|
-
if (args) {
|
142
|
-
if (args.id !== undefined && args.id !== null) {
|
143
|
-
this.id = new services_ttypes.AnnotationUnitIdentifier(args.id);
|
144
|
-
} else {
|
145
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
|
146
|
-
}
|
147
|
-
if (args.communication !== undefined && args.communication !== null) {
|
148
|
-
this.communication = new communication_ttypes.Communication(args.communication);
|
149
|
-
} else {
|
150
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communication is unset!');
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
read (input) {
|
156
|
-
input.readStructBegin();
|
157
|
-
while (true) {
|
158
|
-
const ret = input.readFieldBegin();
|
159
|
-
const ftype = ret.ftype;
|
160
|
-
const fid = ret.fid;
|
161
|
-
if (ftype == Thrift.Type.STOP) {
|
162
|
-
break;
|
163
|
-
}
|
164
|
-
switch (fid) {
|
165
|
-
case 1:
|
166
|
-
if (ftype == Thrift.Type.STRUCT) {
|
167
|
-
this.id = new services_ttypes.AnnotationUnitIdentifier();
|
168
|
-
this.id.read(input);
|
169
|
-
} else {
|
170
|
-
input.skip(ftype);
|
171
|
-
}
|
172
|
-
break;
|
173
|
-
case 2:
|
174
|
-
if (ftype == Thrift.Type.STRUCT) {
|
175
|
-
this.communication = new communication_ttypes.Communication();
|
176
|
-
this.communication.read(input);
|
177
|
-
} else {
|
178
|
-
input.skip(ftype);
|
179
|
-
}
|
180
|
-
break;
|
181
|
-
default:
|
182
|
-
input.skip(ftype);
|
183
|
-
}
|
184
|
-
input.readFieldEnd();
|
185
|
-
}
|
186
|
-
input.readStructEnd();
|
187
|
-
return;
|
188
|
-
}
|
189
|
-
|
190
|
-
write (output) {
|
191
|
-
output.writeStructBegin('Annotation');
|
192
|
-
if (this.id !== null && this.id !== undefined) {
|
193
|
-
output.writeFieldBegin('id', Thrift.Type.STRUCT, 1);
|
194
|
-
this.id.write(output);
|
195
|
-
output.writeFieldEnd();
|
196
|
-
}
|
197
|
-
if (this.communication !== null && this.communication !== undefined) {
|
198
|
-
output.writeFieldBegin('communication', Thrift.Type.STRUCT, 2);
|
199
|
-
this.communication.write(output);
|
200
|
-
output.writeFieldEnd();
|
201
|
-
}
|
202
|
-
output.writeFieldStop();
|
203
|
-
output.writeStructEnd();
|
204
|
-
return;
|
205
|
-
}
|
206
|
-
|
207
|
-
};
|
1
|
+
//
|
2
|
+
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
+
//
|
4
|
+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
//
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
const thrift = require('thrift');
|
9
|
+
const Thrift = thrift.Thrift;
|
10
|
+
const Int64 = require('node-int64');
|
11
|
+
|
12
|
+
const services_ttypes = require('./services_types');
|
13
|
+
const uuid_ttypes = require('./uuid_types');
|
14
|
+
const communication_ttypes = require('./communication_types');
|
15
|
+
|
16
|
+
|
17
|
+
const ttypes = module.exports = {};
|
18
|
+
const AnnotationTask = module.exports.AnnotationTask = class {
|
19
|
+
constructor(args) {
|
20
|
+
this.type = null;
|
21
|
+
this.language = null;
|
22
|
+
this.unitType = null;
|
23
|
+
this.units = null;
|
24
|
+
if (args) {
|
25
|
+
if (args.type !== undefined && args.type !== null) {
|
26
|
+
this.type = args.type;
|
27
|
+
} else {
|
28
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
|
29
|
+
}
|
30
|
+
if (args.language !== undefined && args.language !== null) {
|
31
|
+
this.language = args.language;
|
32
|
+
}
|
33
|
+
if (args.unitType !== undefined && args.unitType !== null) {
|
34
|
+
this.unitType = args.unitType;
|
35
|
+
} else {
|
36
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field unitType is unset!');
|
37
|
+
}
|
38
|
+
if (args.units !== undefined && args.units !== null) {
|
39
|
+
this.units = Thrift.copyList(args.units, [services_ttypes.AnnotationUnitIdentifier]);
|
40
|
+
} else {
|
41
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field units is unset!');
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
read (input) {
|
47
|
+
input.readStructBegin();
|
48
|
+
while (true) {
|
49
|
+
const ret = input.readFieldBegin();
|
50
|
+
const ftype = ret.ftype;
|
51
|
+
const fid = ret.fid;
|
52
|
+
if (ftype == Thrift.Type.STOP) {
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
switch (fid) {
|
56
|
+
case 1:
|
57
|
+
if (ftype == Thrift.Type.I32) {
|
58
|
+
this.type = input.readI32();
|
59
|
+
} else {
|
60
|
+
input.skip(ftype);
|
61
|
+
}
|
62
|
+
break;
|
63
|
+
case 2:
|
64
|
+
if (ftype == Thrift.Type.STRING) {
|
65
|
+
this.language = input.readString();
|
66
|
+
} else {
|
67
|
+
input.skip(ftype);
|
68
|
+
}
|
69
|
+
break;
|
70
|
+
case 3:
|
71
|
+
if (ftype == Thrift.Type.I32) {
|
72
|
+
this.unitType = input.readI32();
|
73
|
+
} else {
|
74
|
+
input.skip(ftype);
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
case 4:
|
78
|
+
if (ftype == Thrift.Type.LIST) {
|
79
|
+
this.units = [];
|
80
|
+
const _rtmp31 = input.readListBegin();
|
81
|
+
const _size0 = _rtmp31.size || 0;
|
82
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
83
|
+
let elem3 = null;
|
84
|
+
elem3 = new services_ttypes.AnnotationUnitIdentifier();
|
85
|
+
elem3.read(input);
|
86
|
+
this.units.push(elem3);
|
87
|
+
}
|
88
|
+
input.readListEnd();
|
89
|
+
} else {
|
90
|
+
input.skip(ftype);
|
91
|
+
}
|
92
|
+
break;
|
93
|
+
default:
|
94
|
+
input.skip(ftype);
|
95
|
+
}
|
96
|
+
input.readFieldEnd();
|
97
|
+
}
|
98
|
+
input.readStructEnd();
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
|
102
|
+
write (output) {
|
103
|
+
output.writeStructBegin('AnnotationTask');
|
104
|
+
if (this.type !== null && this.type !== undefined) {
|
105
|
+
output.writeFieldBegin('type', Thrift.Type.I32, 1);
|
106
|
+
output.writeI32(this.type);
|
107
|
+
output.writeFieldEnd();
|
108
|
+
}
|
109
|
+
if (this.language !== null && this.language !== undefined) {
|
110
|
+
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
|
111
|
+
output.writeString(this.language);
|
112
|
+
output.writeFieldEnd();
|
113
|
+
}
|
114
|
+
if (this.unitType !== null && this.unitType !== undefined) {
|
115
|
+
output.writeFieldBegin('unitType', Thrift.Type.I32, 3);
|
116
|
+
output.writeI32(this.unitType);
|
117
|
+
output.writeFieldEnd();
|
118
|
+
}
|
119
|
+
if (this.units !== null && this.units !== undefined) {
|
120
|
+
output.writeFieldBegin('units', Thrift.Type.LIST, 4);
|
121
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.units.length);
|
122
|
+
for (let iter4 in this.units) {
|
123
|
+
if (this.units.hasOwnProperty(iter4)) {
|
124
|
+
iter4 = this.units[iter4];
|
125
|
+
iter4.write(output);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
output.writeListEnd();
|
129
|
+
output.writeFieldEnd();
|
130
|
+
}
|
131
|
+
output.writeFieldStop();
|
132
|
+
output.writeStructEnd();
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
|
136
|
+
};
|
137
|
+
const Annotation = module.exports.Annotation = class {
|
138
|
+
constructor(args) {
|
139
|
+
this.id = null;
|
140
|
+
this.communication = null;
|
141
|
+
if (args) {
|
142
|
+
if (args.id !== undefined && args.id !== null) {
|
143
|
+
this.id = new services_ttypes.AnnotationUnitIdentifier(args.id);
|
144
|
+
} else {
|
145
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
|
146
|
+
}
|
147
|
+
if (args.communication !== undefined && args.communication !== null) {
|
148
|
+
this.communication = new communication_ttypes.Communication(args.communication);
|
149
|
+
} else {
|
150
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communication is unset!');
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
read (input) {
|
156
|
+
input.readStructBegin();
|
157
|
+
while (true) {
|
158
|
+
const ret = input.readFieldBegin();
|
159
|
+
const ftype = ret.ftype;
|
160
|
+
const fid = ret.fid;
|
161
|
+
if (ftype == Thrift.Type.STOP) {
|
162
|
+
break;
|
163
|
+
}
|
164
|
+
switch (fid) {
|
165
|
+
case 1:
|
166
|
+
if (ftype == Thrift.Type.STRUCT) {
|
167
|
+
this.id = new services_ttypes.AnnotationUnitIdentifier();
|
168
|
+
this.id.read(input);
|
169
|
+
} else {
|
170
|
+
input.skip(ftype);
|
171
|
+
}
|
172
|
+
break;
|
173
|
+
case 2:
|
174
|
+
if (ftype == Thrift.Type.STRUCT) {
|
175
|
+
this.communication = new communication_ttypes.Communication();
|
176
|
+
this.communication.read(input);
|
177
|
+
} else {
|
178
|
+
input.skip(ftype);
|
179
|
+
}
|
180
|
+
break;
|
181
|
+
default:
|
182
|
+
input.skip(ftype);
|
183
|
+
}
|
184
|
+
input.readFieldEnd();
|
185
|
+
}
|
186
|
+
input.readStructEnd();
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
190
|
+
write (output) {
|
191
|
+
output.writeStructBegin('Annotation');
|
192
|
+
if (this.id !== null && this.id !== undefined) {
|
193
|
+
output.writeFieldBegin('id', Thrift.Type.STRUCT, 1);
|
194
|
+
this.id.write(output);
|
195
|
+
output.writeFieldEnd();
|
196
|
+
}
|
197
|
+
if (this.communication !== null && this.communication !== undefined) {
|
198
|
+
output.writeFieldBegin('communication', Thrift.Type.STRUCT, 2);
|
199
|
+
this.communication.write(output);
|
200
|
+
output.writeFieldEnd();
|
201
|
+
}
|
202
|
+
output.writeFieldStop();
|
203
|
+
output.writeStructEnd();
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
|
207
|
+
};
|