@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.
Files changed (42) hide show
  1. package/ActiveLearnerClientService.js +249 -249
  2. package/ActiveLearnerServerService.js +642 -642
  3. package/AnnotateCommunicationService.js +696 -696
  4. package/AnnotateWithContextService.js +298 -298
  5. package/FeedbackService.js +750 -750
  6. package/FetchCommunicationService.js +709 -709
  7. package/README.md +125 -0
  8. package/ResultsServerService.js +2138 -2138
  9. package/SearchProxyService.js +962 -962
  10. package/SearchService.js +685 -685
  11. package/Service.js +373 -373
  12. package/StoreCommunicationService.js +255 -255
  13. package/SummarizationService.js +479 -479
  14. package/access_types.js +168 -168
  15. package/annotate_types.js +26 -26
  16. package/audio_types.js +110 -110
  17. package/cluster_types.js +398 -398
  18. package/communication_fu.js +432 -432
  19. package/communication_types.js +845 -845
  20. package/concrete.js +64 -64
  21. package/context_types.js +65 -65
  22. package/email_types.js +477 -477
  23. package/entities_types.js +658 -658
  24. package/ex_types.js +82 -82
  25. package/language_types.js +123 -123
  26. package/learn_types.js +207 -207
  27. package/linking_types.js +286 -286
  28. package/metadata_types.js +926 -926
  29. package/nitf_types.js +1005 -1005
  30. package/package.json +26 -5
  31. package/results_types.js +18 -18
  32. package/search_types.js +661 -661
  33. package/services_types.js +384 -384
  34. package/situations_types.js +1268 -1268
  35. package/spans_types.js +151 -151
  36. package/structure_types.js +2311 -2311
  37. package/summarization_types.js +433 -433
  38. package/tokenization_fu.js +33 -33
  39. package/tokentagging_fu.js +241 -241
  40. package/twitter_types.js +1553 -1553
  41. package/util.js +117 -117
  42. package/uuid_types.js +67 -67
