ekms 7.12.8 → 8.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +192 -406
- package/common/animals.js +1 -1
- package/common/avatar.js +7 -5
- package/common/characters.js +12 -6
- package/common/{pipboyTemplate.instance.json → colors.instance.json} +13784 -8900
- package/common/colors.js +71 -0
- package/common/colors.test.json +4860 -0
- package/common/concept.js +2 -2
- package/common/crew.instance.json +3945 -3636
- package/common/crew.js +5 -3
- package/common/currency.js +0 -2
- package/common/dialogues.js +152 -20
- package/common/dialogues.test.json +1053 -33
- package/common/dimension.instance.json +750 -86
- package/common/dimension.js +15 -7
- package/common/dimension.test.json +289 -312
- package/common/edible.instance.json +446 -578
- package/common/edible.js +1 -1
- package/common/emotions.instance.json +67 -39
- package/common/emotions.js +1 -1
- package/common/fastfood.instance.json +1769 -2136
- package/common/fastfood.js +2 -2
- package/common/fastfood.test.json +7941 -3647
- package/common/formulas.instance.json +996 -0
- package/common/formulas.js +19 -6
- package/common/formulas.test.json +504 -2896
- package/common/gdefaults.js +2 -0
- package/common/help.js +7 -2
- package/common/help.test.json +18 -10
- package/common/helpers/concept.js +29 -9
- package/common/helpers/dialogues.js +17 -1
- package/common/helpers/formulas.js +0 -14
- package/common/helpers/meta.js +0 -1
- package/common/helpers/properties.js +6 -13
- package/common/helpers.js +5 -0
- package/common/javascript.js +8 -6
- package/common/kirk.instance.json +5 -1
- package/common/kirk.js +1 -1
- package/common/length.instance.json +417 -811
- package/common/length.js +1 -1
- package/common/math.instance.json +1938 -1
- package/common/math.js +17 -5
- package/common/meta.instance.json +1 -1
- package/common/meta.js +33 -10
- package/common/numbers.js +28 -24
- package/common/ordering.instance.json +98 -138
- package/common/ordering.js +1 -1
- package/common/people.instance.json +68 -121
- package/common/people.js +1 -1
- package/common/pipboy.instance.json +23411 -1076
- package/common/pipboy.js +31 -4
- package/common/pipboy.test.json +13 -9
- package/common/pokemon.instance.json +172 -223
- package/common/pokemon.js +1 -1
- package/common/pressure.instance.json +131 -81
- package/common/pressure.js +1 -1
- package/common/properties.instance.json +25 -49
- package/common/properties.js +20 -15
- package/common/properties.test.json +17605 -4030
- package/common/punctuation.js +8 -0
- package/common/punctuation.test.json +233 -5
- package/common/reports.instance.json +33 -65
- package/common/reports.js +9 -9
- package/common/scorekeeper.instance.json +1 -1
- package/common/scorekeeper.js +9 -7
- package/common/sizeable.js +7 -2
- package/common/spock.instance.json +5 -1
- package/common/spock.js +1 -1
- package/common/stm.js +16 -5
- package/common/tell.js +4 -2
- package/common/temperature.instance.json +142 -252
- package/common/temperature.js +1 -1
- package/common/testing.js +0 -1
- package/common/time.js +36 -20
- package/common/time.test.json +66 -44
- package/common/tokenize.js +47 -0
- package/common/tokenize.test.json +87 -0
- package/common/ui.instance.json +13 -1
- package/common/ui.js +0 -1
- package/common/weight.instance.json +335 -228
- package/common/weight.js +1 -1
- package/common/weight.test.json +242 -238
- package/main.js +6 -8
- package/package.json +10 -18
- package/common/dimensionTemplate.instance.json +0 -582
- package/common/dimensionTemplate.js +0 -35
- package/common/dimensionTemplate.test.json +0 -2
- package/common/formulasTemplate.instance.json +0 -483
- package/common/formulasTemplate.js +0 -30
- package/common/formulasTemplate.test.json +0 -2
- package/common/mathTemplate.instance.json +0 -1635
- package/common/mathTemplate.js +0 -32
- package/common/mathTemplate.test.json +0 -1422
- package/common/pipboyTemplate.js +0 -48
- package/common/pipboyTemplate.test.json +0 -2
@@ -1,18 +1,270 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"dimension and unit are concepts"
|
2
|
+
"configs": [
|
3
|
+
"dimension and unit are concepts",
|
4
|
+
{
|
5
|
+
"name": "dimension",
|
6
|
+
"operators": [
|
7
|
+
"([dimension])",
|
8
|
+
"([unit])",
|
9
|
+
"((amount/1 || number/1) [amountOfDimension|] ([unit]))",
|
10
|
+
"(([amount]) [unit])",
|
11
|
+
"((dimension/1) [convertToUnits|in] (unit/1))",
|
12
|
+
"(([number]) [degree])",
|
13
|
+
{
|
14
|
+
"pattern": "([length])",
|
15
|
+
"development": true
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"priorities": [
|
19
|
+
{
|
20
|
+
"context": [
|
21
|
+
[
|
22
|
+
"amountOfDimension",
|
23
|
+
0
|
24
|
+
],
|
25
|
+
[
|
26
|
+
"convertToUnits",
|
27
|
+
0
|
28
|
+
]
|
29
|
+
],
|
30
|
+
"choose": [
|
31
|
+
0
|
32
|
+
]
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"hierarchy": [
|
36
|
+
{
|
37
|
+
"child": "convertToUnits",
|
38
|
+
"parent": "testingValue",
|
39
|
+
"development": true
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"generators": [
|
43
|
+
{
|
44
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:77",
|
45
|
+
"match": "({context}) => context.marker == 'noconversion'",
|
46
|
+
"apply": "({context, gp}) => `there is no conversion between ${gp(context.from)} and ${gp(context.to)}`"
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"bridges": [
|
50
|
+
{
|
51
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:84",
|
52
|
+
"id": "dimension",
|
53
|
+
"isA": [],
|
54
|
+
"generatorpr": {}
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"id": "length",
|
58
|
+
"isA": [
|
59
|
+
"dimension"
|
60
|
+
],
|
61
|
+
"development": true
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"id": "amount"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:104",
|
68
|
+
"id": "degree",
|
69
|
+
"words": [
|
70
|
+
{
|
71
|
+
"word": "degrees",
|
72
|
+
"number": "many"
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"isA": [
|
76
|
+
"amount"
|
77
|
+
],
|
78
|
+
"generatorp": "({context, g}) => (context.amount) ? `${g(context.amount)} ${context.word}` : context.word",
|
79
|
+
"bridge": "{ ...next(operator), value: before[0].value, amount: before[0] }"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"id": "amountOfDimension",
|
83
|
+
"convolution": true,
|
84
|
+
"bridge": "{ marker: operator('dimension'), unit: after[0], value: before[0].value, amount: before[0] }"
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:117",
|
88
|
+
"id": "convertToUnits",
|
89
|
+
"bridge": "{ ...next(operator), from: before[0], to: after[0] }",
|
90
|
+
"isA": [
|
91
|
+
"expression",
|
92
|
+
"queryable"
|
93
|
+
],
|
94
|
+
"after": [
|
95
|
+
[
|
96
|
+
"possession",
|
97
|
+
0
|
98
|
+
],
|
99
|
+
[
|
100
|
+
"possession",
|
101
|
+
1
|
102
|
+
]
|
103
|
+
],
|
104
|
+
"generatorp": "({context, g}) => `${g(context.from)} ${context.word} ${g(context.to)}`",
|
105
|
+
"evaluator": "({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\n }"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"id": "unit"
|
109
|
+
}
|
110
|
+
]
|
111
|
+
}
|
4
112
|
],
|
5
113
|
"resultss": [
|
6
114
|
{
|
7
115
|
"hierarchy": [
|
116
|
+
[
|
117
|
+
"*",
|
118
|
+
"hierarchyAble"
|
119
|
+
],
|
120
|
+
[
|
121
|
+
"*",
|
122
|
+
"isEdee"
|
123
|
+
],
|
124
|
+
[
|
125
|
+
"*",
|
126
|
+
"isEder"
|
127
|
+
],
|
128
|
+
[
|
129
|
+
"*",
|
130
|
+
"mathematical_operator"
|
131
|
+
],
|
132
|
+
[
|
133
|
+
"*",
|
134
|
+
"object"
|
135
|
+
],
|
136
|
+
[
|
137
|
+
"*",
|
138
|
+
"property"
|
139
|
+
],
|
140
|
+
[
|
141
|
+
"*",
|
142
|
+
"queryable"
|
143
|
+
],
|
144
|
+
[
|
145
|
+
"*",
|
146
|
+
"theAble"
|
147
|
+
],
|
148
|
+
[
|
149
|
+
"+",
|
150
|
+
"hierarchyAble"
|
151
|
+
],
|
152
|
+
[
|
153
|
+
"+",
|
154
|
+
"isEdee"
|
155
|
+
],
|
156
|
+
[
|
157
|
+
"+",
|
158
|
+
"isEder"
|
159
|
+
],
|
160
|
+
[
|
161
|
+
"+",
|
162
|
+
"mathematical_operator"
|
163
|
+
],
|
164
|
+
[
|
165
|
+
"+",
|
166
|
+
"object"
|
167
|
+
],
|
168
|
+
[
|
169
|
+
"+",
|
170
|
+
"property"
|
171
|
+
],
|
172
|
+
[
|
173
|
+
"+",
|
174
|
+
"queryable"
|
175
|
+
],
|
176
|
+
[
|
177
|
+
"+",
|
178
|
+
"theAble"
|
179
|
+
],
|
180
|
+
[
|
181
|
+
"-",
|
182
|
+
"hierarchyAble"
|
183
|
+
],
|
184
|
+
[
|
185
|
+
"-",
|
186
|
+
"isEdee"
|
187
|
+
],
|
188
|
+
[
|
189
|
+
"-",
|
190
|
+
"isEder"
|
191
|
+
],
|
192
|
+
[
|
193
|
+
"-",
|
194
|
+
"mathematical_operator"
|
195
|
+
],
|
196
|
+
[
|
197
|
+
"-",
|
198
|
+
"object"
|
199
|
+
],
|
200
|
+
[
|
201
|
+
"-",
|
202
|
+
"property"
|
203
|
+
],
|
204
|
+
[
|
205
|
+
"-",
|
206
|
+
"queryable"
|
207
|
+
],
|
208
|
+
[
|
209
|
+
"-",
|
210
|
+
"theAble"
|
211
|
+
],
|
212
|
+
[
|
213
|
+
"/",
|
214
|
+
"hierarchyAble"
|
215
|
+
],
|
216
|
+
[
|
217
|
+
"/",
|
218
|
+
"isEdee"
|
219
|
+
],
|
220
|
+
[
|
221
|
+
"/",
|
222
|
+
"isEder"
|
223
|
+
],
|
224
|
+
[
|
225
|
+
"/",
|
226
|
+
"mathematical_operator"
|
227
|
+
],
|
228
|
+
[
|
229
|
+
"/",
|
230
|
+
"object"
|
231
|
+
],
|
232
|
+
[
|
233
|
+
"/",
|
234
|
+
"property"
|
235
|
+
],
|
236
|
+
[
|
237
|
+
"/",
|
238
|
+
"queryable"
|
239
|
+
],
|
240
|
+
[
|
241
|
+
"/",
|
242
|
+
"theAble"
|
243
|
+
],
|
8
244
|
[
|
9
245
|
"a",
|
10
246
|
"articlePOS"
|
11
247
|
],
|
248
|
+
[
|
249
|
+
"adjective",
|
250
|
+
"adjective"
|
251
|
+
],
|
252
|
+
[
|
253
|
+
"all",
|
254
|
+
"quantifier"
|
255
|
+
],
|
12
256
|
[
|
13
257
|
"articlePOS",
|
14
258
|
"articlePOS"
|
15
259
|
],
|
260
|
+
[
|
261
|
+
"between",
|
262
|
+
"preposition"
|
263
|
+
],
|
264
|
+
[
|
265
|
+
"calculate",
|
266
|
+
"verby"
|
267
|
+
],
|
16
268
|
[
|
17
269
|
"canBeDoQuestion",
|
18
270
|
"canBeDoQuestion"
|
@@ -29,6 +281,78 @@
|
|
29
281
|
"concept",
|
30
282
|
"theAble"
|
31
283
|
],
|
284
|
+
[
|
285
|
+
"condition",
|
286
|
+
"condition"
|
287
|
+
],
|
288
|
+
[
|
289
|
+
"countable",
|
290
|
+
"hierarchyAble"
|
291
|
+
],
|
292
|
+
[
|
293
|
+
"divideByExpression",
|
294
|
+
"mathematicalExpression"
|
295
|
+
],
|
296
|
+
[
|
297
|
+
"divideByOperator",
|
298
|
+
"mathematicalOperator"
|
299
|
+
],
|
300
|
+
[
|
301
|
+
"doubleQuote",
|
302
|
+
"queryable"
|
303
|
+
],
|
304
|
+
[
|
305
|
+
"expression",
|
306
|
+
"expression"
|
307
|
+
],
|
308
|
+
[
|
309
|
+
"forVariable",
|
310
|
+
"preposition"
|
311
|
+
],
|
312
|
+
[
|
313
|
+
"formula",
|
314
|
+
"concept"
|
315
|
+
],
|
316
|
+
[
|
317
|
+
"formula",
|
318
|
+
"hierarchyAble"
|
319
|
+
],
|
320
|
+
[
|
321
|
+
"formula",
|
322
|
+
"isEdee"
|
323
|
+
],
|
324
|
+
[
|
325
|
+
"formula",
|
326
|
+
"isEder"
|
327
|
+
],
|
328
|
+
[
|
329
|
+
"formula",
|
330
|
+
"object"
|
331
|
+
],
|
332
|
+
[
|
333
|
+
"formula",
|
334
|
+
"property"
|
335
|
+
],
|
336
|
+
[
|
337
|
+
"formula",
|
338
|
+
"queryable"
|
339
|
+
],
|
340
|
+
[
|
341
|
+
"formula",
|
342
|
+
"theAble"
|
343
|
+
],
|
344
|
+
[
|
345
|
+
"formulaForVariable",
|
346
|
+
"preposition"
|
347
|
+
],
|
348
|
+
[
|
349
|
+
"formulaForVariable",
|
350
|
+
"queryable"
|
351
|
+
],
|
352
|
+
[
|
353
|
+
"hasCountOfPieces",
|
354
|
+
"countable"
|
355
|
+
],
|
32
356
|
[
|
33
357
|
"have",
|
34
358
|
"canBeDoQuestion"
|
@@ -41,6 +365,10 @@
|
|
41
365
|
"hierarchyAble",
|
42
366
|
"queryable"
|
43
367
|
],
|
368
|
+
[
|
369
|
+
"highest",
|
370
|
+
"condition"
|
371
|
+
],
|
44
372
|
[
|
45
373
|
"ifAble",
|
46
374
|
"ifAble"
|
@@ -50,8 +378,16 @@
|
|
50
378
|
"canBeQuestion"
|
51
379
|
],
|
52
380
|
[
|
53
|
-
"
|
54
|
-
"
|
381
|
+
"is",
|
382
|
+
"verby"
|
383
|
+
],
|
384
|
+
[
|
385
|
+
"isEdee",
|
386
|
+
"isEdee"
|
387
|
+
],
|
388
|
+
[
|
389
|
+
"isEder",
|
390
|
+
"isEder"
|
55
391
|
],
|
56
392
|
[
|
57
393
|
"it",
|
@@ -69,10 +405,126 @@
|
|
69
405
|
"it",
|
70
406
|
"toAble"
|
71
407
|
],
|
408
|
+
[
|
409
|
+
"lowest",
|
410
|
+
"condition"
|
411
|
+
],
|
412
|
+
[
|
413
|
+
"mathematical",
|
414
|
+
"hierarchyAble"
|
415
|
+
],
|
416
|
+
[
|
417
|
+
"mathematical",
|
418
|
+
"isEdee"
|
419
|
+
],
|
420
|
+
[
|
421
|
+
"mathematical",
|
422
|
+
"isEder"
|
423
|
+
],
|
424
|
+
[
|
425
|
+
"mathematical",
|
426
|
+
"object"
|
427
|
+
],
|
428
|
+
[
|
429
|
+
"mathematical",
|
430
|
+
"operator_modifier"
|
431
|
+
],
|
432
|
+
[
|
433
|
+
"mathematical",
|
434
|
+
"property"
|
435
|
+
],
|
436
|
+
[
|
437
|
+
"mathematical",
|
438
|
+
"queryable"
|
439
|
+
],
|
440
|
+
[
|
441
|
+
"mathematical",
|
442
|
+
"theAble"
|
443
|
+
],
|
444
|
+
[
|
445
|
+
"mathematicalExpression",
|
446
|
+
"concept"
|
447
|
+
],
|
448
|
+
[
|
449
|
+
"mathematicalExpression",
|
450
|
+
"expression"
|
451
|
+
],
|
452
|
+
[
|
453
|
+
"mathematicalExpression",
|
454
|
+
"number"
|
455
|
+
],
|
456
|
+
[
|
457
|
+
"mathematicalOperator",
|
458
|
+
"mathematicalOperator"
|
459
|
+
],
|
460
|
+
[
|
461
|
+
"mathematical_operator",
|
462
|
+
"adjective"
|
463
|
+
],
|
464
|
+
[
|
465
|
+
"mathematical_operator",
|
466
|
+
"concept"
|
467
|
+
],
|
468
|
+
[
|
469
|
+
"mathematical_operator",
|
470
|
+
"hierarchyAble"
|
471
|
+
],
|
472
|
+
[
|
473
|
+
"mathematical_operator",
|
474
|
+
"isEdee"
|
475
|
+
],
|
476
|
+
[
|
477
|
+
"mathematical_operator",
|
478
|
+
"isEder"
|
479
|
+
],
|
480
|
+
[
|
481
|
+
"mathematical_operator",
|
482
|
+
"object"
|
483
|
+
],
|
484
|
+
[
|
485
|
+
"mathematical_operator",
|
486
|
+
"operator"
|
487
|
+
],
|
488
|
+
[
|
489
|
+
"mathematical_operator",
|
490
|
+
"property"
|
491
|
+
],
|
492
|
+
[
|
493
|
+
"mathematical_operator",
|
494
|
+
"queryable"
|
495
|
+
],
|
496
|
+
[
|
497
|
+
"mathematical_operator",
|
498
|
+
"theAble"
|
499
|
+
],
|
500
|
+
[
|
501
|
+
"minusExpression",
|
502
|
+
"mathematicalExpression"
|
503
|
+
],
|
504
|
+
[
|
505
|
+
"minusOperator",
|
506
|
+
"mathematicalOperator"
|
507
|
+
],
|
508
|
+
[
|
509
|
+
"modifies",
|
510
|
+
"verby"
|
511
|
+
],
|
72
512
|
[
|
73
513
|
"notAble",
|
74
514
|
"notAble"
|
75
515
|
],
|
516
|
+
[
|
517
|
+
"noun",
|
518
|
+
"theAble"
|
519
|
+
],
|
520
|
+
[
|
521
|
+
"number",
|
522
|
+
"expression"
|
523
|
+
],
|
524
|
+
[
|
525
|
+
"number",
|
526
|
+
"quantifier"
|
527
|
+
],
|
76
528
|
[
|
77
529
|
"number",
|
78
530
|
"queryable"
|
@@ -85,10 +537,58 @@
|
|
85
537
|
"object",
|
86
538
|
"theAble"
|
87
539
|
],
|
540
|
+
[
|
541
|
+
"operator",
|
542
|
+
"concept"
|
543
|
+
],
|
544
|
+
[
|
545
|
+
"operator",
|
546
|
+
"hierarchyAble"
|
547
|
+
],
|
548
|
+
[
|
549
|
+
"operator",
|
550
|
+
"isEdee"
|
551
|
+
],
|
552
|
+
[
|
553
|
+
"operator",
|
554
|
+
"isEder"
|
555
|
+
],
|
556
|
+
[
|
557
|
+
"operator",
|
558
|
+
"object"
|
559
|
+
],
|
560
|
+
[
|
561
|
+
"operator",
|
562
|
+
"property"
|
563
|
+
],
|
564
|
+
[
|
565
|
+
"operator",
|
566
|
+
"queryable"
|
567
|
+
],
|
568
|
+
[
|
569
|
+
"operator",
|
570
|
+
"theAble"
|
571
|
+
],
|
572
|
+
[
|
573
|
+
"operator_modifier",
|
574
|
+
"operator_modifier"
|
575
|
+
],
|
88
576
|
[
|
89
577
|
"orAble",
|
90
578
|
"ifAble"
|
91
579
|
],
|
580
|
+
[
|
581
|
+
"plusExpression",
|
582
|
+
"mathematicalExpression"
|
583
|
+
],
|
584
|
+
[
|
585
|
+
"plusOperator",
|
586
|
+
"mathematicalOperator"
|
587
|
+
],
|
588
|
+
[
|
589
|
+
"preposition",
|
590
|
+
"preposition"
|
591
|
+
],
|
92
592
|
[
|
93
593
|
"pronoun",
|
94
594
|
"pronoun"
|
@@ -105,18 +605,34 @@
|
|
105
605
|
"property",
|
106
606
|
"unknown"
|
107
607
|
],
|
608
|
+
[
|
609
|
+
"punctuation",
|
610
|
+
"punctuation"
|
611
|
+
],
|
612
|
+
[
|
613
|
+
"quantifier",
|
614
|
+
"quantifier"
|
615
|
+
],
|
108
616
|
[
|
109
617
|
"queryable",
|
110
618
|
"queryable"
|
111
619
|
],
|
112
620
|
[
|
113
621
|
"questionMark",
|
114
|
-
"
|
622
|
+
"punctuation"
|
115
623
|
],
|
116
624
|
[
|
117
625
|
"readonly",
|
118
626
|
"queryable"
|
119
627
|
],
|
628
|
+
[
|
629
|
+
"reason",
|
630
|
+
"queryable"
|
631
|
+
],
|
632
|
+
[
|
633
|
+
"reason",
|
634
|
+
"theAble"
|
635
|
+
],
|
120
636
|
[
|
121
637
|
"that",
|
122
638
|
"thisitthat"
|
@@ -145,6 +661,18 @@
|
|
145
661
|
"thisitthat",
|
146
662
|
"queryable"
|
147
663
|
],
|
664
|
+
[
|
665
|
+
"timesExpression",
|
666
|
+
"mathematicalExpression"
|
667
|
+
],
|
668
|
+
[
|
669
|
+
"timesOperator",
|
670
|
+
"mathematicalOperator"
|
671
|
+
],
|
672
|
+
[
|
673
|
+
"to",
|
674
|
+
"preposition"
|
675
|
+
],
|
148
676
|
[
|
149
677
|
"toAble",
|
150
678
|
"toAble"
|
@@ -177,6 +705,10 @@
|
|
177
705
|
"unknown",
|
178
706
|
"theAble"
|
179
707
|
],
|
708
|
+
[
|
709
|
+
"verby",
|
710
|
+
"verby"
|
711
|
+
],
|
180
712
|
[
|
181
713
|
"what",
|
182
714
|
"object"
|
@@ -193,47 +725,35 @@
|
|
193
725
|
"whose",
|
194
726
|
"object"
|
195
727
|
],
|
728
|
+
[
|
729
|
+
"x",
|
730
|
+
"number"
|
731
|
+
],
|
196
732
|
[
|
197
733
|
"xfx",
|
198
734
|
"queryable"
|
735
|
+
],
|
736
|
+
[
|
737
|
+
"y",
|
738
|
+
"number"
|
199
739
|
]
|
200
740
|
],
|
201
|
-
"logs": [
|
202
|
-
"Undefined word 'dimension'",
|
203
|
-
"Undefined word 'unit'",
|
204
|
-
"Undefined word 'concepts'",
|
205
|
-
"Counter == 2. Applying Operator(list/1, PASS, None, evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['theAble', 'queryable', 'notAble', 'unknown', 'hierarchyAble', 'object']}) bridge(bridge)) failed due to the matchers [Type(variable: 'type')] not being present",
|
206
|
-
"Counter == 3. Applying Operator(list/1, PASS, None, evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['theAble', 'queryable', 'notAble', 'unknown', 'hierarchyAble', 'object']}) bridge(bridge)) failed due to the matchers [Type(variable: 'type')] not being present",
|
207
|
-
"Counter == 4. Applying Operator(list/1, PASS, None, evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['theAble', 'queryable', 'notAble', 'unknown', 'hierarchyAble', 'object']}) bridge(bridge)) failed due to the matchers [Type(variable: 'type')] not being present",
|
208
|
-
"Op choices were: [(('list', 0), [('is', 0), ('unknown', 0)], 1), (('list', 1), [('is', 0), ('unknown', 0)], 2), (('list', 1), [('is', 0), ('unknown', 0)], 2), (('list', 1), [('is', 0), ('unknown', 0), ('unknown', 1)], 3), (('unknown', 0), [('is', 0), ('unknown', 0), ('unknown', 1)], 3), (('list', 1), [('is', 0), ('unknown', 1)], 4), (('is', 0), [('is', 0), ('unknown', 1)], 4), (('is', 1), [('is', 1)], 5)]",
|
209
|
-
"Contexts used for choosing operators (if the wrong choices were made update the priorities array. Put the expected choice at the end of the list. you can check for loops in the priorities by adding the -cl flag and running a query): \n Context for choosing the operator list/0 was [['is', 0], ['unknown', 0]]. Counter 1\n Context for choosing the operator list/1 was [['is', 0], ['unknown', 0]]. Counter 2\n Context for choosing the operator list/1 was [['is', 0], ['unknown', 0]]. Counter 2\n Context for choosing the operator list/1 was [['is', 0], ['unknown', 0], ['unknown', 1]]. Counter 3\n Context for choosing the operator unknown/0 was [['is', 0], ['unknown', 0], ['unknown', 1]]. Counter 3\n Context for choosing the operator list/1 was [['is', 0], ['unknown', 1]]. Counter 4\n Context for choosing the operator is/0 was [['is', 0], ['unknown', 1]]. Counter 4\n Context for choosing the operator is/1 was [['is', 1]]. Counter 5",
|
210
|
-
"Associations made with probabilities (each group is a choice point. if the wrong choices were made update the associations list): \n Group 0\n 0.6000000000000001 - [['list', 0], ['unknown', 0], \">>>>2 ['is', 0] <<<<2\", ['unknown', 0]]\n (('unknown', 0), ('is', 0), ('unknown', 0))\n 0.4 - [['list', 0], ['unknown', 0], \">>>>2 ['isEd', 0] <<<<2\", ['unknown', 0]]\n (('list', 0), ('unknown', 0))\n (('unknown', 0), ('isEd', 0))\n Group 1\n 0.5 - [['unknown', 0], \">>>>1 ['isEd', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 0), ('isEd', 0))\n 1.0 - [['unknown', 0], \">>>>1 ['is', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 0), ('is', 0), ('unknown', 0))\n Group 2\n 0.5 - [['unknown', 0], \">>>>1 ['isEd', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 1), ('isEd', 0))\n 1.0 - [['unknown', 0], \">>>>1 ['is', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 1), ('is', 0), ('unknown', 0))\n Group 3\n 1.0 - [['unknown', 0], \">>>>1 ['is', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 1), ('is', 0), ('unknown', 1))\n 0.6666666666666666 - [['unknown', 0], \">>>>1 ['isEd', 0] <<<<1\", ['unknown', 0]]\n (('unknown', 1), ('isEd', 0))\n (('isEd', 0), ('unknown', 1))"
|
211
|
-
],
|
212
741
|
"metadata": {
|
213
742
|
"opChoices": [
|
214
743
|
{
|
215
744
|
"op": [
|
216
|
-
"
|
745
|
+
"unknown",
|
217
746
|
0
|
218
747
|
],
|
219
748
|
"ops": [
|
220
749
|
[
|
221
|
-
"
|
750
|
+
"unknown",
|
222
751
|
0
|
223
752
|
],
|
224
753
|
[
|
225
754
|
"unknown",
|
226
755
|
0
|
227
|
-
]
|
228
|
-
],
|
229
|
-
"counter": 1
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"op": [
|
233
|
-
"list",
|
234
|
-
1
|
235
|
-
],
|
236
|
-
"ops": [
|
756
|
+
],
|
237
757
|
[
|
238
758
|
"is",
|
239
759
|
0
|
@@ -241,33 +761,24 @@
|
|
241
761
|
[
|
242
762
|
"unknown",
|
243
763
|
0
|
244
|
-
]
|
245
|
-
],
|
246
|
-
"counter": 2
|
247
|
-
},
|
248
|
-
{
|
249
|
-
"op": [
|
250
|
-
"list",
|
251
|
-
1
|
252
|
-
],
|
253
|
-
"ops": [
|
254
|
-
[
|
255
|
-
"is",
|
256
|
-
0
|
257
764
|
],
|
258
765
|
[
|
259
|
-
"
|
766
|
+
"list",
|
260
767
|
0
|
261
768
|
]
|
262
769
|
],
|
263
|
-
"counter":
|
770
|
+
"counter": 1
|
264
771
|
},
|
265
772
|
{
|
266
773
|
"op": [
|
267
|
-
"
|
268
|
-
|
774
|
+
"unknown",
|
775
|
+
0
|
269
776
|
],
|
270
777
|
"ops": [
|
778
|
+
[
|
779
|
+
"unknown",
|
780
|
+
0
|
781
|
+
],
|
271
782
|
[
|
272
783
|
"is",
|
273
784
|
0
|
@@ -277,11 +788,11 @@
|
|
277
788
|
0
|
278
789
|
],
|
279
790
|
[
|
280
|
-
"
|
281
|
-
|
791
|
+
"list",
|
792
|
+
0
|
282
793
|
]
|
283
794
|
],
|
284
|
-
"counter":
|
795
|
+
"counter": 2
|
285
796
|
},
|
286
797
|
{
|
287
798
|
"op": [
|
@@ -298,8 +809,8 @@
|
|
298
809
|
0
|
299
810
|
],
|
300
811
|
[
|
301
|
-
"
|
302
|
-
|
812
|
+
"list",
|
813
|
+
0
|
303
814
|
]
|
304
815
|
],
|
305
816
|
"counter": 3
|
@@ -307,7 +818,7 @@
|
|
307
818
|
{
|
308
819
|
"op": [
|
309
820
|
"list",
|
310
|
-
|
821
|
+
0
|
311
822
|
],
|
312
823
|
"ops": [
|
313
824
|
[
|
@@ -315,8 +826,8 @@
|
|
315
826
|
0
|
316
827
|
],
|
317
828
|
[
|
318
|
-
"
|
319
|
-
|
829
|
+
"list",
|
830
|
+
0
|
320
831
|
]
|
321
832
|
],
|
322
833
|
"counter": 4
|
@@ -330,13 +841,9 @@
|
|
330
841
|
[
|
331
842
|
"is",
|
332
843
|
0
|
333
|
-
],
|
334
|
-
[
|
335
|
-
"unknown",
|
336
|
-
1
|
337
844
|
]
|
338
845
|
],
|
339
|
-
"counter":
|
846
|
+
"counter": 5
|
340
847
|
},
|
341
848
|
{
|
342
849
|
"op": [
|
@@ -349,7 +856,7 @@
|
|
349
856
|
1
|
350
857
|
]
|
351
858
|
],
|
352
|
-
"counter":
|
859
|
+
"counter": 6
|
353
860
|
}
|
354
861
|
]
|
355
862
|
},
|
@@ -357,7 +864,7 @@
|
|
357
864
|
"contexts": [
|
358
865
|
{
|
359
866
|
"number": "many",
|
360
|
-
"text": " are concepts",
|
867
|
+
"text": "dimension and unit are concepts",
|
361
868
|
"marker": "is",
|
362
869
|
"word": "are",
|
363
870
|
"range": {
|
@@ -367,66 +874,82 @@
|
|
367
874
|
"one": {
|
368
875
|
"number": "many",
|
369
876
|
"marker": "list",
|
877
|
+
"default": true,
|
878
|
+
"word": "and",
|
879
|
+
"text": "dimension and unit",
|
880
|
+
"range": {
|
881
|
+
"start": 0,
|
882
|
+
"end": 30
|
883
|
+
},
|
884
|
+
"types": [
|
885
|
+
"list",
|
886
|
+
"unknown"
|
887
|
+
],
|
888
|
+
"listable": true,
|
889
|
+
"isList": true,
|
370
890
|
"value": [
|
371
891
|
{
|
892
|
+
"value": "dimension",
|
893
|
+
"unknown": true,
|
894
|
+
"text": "dimension",
|
372
895
|
"marker": "unknown",
|
896
|
+
"word": "dimension",
|
373
897
|
"range": {
|
374
898
|
"start": 0,
|
375
899
|
"end": 8
|
376
900
|
},
|
377
|
-
"
|
378
|
-
"
|
379
|
-
"value": "dimension",
|
380
|
-
"unknown": true
|
901
|
+
"dead": true,
|
902
|
+
"level": 1
|
381
903
|
},
|
382
904
|
{
|
905
|
+
"value": "unit",
|
906
|
+
"unknown": true,
|
907
|
+
"text": "unit",
|
383
908
|
"marker": "unknown",
|
909
|
+
"word": "unit",
|
384
910
|
"range": {
|
385
911
|
"start": 14,
|
386
912
|
"end": 17
|
387
913
|
},
|
388
|
-
"
|
389
|
-
"
|
390
|
-
"value": "unit",
|
391
|
-
"unknown": true
|
914
|
+
"dead": true,
|
915
|
+
"level": 1
|
392
916
|
}
|
393
917
|
],
|
394
|
-
"
|
395
|
-
"start": 0,
|
396
|
-
"end": 30
|
397
|
-
},
|
398
|
-
"types": [
|
399
|
-
"list",
|
400
|
-
"unknown"
|
401
|
-
]
|
918
|
+
"level": 1
|
402
919
|
},
|
403
920
|
"two": {
|
921
|
+
"value": "concepts",
|
922
|
+
"unknown": true,
|
923
|
+
"text": "concepts",
|
404
924
|
"marker": "unknown",
|
925
|
+
"word": "concepts",
|
405
926
|
"range": {
|
406
927
|
"start": 23,
|
407
928
|
"end": 30
|
408
929
|
},
|
409
|
-
"
|
410
|
-
"text": "concepts",
|
411
|
-
"value": "concepts",
|
412
|
-
"unknown": true,
|
930
|
+
"dead": true,
|
413
931
|
"types": [
|
414
932
|
"unknown"
|
415
933
|
],
|
934
|
+
"level": 1,
|
416
935
|
"concept": true
|
417
936
|
},
|
937
|
+
"dead": true,
|
938
|
+
"level": 2,
|
418
939
|
"topLevel": true,
|
419
940
|
"touchedBy": [
|
420
|
-
"call2"
|
941
|
+
"dimension#call2"
|
421
942
|
]
|
422
943
|
}
|
423
944
|
],
|
424
945
|
"generated": [
|
425
|
-
"
|
946
|
+
""
|
426
947
|
],
|
427
948
|
"paraphrases": [
|
428
949
|
"dimension and unit are concepts"
|
429
950
|
],
|
951
|
+
"paraphrasesParenthesized": [],
|
952
|
+
"generatedParenthesized": [],
|
430
953
|
"responses": [
|
431
954
|
""
|
432
955
|
],
|
@@ -452,11 +975,29 @@
|
|
452
975
|
],
|
453
976
|
[
|
454
977
|
"list",
|
455
|
-
|
978
|
+
0
|
979
|
+
],
|
980
|
+
[
|
981
|
+
"unknown",
|
982
|
+
0
|
456
983
|
],
|
457
984
|
[
|
458
985
|
"unknown",
|
986
|
+
1
|
987
|
+
]
|
988
|
+
],
|
989
|
+
[
|
990
|
+
[
|
991
|
+
"is",
|
459
992
|
0
|
993
|
+
],
|
994
|
+
[
|
995
|
+
"list",
|
996
|
+
0
|
997
|
+
],
|
998
|
+
[
|
999
|
+
"unknown",
|
1000
|
+
1
|
460
1001
|
]
|
461
1002
|
],
|
462
1003
|
[
|
@@ -474,11 +1015,115 @@
|
|
474
1015
|
]
|
475
1016
|
]
|
476
1017
|
],
|
477
|
-
"
|
1018
|
+
"learned_contextual_priorities": [],
|
478
1019
|
"query": "dimension and unit are concepts",
|
479
1020
|
"key": {
|
480
1021
|
"query": "dimension and unit are concepts"
|
481
1022
|
}
|
1023
|
+
},
|
1024
|
+
{
|
1025
|
+
"extraConfig": true,
|
1026
|
+
"name": "dimension",
|
1027
|
+
"operators": [
|
1028
|
+
"([dimension])",
|
1029
|
+
"([unit])",
|
1030
|
+
"((amount/1 || number/1) [amountOfDimension|] ([unit]))",
|
1031
|
+
"(([amount]) [unit])",
|
1032
|
+
"((dimension/1) [convertToUnits|in] (unit/1))",
|
1033
|
+
"(([number]) [degree])",
|
1034
|
+
{
|
1035
|
+
"pattern": "([length])",
|
1036
|
+
"development": true
|
1037
|
+
}
|
1038
|
+
],
|
1039
|
+
"priorities": [
|
1040
|
+
{
|
1041
|
+
"context": [
|
1042
|
+
[
|
1043
|
+
"amountOfDimension",
|
1044
|
+
0
|
1045
|
+
],
|
1046
|
+
[
|
1047
|
+
"convertToUnits",
|
1048
|
+
0
|
1049
|
+
]
|
1050
|
+
],
|
1051
|
+
"choose": [
|
1052
|
+
0
|
1053
|
+
]
|
1054
|
+
}
|
1055
|
+
],
|
1056
|
+
"hierarchy": [
|
1057
|
+
{
|
1058
|
+
"child": "convertToUnits",
|
1059
|
+
"parent": "testingValue",
|
1060
|
+
"development": true
|
1061
|
+
}
|
1062
|
+
],
|
1063
|
+
"generators": [
|
1064
|
+
{
|
1065
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:77"
|
1066
|
+
}
|
1067
|
+
],
|
1068
|
+
"bridges": [
|
1069
|
+
{
|
1070
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:84",
|
1071
|
+
"id": "dimension",
|
1072
|
+
"isA": [],
|
1073
|
+
"generatorpr": {}
|
1074
|
+
},
|
1075
|
+
{
|
1076
|
+
"id": "length",
|
1077
|
+
"isA": [
|
1078
|
+
"dimension"
|
1079
|
+
],
|
1080
|
+
"development": true
|
1081
|
+
},
|
1082
|
+
{
|
1083
|
+
"id": "amount"
|
1084
|
+
},
|
1085
|
+
{
|
1086
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:104",
|
1087
|
+
"id": "degree",
|
1088
|
+
"words": [
|
1089
|
+
{
|
1090
|
+
"word": "degrees",
|
1091
|
+
"number": "many"
|
1092
|
+
}
|
1093
|
+
],
|
1094
|
+
"isA": [
|
1095
|
+
"amount"
|
1096
|
+
],
|
1097
|
+
"bridge": "{ ...next(operator), value: before[0].value, amount: before[0] }"
|
1098
|
+
},
|
1099
|
+
{
|
1100
|
+
"id": "amountOfDimension",
|
1101
|
+
"convolution": true,
|
1102
|
+
"bridge": "{ marker: operator('dimension'), unit: after[0], value: before[0].value, amount: before[0] }"
|
1103
|
+
},
|
1104
|
+
{
|
1105
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:117",
|
1106
|
+
"id": "convertToUnits",
|
1107
|
+
"bridge": "{ ...next(operator), from: before[0], to: after[0] }",
|
1108
|
+
"isA": [
|
1109
|
+
"expression",
|
1110
|
+
"queryable"
|
1111
|
+
],
|
1112
|
+
"after": [
|
1113
|
+
[
|
1114
|
+
"possession",
|
1115
|
+
0
|
1116
|
+
],
|
1117
|
+
[
|
1118
|
+
"possession",
|
1119
|
+
1
|
1120
|
+
]
|
1121
|
+
]
|
1122
|
+
},
|
1123
|
+
{
|
1124
|
+
"id": "unit"
|
1125
|
+
}
|
1126
|
+
]
|
482
1127
|
}
|
483
1128
|
],
|
484
1129
|
"fragments": [],
|
@@ -505,11 +1150,29 @@
|
|
505
1150
|
],
|
506
1151
|
[
|
507
1152
|
"list",
|
508
|
-
|
1153
|
+
0
|
1154
|
+
],
|
1155
|
+
[
|
1156
|
+
"unknown",
|
1157
|
+
0
|
509
1158
|
],
|
510
1159
|
[
|
511
1160
|
"unknown",
|
1161
|
+
1
|
1162
|
+
]
|
1163
|
+
],
|
1164
|
+
[
|
1165
|
+
[
|
1166
|
+
"is",
|
512
1167
|
0
|
1168
|
+
],
|
1169
|
+
[
|
1170
|
+
"list",
|
1171
|
+
0
|
1172
|
+
],
|
1173
|
+
[
|
1174
|
+
"unknown",
|
1175
|
+
1
|
513
1176
|
]
|
514
1177
|
],
|
515
1178
|
[
|
@@ -526,5 +1189,6 @@
|
|
526
1189
|
1
|
527
1190
|
]
|
528
1191
|
]
|
529
|
-
]
|
1192
|
+
],
|
1193
|
+
"learned_contextual_priorities": []
|
530
1194
|
}
|