@ccmaymay/concrete 4.15.0
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 -0
- package/ActiveLearnerServerService.js +642 -0
- package/AnnotateCommunicationService.js +696 -0
- package/AnnotateWithContextService.js +298 -0
- package/FeedbackService.js +750 -0
- package/FetchCommunicationService.js +709 -0
- package/LICENSE +31 -0
- package/ResultsServerService.js +2138 -0
- package/SearchProxyService.js +962 -0
- package/SearchService.js +685 -0
- package/Service.js +373 -0
- package/StoreCommunicationService.js +255 -0
- package/SummarizationService.js +479 -0
- package/access_types.js +168 -0
- package/annotate_types.js +26 -0
- package/audio_types.js +110 -0
- package/cluster_types.js +398 -0
- package/communication_fu.js +432 -0
- package/communication_types.js +845 -0
- package/concrete.js +65 -0
- package/context_types.js +65 -0
- package/email_types.js +477 -0
- package/entities_types.js +658 -0
- package/ex_types.js +82 -0
- package/language_types.js +123 -0
- package/learn_types.js +207 -0
- package/linking_types.js +286 -0
- package/metadata_types.js +926 -0
- package/nitf_types.js +1005 -0
- package/package.json +23 -0
- package/results_types.js +18 -0
- package/search_types.js +661 -0
- package/services_types.js +384 -0
- package/situations_types.js +1268 -0
- package/spans_types.js +151 -0
- package/structure_types.js +2311 -0
- package/summarization_types.js +433 -0
- package/tokenization_fu.js +33 -0
- package/tokentagging_fu.js +241 -0
- package/twitter_types.js +1553 -0
- package/util.js +118 -0
- package/uuid_types.js +67 -0
@@ -0,0 +1,845 @@
|
|
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 uuid_ttypes = require('./uuid_types');
|
13
|
+
const language_ttypes = require('./language_types');
|
14
|
+
const structure_ttypes = require('./structure_types');
|
15
|
+
const entities_ttypes = require('./entities_types');
|
16
|
+
const situations_ttypes = require('./situations_types');
|
17
|
+
const audio_ttypes = require('./audio_types');
|
18
|
+
const metadata_ttypes = require('./metadata_types');
|
19
|
+
const cluster_ttypes = require('./cluster_types');
|
20
|
+
|
21
|
+
|
22
|
+
const ttypes = module.exports = {};
|
23
|
+
const CommunicationTagging = module.exports.CommunicationTagging = class {
|
24
|
+
constructor(args) {
|
25
|
+
this.uuid = null;
|
26
|
+
this.metadata = null;
|
27
|
+
this.taggingType = null;
|
28
|
+
this.tagList = null;
|
29
|
+
this.confidenceList = null;
|
30
|
+
if (args) {
|
31
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
32
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
33
|
+
} else {
|
34
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
35
|
+
}
|
36
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
37
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
38
|
+
} else {
|
39
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
40
|
+
}
|
41
|
+
if (args.taggingType !== undefined && args.taggingType !== null) {
|
42
|
+
this.taggingType = args.taggingType;
|
43
|
+
} else {
|
44
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field taggingType is unset!');
|
45
|
+
}
|
46
|
+
if (args.tagList !== undefined && args.tagList !== null) {
|
47
|
+
this.tagList = Thrift.copyList(args.tagList, [null]);
|
48
|
+
}
|
49
|
+
if (args.confidenceList !== undefined && args.confidenceList !== null) {
|
50
|
+
this.confidenceList = Thrift.copyList(args.confidenceList, [null]);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
read (input) {
|
56
|
+
input.readStructBegin();
|
57
|
+
while (true) {
|
58
|
+
const ret = input.readFieldBegin();
|
59
|
+
const ftype = ret.ftype;
|
60
|
+
const fid = ret.fid;
|
61
|
+
if (ftype == Thrift.Type.STOP) {
|
62
|
+
break;
|
63
|
+
}
|
64
|
+
switch (fid) {
|
65
|
+
case 1:
|
66
|
+
if (ftype == Thrift.Type.STRUCT) {
|
67
|
+
this.uuid = new uuid_ttypes.UUID();
|
68
|
+
this.uuid.read(input);
|
69
|
+
} else {
|
70
|
+
input.skip(ftype);
|
71
|
+
}
|
72
|
+
break;
|
73
|
+
case 2:
|
74
|
+
if (ftype == Thrift.Type.STRUCT) {
|
75
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
76
|
+
this.metadata.read(input);
|
77
|
+
} else {
|
78
|
+
input.skip(ftype);
|
79
|
+
}
|
80
|
+
break;
|
81
|
+
case 3:
|
82
|
+
if (ftype == Thrift.Type.STRING) {
|
83
|
+
this.taggingType = input.readString();
|
84
|
+
} else {
|
85
|
+
input.skip(ftype);
|
86
|
+
}
|
87
|
+
break;
|
88
|
+
case 4:
|
89
|
+
if (ftype == Thrift.Type.LIST) {
|
90
|
+
this.tagList = [];
|
91
|
+
const _rtmp31 = input.readListBegin();
|
92
|
+
const _size0 = _rtmp31.size || 0;
|
93
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
94
|
+
let elem3 = null;
|
95
|
+
elem3 = input.readString();
|
96
|
+
this.tagList.push(elem3);
|
97
|
+
}
|
98
|
+
input.readListEnd();
|
99
|
+
} else {
|
100
|
+
input.skip(ftype);
|
101
|
+
}
|
102
|
+
break;
|
103
|
+
case 5:
|
104
|
+
if (ftype == Thrift.Type.LIST) {
|
105
|
+
this.confidenceList = [];
|
106
|
+
const _rtmp35 = input.readListBegin();
|
107
|
+
const _size4 = _rtmp35.size || 0;
|
108
|
+
for (let _i6 = 0; _i6 < _size4; ++_i6) {
|
109
|
+
let elem7 = null;
|
110
|
+
elem7 = input.readDouble();
|
111
|
+
this.confidenceList.push(elem7);
|
112
|
+
}
|
113
|
+
input.readListEnd();
|
114
|
+
} else {
|
115
|
+
input.skip(ftype);
|
116
|
+
}
|
117
|
+
break;
|
118
|
+
default:
|
119
|
+
input.skip(ftype);
|
120
|
+
}
|
121
|
+
input.readFieldEnd();
|
122
|
+
}
|
123
|
+
input.readStructEnd();
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
|
127
|
+
write (output) {
|
128
|
+
output.writeStructBegin('CommunicationTagging');
|
129
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
130
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
131
|
+
this.uuid.write(output);
|
132
|
+
output.writeFieldEnd();
|
133
|
+
}
|
134
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
135
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
136
|
+
this.metadata.write(output);
|
137
|
+
output.writeFieldEnd();
|
138
|
+
}
|
139
|
+
if (this.taggingType !== null && this.taggingType !== undefined) {
|
140
|
+
output.writeFieldBegin('taggingType', Thrift.Type.STRING, 3);
|
141
|
+
output.writeString(this.taggingType);
|
142
|
+
output.writeFieldEnd();
|
143
|
+
}
|
144
|
+
if (this.tagList !== null && this.tagList !== undefined) {
|
145
|
+
output.writeFieldBegin('tagList', Thrift.Type.LIST, 4);
|
146
|
+
output.writeListBegin(Thrift.Type.STRING, this.tagList.length);
|
147
|
+
for (let iter8 in this.tagList) {
|
148
|
+
if (this.tagList.hasOwnProperty(iter8)) {
|
149
|
+
iter8 = this.tagList[iter8];
|
150
|
+
output.writeString(iter8);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
output.writeListEnd();
|
154
|
+
output.writeFieldEnd();
|
155
|
+
}
|
156
|
+
if (this.confidenceList !== null && this.confidenceList !== undefined) {
|
157
|
+
output.writeFieldBegin('confidenceList', Thrift.Type.LIST, 5);
|
158
|
+
output.writeListBegin(Thrift.Type.DOUBLE, this.confidenceList.length);
|
159
|
+
for (let iter9 in this.confidenceList) {
|
160
|
+
if (this.confidenceList.hasOwnProperty(iter9)) {
|
161
|
+
iter9 = this.confidenceList[iter9];
|
162
|
+
output.writeDouble(iter9);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
output.writeListEnd();
|
166
|
+
output.writeFieldEnd();
|
167
|
+
}
|
168
|
+
output.writeFieldStop();
|
169
|
+
output.writeStructEnd();
|
170
|
+
return;
|
171
|
+
}
|
172
|
+
|
173
|
+
};
|
174
|
+
const Communication = module.exports.Communication = class {
|
175
|
+
constructor(args) {
|
176
|
+
this.id = null;
|
177
|
+
this.uuid = null;
|
178
|
+
this.type = null;
|
179
|
+
this.text = null;
|
180
|
+
this.startTime = null;
|
181
|
+
this.endTime = null;
|
182
|
+
this.communicationTaggingList = null;
|
183
|
+
this.metadata = null;
|
184
|
+
this.keyValueMap = null;
|
185
|
+
this.lidList = null;
|
186
|
+
this.sectionList = null;
|
187
|
+
this.entityMentionSetList = null;
|
188
|
+
this.entitySetList = null;
|
189
|
+
this.situationMentionSetList = null;
|
190
|
+
this.situationSetList = null;
|
191
|
+
this.originalText = null;
|
192
|
+
this.sound = null;
|
193
|
+
this.communicationMetadata = null;
|
194
|
+
if (args) {
|
195
|
+
if (args.id !== undefined && args.id !== null) {
|
196
|
+
this.id = args.id;
|
197
|
+
} else {
|
198
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
|
199
|
+
}
|
200
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
201
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
202
|
+
} else {
|
203
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
204
|
+
}
|
205
|
+
if (args.type !== undefined && args.type !== null) {
|
206
|
+
this.type = args.type;
|
207
|
+
} else {
|
208
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
|
209
|
+
}
|
210
|
+
if (args.text !== undefined && args.text !== null) {
|
211
|
+
this.text = args.text;
|
212
|
+
}
|
213
|
+
if (args.startTime !== undefined && args.startTime !== null) {
|
214
|
+
this.startTime = args.startTime;
|
215
|
+
}
|
216
|
+
if (args.endTime !== undefined && args.endTime !== null) {
|
217
|
+
this.endTime = args.endTime;
|
218
|
+
}
|
219
|
+
if (args.communicationTaggingList !== undefined && args.communicationTaggingList !== null) {
|
220
|
+
this.communicationTaggingList = Thrift.copyList(args.communicationTaggingList, [ttypes.CommunicationTagging]);
|
221
|
+
}
|
222
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
223
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
224
|
+
} else {
|
225
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
226
|
+
}
|
227
|
+
if (args.keyValueMap !== undefined && args.keyValueMap !== null) {
|
228
|
+
this.keyValueMap = Thrift.copyMap(args.keyValueMap, [null]);
|
229
|
+
}
|
230
|
+
if (args.lidList !== undefined && args.lidList !== null) {
|
231
|
+
this.lidList = Thrift.copyList(args.lidList, [language_ttypes.LanguageIdentification]);
|
232
|
+
}
|
233
|
+
if (args.sectionList !== undefined && args.sectionList !== null) {
|
234
|
+
this.sectionList = Thrift.copyList(args.sectionList, [structure_ttypes.Section]);
|
235
|
+
}
|
236
|
+
if (args.entityMentionSetList !== undefined && args.entityMentionSetList !== null) {
|
237
|
+
this.entityMentionSetList = Thrift.copyList(args.entityMentionSetList, [entities_ttypes.EntityMentionSet]);
|
238
|
+
}
|
239
|
+
if (args.entitySetList !== undefined && args.entitySetList !== null) {
|
240
|
+
this.entitySetList = Thrift.copyList(args.entitySetList, [entities_ttypes.EntitySet]);
|
241
|
+
}
|
242
|
+
if (args.situationMentionSetList !== undefined && args.situationMentionSetList !== null) {
|
243
|
+
this.situationMentionSetList = Thrift.copyList(args.situationMentionSetList, [situations_ttypes.SituationMentionSet]);
|
244
|
+
}
|
245
|
+
if (args.situationSetList !== undefined && args.situationSetList !== null) {
|
246
|
+
this.situationSetList = Thrift.copyList(args.situationSetList, [situations_ttypes.SituationSet]);
|
247
|
+
}
|
248
|
+
if (args.originalText !== undefined && args.originalText !== null) {
|
249
|
+
this.originalText = args.originalText;
|
250
|
+
}
|
251
|
+
if (args.sound !== undefined && args.sound !== null) {
|
252
|
+
this.sound = new audio_ttypes.Sound(args.sound);
|
253
|
+
}
|
254
|
+
if (args.communicationMetadata !== undefined && args.communicationMetadata !== null) {
|
255
|
+
this.communicationMetadata = new metadata_ttypes.CommunicationMetadata(args.communicationMetadata);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
read (input) {
|
261
|
+
input.readStructBegin();
|
262
|
+
while (true) {
|
263
|
+
const ret = input.readFieldBegin();
|
264
|
+
const ftype = ret.ftype;
|
265
|
+
const fid = ret.fid;
|
266
|
+
if (ftype == Thrift.Type.STOP) {
|
267
|
+
break;
|
268
|
+
}
|
269
|
+
switch (fid) {
|
270
|
+
case 1:
|
271
|
+
if (ftype == Thrift.Type.STRING) {
|
272
|
+
this.id = input.readString();
|
273
|
+
} else {
|
274
|
+
input.skip(ftype);
|
275
|
+
}
|
276
|
+
break;
|
277
|
+
case 2:
|
278
|
+
if (ftype == Thrift.Type.STRUCT) {
|
279
|
+
this.uuid = new uuid_ttypes.UUID();
|
280
|
+
this.uuid.read(input);
|
281
|
+
} else {
|
282
|
+
input.skip(ftype);
|
283
|
+
}
|
284
|
+
break;
|
285
|
+
case 3:
|
286
|
+
if (ftype == Thrift.Type.STRING) {
|
287
|
+
this.type = input.readString();
|
288
|
+
} else {
|
289
|
+
input.skip(ftype);
|
290
|
+
}
|
291
|
+
break;
|
292
|
+
case 4:
|
293
|
+
if (ftype == Thrift.Type.STRING) {
|
294
|
+
this.text = input.readString();
|
295
|
+
} else {
|
296
|
+
input.skip(ftype);
|
297
|
+
}
|
298
|
+
break;
|
299
|
+
case 5:
|
300
|
+
if (ftype == Thrift.Type.I64) {
|
301
|
+
this.startTime = input.readI64();
|
302
|
+
} else {
|
303
|
+
input.skip(ftype);
|
304
|
+
}
|
305
|
+
break;
|
306
|
+
case 6:
|
307
|
+
if (ftype == Thrift.Type.I64) {
|
308
|
+
this.endTime = input.readI64();
|
309
|
+
} else {
|
310
|
+
input.skip(ftype);
|
311
|
+
}
|
312
|
+
break;
|
313
|
+
case 7:
|
314
|
+
if (ftype == Thrift.Type.LIST) {
|
315
|
+
this.communicationTaggingList = [];
|
316
|
+
const _rtmp311 = input.readListBegin();
|
317
|
+
const _size10 = _rtmp311.size || 0;
|
318
|
+
for (let _i12 = 0; _i12 < _size10; ++_i12) {
|
319
|
+
let elem13 = null;
|
320
|
+
elem13 = new ttypes.CommunicationTagging();
|
321
|
+
elem13.read(input);
|
322
|
+
this.communicationTaggingList.push(elem13);
|
323
|
+
}
|
324
|
+
input.readListEnd();
|
325
|
+
} else {
|
326
|
+
input.skip(ftype);
|
327
|
+
}
|
328
|
+
break;
|
329
|
+
case 8:
|
330
|
+
if (ftype == Thrift.Type.STRUCT) {
|
331
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
332
|
+
this.metadata.read(input);
|
333
|
+
} else {
|
334
|
+
input.skip(ftype);
|
335
|
+
}
|
336
|
+
break;
|
337
|
+
case 9:
|
338
|
+
if (ftype == Thrift.Type.MAP) {
|
339
|
+
this.keyValueMap = {};
|
340
|
+
const _rtmp315 = input.readMapBegin();
|
341
|
+
const _size14 = _rtmp315.size || 0;
|
342
|
+
for (let _i16 = 0; _i16 < _size14; ++_i16) {
|
343
|
+
let key17 = null;
|
344
|
+
let val18 = null;
|
345
|
+
key17 = input.readString();
|
346
|
+
val18 = input.readString();
|
347
|
+
this.keyValueMap[key17] = val18;
|
348
|
+
}
|
349
|
+
input.readMapEnd();
|
350
|
+
} else {
|
351
|
+
input.skip(ftype);
|
352
|
+
}
|
353
|
+
break;
|
354
|
+
case 10:
|
355
|
+
if (ftype == Thrift.Type.LIST) {
|
356
|
+
this.lidList = [];
|
357
|
+
const _rtmp320 = input.readListBegin();
|
358
|
+
const _size19 = _rtmp320.size || 0;
|
359
|
+
for (let _i21 = 0; _i21 < _size19; ++_i21) {
|
360
|
+
let elem22 = null;
|
361
|
+
elem22 = new language_ttypes.LanguageIdentification();
|
362
|
+
elem22.read(input);
|
363
|
+
this.lidList.push(elem22);
|
364
|
+
}
|
365
|
+
input.readListEnd();
|
366
|
+
} else {
|
367
|
+
input.skip(ftype);
|
368
|
+
}
|
369
|
+
break;
|
370
|
+
case 11:
|
371
|
+
if (ftype == Thrift.Type.LIST) {
|
372
|
+
this.sectionList = [];
|
373
|
+
const _rtmp324 = input.readListBegin();
|
374
|
+
const _size23 = _rtmp324.size || 0;
|
375
|
+
for (let _i25 = 0; _i25 < _size23; ++_i25) {
|
376
|
+
let elem26 = null;
|
377
|
+
elem26 = new structure_ttypes.Section();
|
378
|
+
elem26.read(input);
|
379
|
+
this.sectionList.push(elem26);
|
380
|
+
}
|
381
|
+
input.readListEnd();
|
382
|
+
} else {
|
383
|
+
input.skip(ftype);
|
384
|
+
}
|
385
|
+
break;
|
386
|
+
case 12:
|
387
|
+
if (ftype == Thrift.Type.LIST) {
|
388
|
+
this.entityMentionSetList = [];
|
389
|
+
const _rtmp328 = input.readListBegin();
|
390
|
+
const _size27 = _rtmp328.size || 0;
|
391
|
+
for (let _i29 = 0; _i29 < _size27; ++_i29) {
|
392
|
+
let elem30 = null;
|
393
|
+
elem30 = new entities_ttypes.EntityMentionSet();
|
394
|
+
elem30.read(input);
|
395
|
+
this.entityMentionSetList.push(elem30);
|
396
|
+
}
|
397
|
+
input.readListEnd();
|
398
|
+
} else {
|
399
|
+
input.skip(ftype);
|
400
|
+
}
|
401
|
+
break;
|
402
|
+
case 13:
|
403
|
+
if (ftype == Thrift.Type.LIST) {
|
404
|
+
this.entitySetList = [];
|
405
|
+
const _rtmp332 = input.readListBegin();
|
406
|
+
const _size31 = _rtmp332.size || 0;
|
407
|
+
for (let _i33 = 0; _i33 < _size31; ++_i33) {
|
408
|
+
let elem34 = null;
|
409
|
+
elem34 = new entities_ttypes.EntitySet();
|
410
|
+
elem34.read(input);
|
411
|
+
this.entitySetList.push(elem34);
|
412
|
+
}
|
413
|
+
input.readListEnd();
|
414
|
+
} else {
|
415
|
+
input.skip(ftype);
|
416
|
+
}
|
417
|
+
break;
|
418
|
+
case 14:
|
419
|
+
if (ftype == Thrift.Type.LIST) {
|
420
|
+
this.situationMentionSetList = [];
|
421
|
+
const _rtmp336 = input.readListBegin();
|
422
|
+
const _size35 = _rtmp336.size || 0;
|
423
|
+
for (let _i37 = 0; _i37 < _size35; ++_i37) {
|
424
|
+
let elem38 = null;
|
425
|
+
elem38 = new situations_ttypes.SituationMentionSet();
|
426
|
+
elem38.read(input);
|
427
|
+
this.situationMentionSetList.push(elem38);
|
428
|
+
}
|
429
|
+
input.readListEnd();
|
430
|
+
} else {
|
431
|
+
input.skip(ftype);
|
432
|
+
}
|
433
|
+
break;
|
434
|
+
case 15:
|
435
|
+
if (ftype == Thrift.Type.LIST) {
|
436
|
+
this.situationSetList = [];
|
437
|
+
const _rtmp340 = input.readListBegin();
|
438
|
+
const _size39 = _rtmp340.size || 0;
|
439
|
+
for (let _i41 = 0; _i41 < _size39; ++_i41) {
|
440
|
+
let elem42 = null;
|
441
|
+
elem42 = new situations_ttypes.SituationSet();
|
442
|
+
elem42.read(input);
|
443
|
+
this.situationSetList.push(elem42);
|
444
|
+
}
|
445
|
+
input.readListEnd();
|
446
|
+
} else {
|
447
|
+
input.skip(ftype);
|
448
|
+
}
|
449
|
+
break;
|
450
|
+
case 16:
|
451
|
+
if (ftype == Thrift.Type.STRING) {
|
452
|
+
this.originalText = input.readString();
|
453
|
+
} else {
|
454
|
+
input.skip(ftype);
|
455
|
+
}
|
456
|
+
break;
|
457
|
+
case 20:
|
458
|
+
if (ftype == Thrift.Type.STRUCT) {
|
459
|
+
this.sound = new audio_ttypes.Sound();
|
460
|
+
this.sound.read(input);
|
461
|
+
} else {
|
462
|
+
input.skip(ftype);
|
463
|
+
}
|
464
|
+
break;
|
465
|
+
case 21:
|
466
|
+
if (ftype == Thrift.Type.STRUCT) {
|
467
|
+
this.communicationMetadata = new metadata_ttypes.CommunicationMetadata();
|
468
|
+
this.communicationMetadata.read(input);
|
469
|
+
} else {
|
470
|
+
input.skip(ftype);
|
471
|
+
}
|
472
|
+
break;
|
473
|
+
default:
|
474
|
+
input.skip(ftype);
|
475
|
+
}
|
476
|
+
input.readFieldEnd();
|
477
|
+
}
|
478
|
+
input.readStructEnd();
|
479
|
+
return;
|
480
|
+
}
|
481
|
+
|
482
|
+
write (output) {
|
483
|
+
output.writeStructBegin('Communication');
|
484
|
+
if (this.id !== null && this.id !== undefined) {
|
485
|
+
output.writeFieldBegin('id', Thrift.Type.STRING, 1);
|
486
|
+
output.writeString(this.id);
|
487
|
+
output.writeFieldEnd();
|
488
|
+
}
|
489
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
490
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 2);
|
491
|
+
this.uuid.write(output);
|
492
|
+
output.writeFieldEnd();
|
493
|
+
}
|
494
|
+
if (this.type !== null && this.type !== undefined) {
|
495
|
+
output.writeFieldBegin('type', Thrift.Type.STRING, 3);
|
496
|
+
output.writeString(this.type);
|
497
|
+
output.writeFieldEnd();
|
498
|
+
}
|
499
|
+
if (this.text !== null && this.text !== undefined) {
|
500
|
+
output.writeFieldBegin('text', Thrift.Type.STRING, 4);
|
501
|
+
output.writeString(this.text);
|
502
|
+
output.writeFieldEnd();
|
503
|
+
}
|
504
|
+
if (this.startTime !== null && this.startTime !== undefined) {
|
505
|
+
output.writeFieldBegin('startTime', Thrift.Type.I64, 5);
|
506
|
+
output.writeI64(this.startTime);
|
507
|
+
output.writeFieldEnd();
|
508
|
+
}
|
509
|
+
if (this.endTime !== null && this.endTime !== undefined) {
|
510
|
+
output.writeFieldBegin('endTime', Thrift.Type.I64, 6);
|
511
|
+
output.writeI64(this.endTime);
|
512
|
+
output.writeFieldEnd();
|
513
|
+
}
|
514
|
+
if (this.communicationTaggingList !== null && this.communicationTaggingList !== undefined) {
|
515
|
+
output.writeFieldBegin('communicationTaggingList', Thrift.Type.LIST, 7);
|
516
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.communicationTaggingList.length);
|
517
|
+
for (let iter43 in this.communicationTaggingList) {
|
518
|
+
if (this.communicationTaggingList.hasOwnProperty(iter43)) {
|
519
|
+
iter43 = this.communicationTaggingList[iter43];
|
520
|
+
iter43.write(output);
|
521
|
+
}
|
522
|
+
}
|
523
|
+
output.writeListEnd();
|
524
|
+
output.writeFieldEnd();
|
525
|
+
}
|
526
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
527
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 8);
|
528
|
+
this.metadata.write(output);
|
529
|
+
output.writeFieldEnd();
|
530
|
+
}
|
531
|
+
if (this.keyValueMap !== null && this.keyValueMap !== undefined) {
|
532
|
+
output.writeFieldBegin('keyValueMap', Thrift.Type.MAP, 9);
|
533
|
+
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.keyValueMap));
|
534
|
+
for (let kiter44 in this.keyValueMap) {
|
535
|
+
if (this.keyValueMap.hasOwnProperty(kiter44)) {
|
536
|
+
let viter45 = this.keyValueMap[kiter44];
|
537
|
+
output.writeString(kiter44);
|
538
|
+
output.writeString(viter45);
|
539
|
+
}
|
540
|
+
}
|
541
|
+
output.writeMapEnd();
|
542
|
+
output.writeFieldEnd();
|
543
|
+
}
|
544
|
+
if (this.lidList !== null && this.lidList !== undefined) {
|
545
|
+
output.writeFieldBegin('lidList', Thrift.Type.LIST, 10);
|
546
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.lidList.length);
|
547
|
+
for (let iter46 in this.lidList) {
|
548
|
+
if (this.lidList.hasOwnProperty(iter46)) {
|
549
|
+
iter46 = this.lidList[iter46];
|
550
|
+
iter46.write(output);
|
551
|
+
}
|
552
|
+
}
|
553
|
+
output.writeListEnd();
|
554
|
+
output.writeFieldEnd();
|
555
|
+
}
|
556
|
+
if (this.sectionList !== null && this.sectionList !== undefined) {
|
557
|
+
output.writeFieldBegin('sectionList', Thrift.Type.LIST, 11);
|
558
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.sectionList.length);
|
559
|
+
for (let iter47 in this.sectionList) {
|
560
|
+
if (this.sectionList.hasOwnProperty(iter47)) {
|
561
|
+
iter47 = this.sectionList[iter47];
|
562
|
+
iter47.write(output);
|
563
|
+
}
|
564
|
+
}
|
565
|
+
output.writeListEnd();
|
566
|
+
output.writeFieldEnd();
|
567
|
+
}
|
568
|
+
if (this.entityMentionSetList !== null && this.entityMentionSetList !== undefined) {
|
569
|
+
output.writeFieldBegin('entityMentionSetList', Thrift.Type.LIST, 12);
|
570
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.entityMentionSetList.length);
|
571
|
+
for (let iter48 in this.entityMentionSetList) {
|
572
|
+
if (this.entityMentionSetList.hasOwnProperty(iter48)) {
|
573
|
+
iter48 = this.entityMentionSetList[iter48];
|
574
|
+
iter48.write(output);
|
575
|
+
}
|
576
|
+
}
|
577
|
+
output.writeListEnd();
|
578
|
+
output.writeFieldEnd();
|
579
|
+
}
|
580
|
+
if (this.entitySetList !== null && this.entitySetList !== undefined) {
|
581
|
+
output.writeFieldBegin('entitySetList', Thrift.Type.LIST, 13);
|
582
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.entitySetList.length);
|
583
|
+
for (let iter49 in this.entitySetList) {
|
584
|
+
if (this.entitySetList.hasOwnProperty(iter49)) {
|
585
|
+
iter49 = this.entitySetList[iter49];
|
586
|
+
iter49.write(output);
|
587
|
+
}
|
588
|
+
}
|
589
|
+
output.writeListEnd();
|
590
|
+
output.writeFieldEnd();
|
591
|
+
}
|
592
|
+
if (this.situationMentionSetList !== null && this.situationMentionSetList !== undefined) {
|
593
|
+
output.writeFieldBegin('situationMentionSetList', Thrift.Type.LIST, 14);
|
594
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.situationMentionSetList.length);
|
595
|
+
for (let iter50 in this.situationMentionSetList) {
|
596
|
+
if (this.situationMentionSetList.hasOwnProperty(iter50)) {
|
597
|
+
iter50 = this.situationMentionSetList[iter50];
|
598
|
+
iter50.write(output);
|
599
|
+
}
|
600
|
+
}
|
601
|
+
output.writeListEnd();
|
602
|
+
output.writeFieldEnd();
|
603
|
+
}
|
604
|
+
if (this.situationSetList !== null && this.situationSetList !== undefined) {
|
605
|
+
output.writeFieldBegin('situationSetList', Thrift.Type.LIST, 15);
|
606
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.situationSetList.length);
|
607
|
+
for (let iter51 in this.situationSetList) {
|
608
|
+
if (this.situationSetList.hasOwnProperty(iter51)) {
|
609
|
+
iter51 = this.situationSetList[iter51];
|
610
|
+
iter51.write(output);
|
611
|
+
}
|
612
|
+
}
|
613
|
+
output.writeListEnd();
|
614
|
+
output.writeFieldEnd();
|
615
|
+
}
|
616
|
+
if (this.originalText !== null && this.originalText !== undefined) {
|
617
|
+
output.writeFieldBegin('originalText', Thrift.Type.STRING, 16);
|
618
|
+
output.writeString(this.originalText);
|
619
|
+
output.writeFieldEnd();
|
620
|
+
}
|
621
|
+
if (this.sound !== null && this.sound !== undefined) {
|
622
|
+
output.writeFieldBegin('sound', Thrift.Type.STRUCT, 20);
|
623
|
+
this.sound.write(output);
|
624
|
+
output.writeFieldEnd();
|
625
|
+
}
|
626
|
+
if (this.communicationMetadata !== null && this.communicationMetadata !== undefined) {
|
627
|
+
output.writeFieldBegin('communicationMetadata', Thrift.Type.STRUCT, 21);
|
628
|
+
this.communicationMetadata.write(output);
|
629
|
+
output.writeFieldEnd();
|
630
|
+
}
|
631
|
+
output.writeFieldStop();
|
632
|
+
output.writeStructEnd();
|
633
|
+
return;
|
634
|
+
}
|
635
|
+
|
636
|
+
};
|
637
|
+
const CommunicationSet = module.exports.CommunicationSet = class {
|
638
|
+
constructor(args) {
|
639
|
+
this.communicationIdList = null;
|
640
|
+
this.corpus = null;
|
641
|
+
this.entityMentionClusterList = null;
|
642
|
+
this.entityClusterList = null;
|
643
|
+
this.situationMentionClusterList = null;
|
644
|
+
this.situationClusterList = null;
|
645
|
+
if (args) {
|
646
|
+
if (args.communicationIdList !== undefined && args.communicationIdList !== null) {
|
647
|
+
this.communicationIdList = Thrift.copyList(args.communicationIdList, [uuid_ttypes.UUID]);
|
648
|
+
}
|
649
|
+
if (args.corpus !== undefined && args.corpus !== null) {
|
650
|
+
this.corpus = args.corpus;
|
651
|
+
}
|
652
|
+
if (args.entityMentionClusterList !== undefined && args.entityMentionClusterList !== null) {
|
653
|
+
this.entityMentionClusterList = Thrift.copyList(args.entityMentionClusterList, [cluster_ttypes.Clustering]);
|
654
|
+
}
|
655
|
+
if (args.entityClusterList !== undefined && args.entityClusterList !== null) {
|
656
|
+
this.entityClusterList = Thrift.copyList(args.entityClusterList, [cluster_ttypes.Clustering]);
|
657
|
+
}
|
658
|
+
if (args.situationMentionClusterList !== undefined && args.situationMentionClusterList !== null) {
|
659
|
+
this.situationMentionClusterList = Thrift.copyList(args.situationMentionClusterList, [cluster_ttypes.Clustering]);
|
660
|
+
}
|
661
|
+
if (args.situationClusterList !== undefined && args.situationClusterList !== null) {
|
662
|
+
this.situationClusterList = Thrift.copyList(args.situationClusterList, [cluster_ttypes.Clustering]);
|
663
|
+
}
|
664
|
+
}
|
665
|
+
}
|
666
|
+
|
667
|
+
read (input) {
|
668
|
+
input.readStructBegin();
|
669
|
+
while (true) {
|
670
|
+
const ret = input.readFieldBegin();
|
671
|
+
const ftype = ret.ftype;
|
672
|
+
const fid = ret.fid;
|
673
|
+
if (ftype == Thrift.Type.STOP) {
|
674
|
+
break;
|
675
|
+
}
|
676
|
+
switch (fid) {
|
677
|
+
case 1:
|
678
|
+
if (ftype == Thrift.Type.LIST) {
|
679
|
+
this.communicationIdList = [];
|
680
|
+
const _rtmp353 = input.readListBegin();
|
681
|
+
const _size52 = _rtmp353.size || 0;
|
682
|
+
for (let _i54 = 0; _i54 < _size52; ++_i54) {
|
683
|
+
let elem55 = null;
|
684
|
+
elem55 = new uuid_ttypes.UUID();
|
685
|
+
elem55.read(input);
|
686
|
+
this.communicationIdList.push(elem55);
|
687
|
+
}
|
688
|
+
input.readListEnd();
|
689
|
+
} else {
|
690
|
+
input.skip(ftype);
|
691
|
+
}
|
692
|
+
break;
|
693
|
+
case 2:
|
694
|
+
if (ftype == Thrift.Type.STRING) {
|
695
|
+
this.corpus = input.readString();
|
696
|
+
} else {
|
697
|
+
input.skip(ftype);
|
698
|
+
}
|
699
|
+
break;
|
700
|
+
case 3:
|
701
|
+
if (ftype == Thrift.Type.LIST) {
|
702
|
+
this.entityMentionClusterList = [];
|
703
|
+
const _rtmp357 = input.readListBegin();
|
704
|
+
const _size56 = _rtmp357.size || 0;
|
705
|
+
for (let _i58 = 0; _i58 < _size56; ++_i58) {
|
706
|
+
let elem59 = null;
|
707
|
+
elem59 = new cluster_ttypes.Clustering();
|
708
|
+
elem59.read(input);
|
709
|
+
this.entityMentionClusterList.push(elem59);
|
710
|
+
}
|
711
|
+
input.readListEnd();
|
712
|
+
} else {
|
713
|
+
input.skip(ftype);
|
714
|
+
}
|
715
|
+
break;
|
716
|
+
case 4:
|
717
|
+
if (ftype == Thrift.Type.LIST) {
|
718
|
+
this.entityClusterList = [];
|
719
|
+
const _rtmp361 = input.readListBegin();
|
720
|
+
const _size60 = _rtmp361.size || 0;
|
721
|
+
for (let _i62 = 0; _i62 < _size60; ++_i62) {
|
722
|
+
let elem63 = null;
|
723
|
+
elem63 = new cluster_ttypes.Clustering();
|
724
|
+
elem63.read(input);
|
725
|
+
this.entityClusterList.push(elem63);
|
726
|
+
}
|
727
|
+
input.readListEnd();
|
728
|
+
} else {
|
729
|
+
input.skip(ftype);
|
730
|
+
}
|
731
|
+
break;
|
732
|
+
case 5:
|
733
|
+
if (ftype == Thrift.Type.LIST) {
|
734
|
+
this.situationMentionClusterList = [];
|
735
|
+
const _rtmp365 = input.readListBegin();
|
736
|
+
const _size64 = _rtmp365.size || 0;
|
737
|
+
for (let _i66 = 0; _i66 < _size64; ++_i66) {
|
738
|
+
let elem67 = null;
|
739
|
+
elem67 = new cluster_ttypes.Clustering();
|
740
|
+
elem67.read(input);
|
741
|
+
this.situationMentionClusterList.push(elem67);
|
742
|
+
}
|
743
|
+
input.readListEnd();
|
744
|
+
} else {
|
745
|
+
input.skip(ftype);
|
746
|
+
}
|
747
|
+
break;
|
748
|
+
case 6:
|
749
|
+
if (ftype == Thrift.Type.LIST) {
|
750
|
+
this.situationClusterList = [];
|
751
|
+
const _rtmp369 = input.readListBegin();
|
752
|
+
const _size68 = _rtmp369.size || 0;
|
753
|
+
for (let _i70 = 0; _i70 < _size68; ++_i70) {
|
754
|
+
let elem71 = null;
|
755
|
+
elem71 = new cluster_ttypes.Clustering();
|
756
|
+
elem71.read(input);
|
757
|
+
this.situationClusterList.push(elem71);
|
758
|
+
}
|
759
|
+
input.readListEnd();
|
760
|
+
} else {
|
761
|
+
input.skip(ftype);
|
762
|
+
}
|
763
|
+
break;
|
764
|
+
default:
|
765
|
+
input.skip(ftype);
|
766
|
+
}
|
767
|
+
input.readFieldEnd();
|
768
|
+
}
|
769
|
+
input.readStructEnd();
|
770
|
+
return;
|
771
|
+
}
|
772
|
+
|
773
|
+
write (output) {
|
774
|
+
output.writeStructBegin('CommunicationSet');
|
775
|
+
if (this.communicationIdList !== null && this.communicationIdList !== undefined) {
|
776
|
+
output.writeFieldBegin('communicationIdList', Thrift.Type.LIST, 1);
|
777
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.communicationIdList.length);
|
778
|
+
for (let iter72 in this.communicationIdList) {
|
779
|
+
if (this.communicationIdList.hasOwnProperty(iter72)) {
|
780
|
+
iter72 = this.communicationIdList[iter72];
|
781
|
+
iter72.write(output);
|
782
|
+
}
|
783
|
+
}
|
784
|
+
output.writeListEnd();
|
785
|
+
output.writeFieldEnd();
|
786
|
+
}
|
787
|
+
if (this.corpus !== null && this.corpus !== undefined) {
|
788
|
+
output.writeFieldBegin('corpus', Thrift.Type.STRING, 2);
|
789
|
+
output.writeString(this.corpus);
|
790
|
+
output.writeFieldEnd();
|
791
|
+
}
|
792
|
+
if (this.entityMentionClusterList !== null && this.entityMentionClusterList !== undefined) {
|
793
|
+
output.writeFieldBegin('entityMentionClusterList', Thrift.Type.LIST, 3);
|
794
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.entityMentionClusterList.length);
|
795
|
+
for (let iter73 in this.entityMentionClusterList) {
|
796
|
+
if (this.entityMentionClusterList.hasOwnProperty(iter73)) {
|
797
|
+
iter73 = this.entityMentionClusterList[iter73];
|
798
|
+
iter73.write(output);
|
799
|
+
}
|
800
|
+
}
|
801
|
+
output.writeListEnd();
|
802
|
+
output.writeFieldEnd();
|
803
|
+
}
|
804
|
+
if (this.entityClusterList !== null && this.entityClusterList !== undefined) {
|
805
|
+
output.writeFieldBegin('entityClusterList', Thrift.Type.LIST, 4);
|
806
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.entityClusterList.length);
|
807
|
+
for (let iter74 in this.entityClusterList) {
|
808
|
+
if (this.entityClusterList.hasOwnProperty(iter74)) {
|
809
|
+
iter74 = this.entityClusterList[iter74];
|
810
|
+
iter74.write(output);
|
811
|
+
}
|
812
|
+
}
|
813
|
+
output.writeListEnd();
|
814
|
+
output.writeFieldEnd();
|
815
|
+
}
|
816
|
+
if (this.situationMentionClusterList !== null && this.situationMentionClusterList !== undefined) {
|
817
|
+
output.writeFieldBegin('situationMentionClusterList', Thrift.Type.LIST, 5);
|
818
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.situationMentionClusterList.length);
|
819
|
+
for (let iter75 in this.situationMentionClusterList) {
|
820
|
+
if (this.situationMentionClusterList.hasOwnProperty(iter75)) {
|
821
|
+
iter75 = this.situationMentionClusterList[iter75];
|
822
|
+
iter75.write(output);
|
823
|
+
}
|
824
|
+
}
|
825
|
+
output.writeListEnd();
|
826
|
+
output.writeFieldEnd();
|
827
|
+
}
|
828
|
+
if (this.situationClusterList !== null && this.situationClusterList !== undefined) {
|
829
|
+
output.writeFieldBegin('situationClusterList', Thrift.Type.LIST, 6);
|
830
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.situationClusterList.length);
|
831
|
+
for (let iter76 in this.situationClusterList) {
|
832
|
+
if (this.situationClusterList.hasOwnProperty(iter76)) {
|
833
|
+
iter76 = this.situationClusterList[iter76];
|
834
|
+
iter76.write(output);
|
835
|
+
}
|
836
|
+
}
|
837
|
+
output.writeListEnd();
|
838
|
+
output.writeFieldEnd();
|
839
|
+
}
|
840
|
+
output.writeFieldStop();
|
841
|
+
output.writeStructEnd();
|
842
|
+
return;
|
843
|
+
}
|
844
|
+
|
845
|
+
};
|