package/linking_types.js CHANGED
@@ -1,286 +1,286 @@
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 metadata_ttypes = require('./metadata_types');
14
-
15
-
16
- const ttypes = module.exports = {};
17
- const LinkTarget = module.exports.LinkTarget = class {
18
- constructor(args) {
19
- this.confidence = null;
20
- this.targetId = null;
21
- this.dbId = null;
22
- this.dbName = null;
23
- if (args) {
24
- if (args.confidence !== undefined && args.confidence !== null) {
25
- this.confidence = args.confidence;
26
- }
27
- if (args.targetId !== undefined && args.targetId !== null) {
28
- this.targetId = new uuid_ttypes.UUID(args.targetId);
29
- }
30
- if (args.dbId !== undefined && args.dbId !== null) {
31
- this.dbId = args.dbId;
32
- }
33
- if (args.dbName !== undefined && args.dbName !== null) {
34
- this.dbName = args.dbName;
35
- }
36
- }
37
- }
38
-
39
- read (input) {
40
- input.readStructBegin();
41
- while (true) {
42
- const ret = input.readFieldBegin();
43
- const ftype = ret.ftype;
44
- const fid = ret.fid;
45
- if (ftype == Thrift.Type.STOP) {
46
- break;
47
- }
48
- switch (fid) {
49
- case 1:
50
- if (ftype == Thrift.Type.DOUBLE) {
51
- this.confidence = input.readDouble();
52
- } else {
53
- input.skip(ftype);
54
- }
55
- break;
56
- case 2:
57
- if (ftype == Thrift.Type.STRUCT) {
58
- this.targetId = new uuid_ttypes.UUID();
59
- this.targetId.read(input);
60
- } else {
61
- input.skip(ftype);
62
- }
63
- break;
64
- case 3:
65
- if (ftype == Thrift.Type.STRING) {
66
- this.dbId = input.readString();
67
- } else {
68
- input.skip(ftype);
69
- }
70
- break;
71
- case 4:
72
- if (ftype == Thrift.Type.STRING) {
73
- this.dbName = input.readString();
74
- } else {
75
- input.skip(ftype);
76
- }
77
- break;
78
- default:
79
- input.skip(ftype);
80
- }
81
- input.readFieldEnd();
82
- }
83
- input.readStructEnd();
84
- return;
85
- }
86
-
87
- write (output) {
88
- output.writeStructBegin('LinkTarget');
89
- if (this.confidence !== null && this.confidence !== undefined) {
90
- output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 1);
91
- output.writeDouble(this.confidence);
92
- output.writeFieldEnd();
93
- }
94
- if (this.targetId !== null && this.targetId !== undefined) {
95
- output.writeFieldBegin('targetId', Thrift.Type.STRUCT, 2);
96
- this.targetId.write(output);
97
- output.writeFieldEnd();
98
- }
99
- if (this.dbId !== null && this.dbId !== undefined) {
100
- output.writeFieldBegin('dbId', Thrift.Type.STRING, 3);
101
- output.writeString(this.dbId);
102
- output.writeFieldEnd();
103
- }
104
- if (this.dbName !== null && this.dbName !== undefined) {
105
- output.writeFieldBegin('dbName', Thrift.Type.STRING, 4);
106
- output.writeString(this.dbName);
107
- output.writeFieldEnd();
108
- }
109
- output.writeFieldStop();
110
- output.writeStructEnd();
111
- return;
112
- }
113
-
114
- };
115
- const Link = module.exports.Link = class {
116
- constructor(args) {
117
- this.sourceId = null;
118
- this.linkTargetList = null;
119
- if (args) {
120
- if (args.sourceId !== undefined && args.sourceId !== null) {
121
- this.sourceId = new uuid_ttypes.UUID(args.sourceId);
122
- } else {
123
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sourceId is unset!');
124
- }
125
- if (args.linkTargetList !== undefined && args.linkTargetList !== null) {
126
- this.linkTargetList = Thrift.copyList(args.linkTargetList, [ttypes.LinkTarget]);
127
- } else {
128
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkTargetList is unset!');
129
- }
130
- }
131
- }
132
-
133
- read (input) {
134
- input.readStructBegin();
135
- while (true) {
136
- const ret = input.readFieldBegin();
137
- const ftype = ret.ftype;
138
- const fid = ret.fid;
139
- if (ftype == Thrift.Type.STOP) {
140
- break;
141
- }
142
- switch (fid) {
143
- case 1:
144
- if (ftype == Thrift.Type.STRUCT) {
145
- this.sourceId = new uuid_ttypes.UUID();
146
- this.sourceId.read(input);
147
- } else {
148
- input.skip(ftype);
149
- }
150
- break;
151
- case 2:
152
- if (ftype == Thrift.Type.LIST) {
153
- this.linkTargetList = [];
154
- const _rtmp31 = input.readListBegin();
155
- const _size0 = _rtmp31.size || 0;
156
- for (let _i2 = 0; _i2 < _size0; ++_i2) {
157
- let elem3 = null;
158
- elem3 = new ttypes.LinkTarget();
159
- elem3.read(input);
160
- this.linkTargetList.push(elem3);
161
- }
162
- input.readListEnd();
163
- } else {
164
- input.skip(ftype);
165
- }
166
- break;
167
- default:
168
- input.skip(ftype);
169
- }
170
- input.readFieldEnd();
171
- }
172
- input.readStructEnd();
173
- return;
174
- }
175
-
176
- write (output) {
177
- output.writeStructBegin('Link');
178
- if (this.sourceId !== null && this.sourceId !== undefined) {
179
- output.writeFieldBegin('sourceId', Thrift.Type.STRUCT, 1);
180
- this.sourceId.write(output);
181
- output.writeFieldEnd();
182
- }
183
- if (this.linkTargetList !== null && this.linkTargetList !== undefined) {
184
- output.writeFieldBegin('linkTargetList', Thrift.Type.LIST, 2);
185
- output.writeListBegin(Thrift.Type.STRUCT, this.linkTargetList.length);
186
- for (let iter4 in this.linkTargetList) {
187
- if (this.linkTargetList.hasOwnProperty(iter4)) {
188
- iter4 = this.linkTargetList[iter4];
189
- iter4.write(output);
190
- }
191
- }
192
- output.writeListEnd();
193
- output.writeFieldEnd();
194
- }
195
- output.writeFieldStop();
196
- output.writeStructEnd();
197
- return;
198
- }
199
-
200
- };
201
- const Linking = module.exports.Linking = class {
202
- constructor(args) {
203
- this.metadata = null;
204
- this.linkList = null;
205
- if (args) {
206
- if (args.metadata !== undefined && args.metadata !== null) {
207
- this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
208
- } else {
209
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
210
- }
211
- if (args.linkList !== undefined && args.linkList !== null) {
212
- this.linkList = Thrift.copyList(args.linkList, [ttypes.Link]);
213
- } else {
214
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkList is unset!');
215
- }
216
- }
217
- }
218
-
219
- read (input) {
220
- input.readStructBegin();
221
- while (true) {
222
- const ret = input.readFieldBegin();
223
- const ftype = ret.ftype;
224
- const fid = ret.fid;
225
- if (ftype == Thrift.Type.STOP) {
226
- break;
227
- }
228
- switch (fid) {
229
- case 1:
230
- if (ftype == Thrift.Type.STRUCT) {
231
- this.metadata = new metadata_ttypes.AnnotationMetadata();
232
- this.metadata.read(input);
233
- } else {
234
- input.skip(ftype);
235
- }
236
- break;
237
- case 2:
238
- if (ftype == Thrift.Type.LIST) {
239
- this.linkList = [];
240
- const _rtmp36 = input.readListBegin();
241
- const _size5 = _rtmp36.size || 0;
242
- for (let _i7 = 0; _i7 < _size5; ++_i7) {
243
- let elem8 = null;
244
- elem8 = new ttypes.Link();
245
- elem8.read(input);
246
- this.linkList.push(elem8);
247
- }
248
- input.readListEnd();
249
- } else {
250
- input.skip(ftype);
251
- }
252
- break;
253
- default:
254
- input.skip(ftype);
255
- }
256
- input.readFieldEnd();
257
- }
258
- input.readStructEnd();
259
- return;
260
- }
261
-
262
- write (output) {
263
- output.writeStructBegin('Linking');
264
- if (this.metadata !== null && this.metadata !== undefined) {
265
- output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 1);
266
- this.metadata.write(output);
267
- output.writeFieldEnd();
268
- }
269
- if (this.linkList !== null && this.linkList !== undefined) {
270
- output.writeFieldBegin('linkList', Thrift.Type.LIST, 2);
271
- output.writeListBegin(Thrift.Type.STRUCT, this.linkList.length);
272
- for (let iter9 in this.linkList) {
273
- if (this.linkList.hasOwnProperty(iter9)) {
274
- iter9 = this.linkList[iter9];
275
- iter9.write(output);
276
- }
277
- }
278
- output.writeListEnd();
279
- output.writeFieldEnd();
280
- }
281
- output.writeFieldStop();
282
- output.writeStructEnd();
283
- return;
284
- }
285
-
286
- };
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 metadata_ttypes = require('./metadata_types');
14
+
15
+
16
+ const ttypes = module.exports = {};
17
+ const LinkTarget = module.exports.LinkTarget = class {
18
+ constructor(args) {
19
+ this.confidence = null;
20
+ this.targetId = null;
21
+ this.dbId = null;
22
+ this.dbName = null;
23
+ if (args) {
24
+ if (args.confidence !== undefined && args.confidence !== null) {
25
+ this.confidence = args.confidence;
26
+ }
27
+ if (args.targetId !== undefined && args.targetId !== null) {
28
+ this.targetId = new uuid_ttypes.UUID(args.targetId);
29
+ }
30
+ if (args.dbId !== undefined && args.dbId !== null) {
31
+ this.dbId = args.dbId;
32
+ }
33
+ if (args.dbName !== undefined && args.dbName !== null) {
34
+ this.dbName = args.dbName;
35
+ }
36
+ }
37
+ }
38
+
39
+ read (input) {
40
+ input.readStructBegin();
41
+ while (true) {
42
+ const ret = input.readFieldBegin();
43
+ const ftype = ret.ftype;
44
+ const fid = ret.fid;
45
+ if (ftype == Thrift.Type.STOP) {
46
+ break;
47
+ }
48
+ switch (fid) {
49
+ case 1:
50
+ if (ftype == Thrift.Type.DOUBLE) {
51
+ this.confidence = input.readDouble();
52
+ } else {
53
+ input.skip(ftype);
54
+ }
55
+ break;
56
+ case 2:
57
+ if (ftype == Thrift.Type.STRUCT) {
58
+ this.targetId = new uuid_ttypes.UUID();
59
+ this.targetId.read(input);
60
+ } else {
61
+ input.skip(ftype);
62
+ }
63
+ break;
64
+ case 3:
65
+ if (ftype == Thrift.Type.STRING) {
66
+ this.dbId = input.readString();
67
+ } else {
68
+ input.skip(ftype);
69
+ }
70
+ break;
71
+ case 4:
72
+ if (ftype == Thrift.Type.STRING) {
73
+ this.dbName = input.readString();
74
+ } else {
75
+ input.skip(ftype);
76
+ }
77
+ break;
78
+ default:
79
+ input.skip(ftype);
80
+ }
81
+ input.readFieldEnd();
82
+ }
83
+ input.readStructEnd();
84
+ return;
85
+ }
86
+
87
+ write (output) {
88
+ output.writeStructBegin('LinkTarget');
89
+ if (this.confidence !== null && this.confidence !== undefined) {
90
+ output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 1);
91
+ output.writeDouble(this.confidence);
92
+ output.writeFieldEnd();
93
+ }
94
+ if (this.targetId !== null && this.targetId !== undefined) {
95
+ output.writeFieldBegin('targetId', Thrift.Type.STRUCT, 2);
96
+ this.targetId.write(output);
97
+ output.writeFieldEnd();
98
+ }
99
+ if (this.dbId !== null && this.dbId !== undefined) {
100
+ output.writeFieldBegin('dbId', Thrift.Type.STRING, 3);
101
+ output.writeString(this.dbId);
102
+ output.writeFieldEnd();
103
+ }
104
+ if (this.dbName !== null && this.dbName !== undefined) {
105
+ output.writeFieldBegin('dbName', Thrift.Type.STRING, 4);
106
+ output.writeString(this.dbName);
107
+ output.writeFieldEnd();
108
+ }
109
+ output.writeFieldStop();
110
+ output.writeStructEnd();
111
+ return;
112
+ }
113
+
114
+ };
115
+ const Link = module.exports.Link = class {
116
+ constructor(args) {
117
+ this.sourceId = null;
118
+ this.linkTargetList = null;
119
+ if (args) {
120
+ if (args.sourceId !== undefined && args.sourceId !== null) {
121
+ this.sourceId = new uuid_ttypes.UUID(args.sourceId);
122
+ } else {
123
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sourceId is unset!');
124
+ }
125
+ if (args.linkTargetList !== undefined && args.linkTargetList !== null) {
126
+ this.linkTargetList = Thrift.copyList(args.linkTargetList, [ttypes.LinkTarget]);
127
+ } else {
128
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkTargetList is unset!');
129
+ }
130
+ }
131
+ }
132
+
133
+ read (input) {
134
+ input.readStructBegin();
135
+ while (true) {
136
+ const ret = input.readFieldBegin();
137
+ const ftype = ret.ftype;
138
+ const fid = ret.fid;
139
+ if (ftype == Thrift.Type.STOP) {
140
+ break;
141
+ }
142
+ switch (fid) {
143
+ case 1:
144
+ if (ftype == Thrift.Type.STRUCT) {
145
+ this.sourceId = new uuid_ttypes.UUID();
146
+ this.sourceId.read(input);
147
+ } else {
148
+ input.skip(ftype);
149
+ }
150
+ break;
151
+ case 2:
152
+ if (ftype == Thrift.Type.LIST) {
153
+ this.linkTargetList = [];
154
+ const _rtmp31 = input.readListBegin();
155
+ const _size0 = _rtmp31.size || 0;
156
+ for (let _i2 = 0; _i2 < _size0; ++_i2) {
157
+ let elem3 = null;
158
+ elem3 = new ttypes.LinkTarget();
159
+ elem3.read(input);
160
+ this.linkTargetList.push(elem3);
161
+ }
162
+ input.readListEnd();
163
+ } else {
164
+ input.skip(ftype);
165
+ }
166
+ break;
167
+ default:
168
+ input.skip(ftype);
169
+ }
170
+ input.readFieldEnd();
171
+ }
172
+ input.readStructEnd();
173
+ return;
174
+ }
175
+
176
+ write (output) {
177
+ output.writeStructBegin('Link');
178
+ if (this.sourceId !== null && this.sourceId !== undefined) {
179
+ output.writeFieldBegin('sourceId', Thrift.Type.STRUCT, 1);
180
+ this.sourceId.write(output);
181
+ output.writeFieldEnd();
182
+ }
183
+ if (this.linkTargetList !== null && this.linkTargetList !== undefined) {
184
+ output.writeFieldBegin('linkTargetList', Thrift.Type.LIST, 2);
185
+ output.writeListBegin(Thrift.Type.STRUCT, this.linkTargetList.length);
186
+ for (let iter4 in this.linkTargetList) {
187
+ if (this.linkTargetList.hasOwnProperty(iter4)) {
188
+ iter4 = this.linkTargetList[iter4];
189
+ iter4.write(output);
190
+ }
191
+ }
192
+ output.writeListEnd();
193
+ output.writeFieldEnd();
194
+ }
195
+ output.writeFieldStop();
196
+ output.writeStructEnd();
197
+ return;
198
+ }
199
+
200
+ };
201
+ const Linking = module.exports.Linking = class {
202
+ constructor(args) {
203
+ this.metadata = null;
204
+ this.linkList = null;
205
+ if (args) {
206
+ if (args.metadata !== undefined && args.metadata !== null) {
207
+ this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
208
+ } else {
209
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
210
+ }
211
+ if (args.linkList !== undefined && args.linkList !== null) {
212
+ this.linkList = Thrift.copyList(args.linkList, [ttypes.Link]);
213
+ } else {
214
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkList is unset!');
215
+ }
216
+ }
217
+ }
218
+
219
+ read (input) {
220
+ input.readStructBegin();
221
+ while (true) {
222
+ const ret = input.readFieldBegin();
223
+ const ftype = ret.ftype;
224
+ const fid = ret.fid;
225
+ if (ftype == Thrift.Type.STOP) {
226
+ break;
227
+ }
228
+ switch (fid) {
229
+ case 1:
230
+ if (ftype == Thrift.Type.STRUCT) {
231
+ this.metadata = new metadata_ttypes.AnnotationMetadata();
232
+ this.metadata.read(input);
233
+ } else {
234
+ input.skip(ftype);
235
+ }
236
+ break;
237
+ case 2:
238
+ if (ftype == Thrift.Type.LIST) {
239
+ this.linkList = [];
240
+ const _rtmp36 = input.readListBegin();
241
+ const _size5 = _rtmp36.size || 0;
242
+ for (let _i7 = 0; _i7 < _size5; ++_i7) {
243
+ let elem8 = null;
244
+ elem8 = new ttypes.Link();
245
+ elem8.read(input);
246
+ this.linkList.push(elem8);
247
+ }
248
+ input.readListEnd();
249
+ } else {
250
+ input.skip(ftype);
251
+ }
252
+ break;
253
+ default:
254
+ input.skip(ftype);
255
+ }
256
+ input.readFieldEnd();
257
+ }
258
+ input.readStructEnd();
259
+ return;
260
+ }
261
+
262
+ write (output) {
263
+ output.writeStructBegin('Linking');
264
+ if (this.metadata !== null && this.metadata !== undefined) {
265
+ output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 1);
266
+ this.metadata.write(output);
267
+ output.writeFieldEnd();
268
+ }
269
+ if (this.linkList !== null && this.linkList !== undefined) {
270
+ output.writeFieldBegin('linkList', Thrift.Type.LIST, 2);
271
+ output.writeListBegin(Thrift.Type.STRUCT, this.linkList.length);
272
+ for (let iter9 in this.linkList) {
273
+ if (this.linkList.hasOwnProperty(iter9)) {
274
+ iter9 = this.linkList[iter9];
275
+ iter9.write(output);
276
+ }
277
+ }
278
+ output.writeListEnd();
279
+ output.writeFieldEnd();
280
+ }
281
+ output.writeFieldStop();
282
+ output.writeStructEnd();
283
+ return;
284
+ }
285
+
286
+ };