ekms 9.8.0-beta.10 → 9.8.0-beta.16
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/common/actions.instance.json +3 -3
- package/common/actions.js +9 -9
- package/common/askfor.instance.json +8 -186
- package/common/askfor.js +16 -11
- package/common/can.instance.json +2 -18
- package/common/can.js +2 -2
- package/common/comparable.instance.json +6 -12
- package/common/conjunction.js +4 -4
- package/common/dateTimeSelectors.instance.json +1 -1
- package/common/dateTimeSelectors.js +1 -1
- package/common/dates.instance.json +1 -1
- package/common/dates.js +1 -1
- package/common/dialogues.js +34 -35
- package/common/dimension.instance.json +5 -433
- package/common/dimension.js +7 -7
- package/common/drone.instance.json +18 -18
- package/common/drone.js +17 -18
- package/common/drone_v1.instance.json +3 -3
- package/common/drone_v1.js +4 -4
- package/common/evaluate.js +2 -2
- package/common/fastfood.instance.json +2 -2
- package/common/fastfood.js +18 -9
- package/common/formulas.instance.json +4 -4
- package/common/formulas.js +4 -4
- package/common/gdefaults.js +2 -71
- package/common/helpers/dialogues.js +1 -10
- package/common/helpers/properties.js +6 -10
- package/common/helpers.js +5 -1
- package/common/hierarchy.js +7 -6
- package/common/math.instance.json +13 -4
- package/common/math.js +13 -3
- package/common/menus.instance.json +1 -1
- package/common/menus.js +2 -2
- package/common/meta.js +12 -12
- package/common/nameable.js +1 -1
- package/common/ordering.instance.json +1 -2
- package/common/percentages.js +2 -2
- package/common/pipboy.instance.json +4 -5
- package/common/pipboy.js +3 -3
- package/common/properties.instance.json +2318 -559
- package/common/properties.js +145 -35
- package/common/rates.instance.json +1 -1
- package/common/rates.js +2 -2
- package/common/reports.instance.json +4 -6
- package/common/reports.js +12 -12
- package/common/sdefaults.js +8 -7
- package/common/stm.js +8 -14
- package/common/testing.js +2 -2
- package/common/time.instance.json +2 -5
- package/common/time.js +4 -4
- package/common/ui.js +5 -5
- package/common/words.js +106 -1
- package/common/wp.instance.json +4 -3
- package/common/wp.js +2 -1
- package/package.json +2 -2
package/common/dialogues.js
CHANGED
|
@@ -57,6 +57,7 @@ const config = {
|
|
|
57
57
|
|
|
58
58
|
"(<what> ([whatAble|]))",
|
|
59
59
|
"([what:optional])",
|
|
60
|
+
"([who])",
|
|
60
61
|
|
|
61
62
|
"([be] ([briefOrWordy|]))",
|
|
62
63
|
|
|
@@ -145,9 +146,15 @@ const config = {
|
|
|
145
146
|
|
|
146
147
|
{
|
|
147
148
|
id: "what",
|
|
149
|
+
isA: ['queryable'],
|
|
148
150
|
optional: "{ ...next(operator), query: ['what'], determined: true, isVariable: true }",
|
|
149
151
|
bridge: "{ ...after, query: ['what'], modifiers: ['what'], what: operator, isVariable: true }"
|
|
150
152
|
},
|
|
153
|
+
{
|
|
154
|
+
id: "who",
|
|
155
|
+
isA: ['queryable'],
|
|
156
|
+
initial: { query: true, isVariable: true },
|
|
157
|
+
},
|
|
151
158
|
{ id: "whatAble" },
|
|
152
159
|
|
|
153
160
|
// context.isInstance == variables.isInstance (unification)
|
|
@@ -229,7 +236,7 @@ const config = {
|
|
|
229
236
|
"literals": {
|
|
230
237
|
"?": [{"id": "questionMark", "initial": "{}" }],
|
|
231
238
|
// TODO make who its own concept
|
|
232
|
-
"who": [{"id": "what", "initial": "{ modifiers: [], query: true }" }],
|
|
239
|
+
// "who": [{"id": "what", "initial": "{ modifiers: [], query: true }" }],
|
|
233
240
|
"yes": [{"id": "yesno", "initial": "{ value: true }" }],
|
|
234
241
|
"no": [{"id": "yesno", "initial": "{ value: false }" }],
|
|
235
242
|
"brief": [{"id": "briefOrWordy", "initial": "{ value: 'brief' }" }],
|
|
@@ -269,7 +276,6 @@ const config = {
|
|
|
269
276
|
['the', 'article'],
|
|
270
277
|
['theAble', 'queryable'],
|
|
271
278
|
['it', 'queryable'],
|
|
272
|
-
['what', 'queryable'],
|
|
273
279
|
['whatAble', 'queryable'],
|
|
274
280
|
['negatable', 'queryable'],
|
|
275
281
|
['is', 'canBeQuestion'],
|
|
@@ -408,7 +414,9 @@ const config = {
|
|
|
408
414
|
},
|
|
409
415
|
{
|
|
410
416
|
where: where(),
|
|
411
|
-
match: ({context, hierarchy}) =>
|
|
417
|
+
match: ({context, hierarchy, debug}) => {
|
|
418
|
+
return hierarchy.isA(context.marker, 'canBeQuestion') && context.paraphrase && context.topLevel && context.query
|
|
419
|
+
},
|
|
412
420
|
apply: async ({context, gp}) => {
|
|
413
421
|
return `${await gp({...context, topLevel: undefined})}?`
|
|
414
422
|
},
|
|
@@ -489,6 +497,9 @@ const config = {
|
|
|
489
497
|
if (focus == 'one' && isA(context[focus], 'thisitthat')) {
|
|
490
498
|
focus = other
|
|
491
499
|
}
|
|
500
|
+
if (focus == 'two' && context[other].isPropertyValue) {
|
|
501
|
+
focus = other
|
|
502
|
+
}
|
|
492
503
|
// greg101
|
|
493
504
|
if (focus == 'one') {
|
|
494
505
|
let number = 'one'
|
|
@@ -512,11 +523,12 @@ const config = {
|
|
|
512
523
|
{
|
|
513
524
|
where: where(),
|
|
514
525
|
match: ({context}) => {
|
|
515
|
-
return context.
|
|
526
|
+
return context.marker == 'unify' && context.terms.some((term) => ['what', 'who'].includes(term.marker))
|
|
516
527
|
},
|
|
517
|
-
apply: async ({context, resolveEvaluate,
|
|
518
|
-
const value = context.terms.find((term) => term.marker
|
|
519
|
-
await
|
|
528
|
+
apply: async ({context, resolveEvaluate, e, toFinalValue}) => {
|
|
529
|
+
const value = context.terms.find((term) => !['what', 'who'].includes(term.marker))
|
|
530
|
+
instance = await e(value, where())
|
|
531
|
+
await resolveEvaluate(context, instance)
|
|
520
532
|
}
|
|
521
533
|
},
|
|
522
534
|
{
|
|
@@ -531,9 +543,10 @@ const config = {
|
|
|
531
543
|
where: where(),
|
|
532
544
|
match: ({context}) => context.marker === 'error',
|
|
533
545
|
apply: async ({context, g, gp}) => {
|
|
534
|
-
context.evalue = "That is not known"
|
|
535
546
|
if (context.reason) {
|
|
536
|
-
context.evalue
|
|
547
|
+
context.evalue = `${await g(context.reason)}`
|
|
548
|
+
} else {
|
|
549
|
+
context.evalue = "That is not known"
|
|
537
550
|
}
|
|
538
551
|
context.isResponse = true
|
|
539
552
|
}
|
|
@@ -588,7 +601,12 @@ const config = {
|
|
|
588
601
|
value = one;
|
|
589
602
|
}
|
|
590
603
|
|
|
591
|
-
|
|
604
|
+
const unification = await e({
|
|
605
|
+
marker: 'unify',
|
|
606
|
+
terms: [query, value],
|
|
607
|
+
}, where())
|
|
608
|
+
instance = unification.evalue || { marker: 'undefined' }
|
|
609
|
+
|
|
592
610
|
if (instance.verbatim) {
|
|
593
611
|
context.evalue = { verbatim: instance.verbatim }
|
|
594
612
|
context.isResponse = true
|
|
@@ -601,16 +619,6 @@ const config = {
|
|
|
601
619
|
return
|
|
602
620
|
}
|
|
603
621
|
|
|
604
|
-
if (true) {
|
|
605
|
-
if (query.query || value.query) {
|
|
606
|
-
const unification = await e({
|
|
607
|
-
marker: 'unify',
|
|
608
|
-
terms: [query, instance],
|
|
609
|
-
})
|
|
610
|
-
instance = unification.evalue
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
622
|
const concept = _.cloneDeep(value)
|
|
615
623
|
concept.isQuery = undefined
|
|
616
624
|
instance.focus = true
|
|
@@ -628,10 +636,7 @@ const config = {
|
|
|
628
636
|
word: many ? "are" : "is",
|
|
629
637
|
number: many ? "many" : undefined,
|
|
630
638
|
}
|
|
631
|
-
|
|
632
|
-
evalue.one = instance
|
|
633
|
-
evalue.two = concept
|
|
634
|
-
}
|
|
639
|
+
|
|
635
640
|
context.evalue = evalue
|
|
636
641
|
context.isResponse = true
|
|
637
642
|
}
|
|
@@ -665,7 +670,7 @@ const config = {
|
|
|
665
670
|
where: where(),
|
|
666
671
|
notes: 'x is y. handles x is a kind of y or x = y in the stm',
|
|
667
672
|
match: ({context}) => context.marker == 'is' && !context.query && context.one && context.two,
|
|
668
|
-
apply: async ({_continue, context,
|
|
673
|
+
apply: async ({_continue, context, e, debug, log, api, kms, config}) => {
|
|
669
674
|
function warningSameNotEvaluated(log, one) {
|
|
670
675
|
const description = 'WARNING from Dialogues KM: For the "X is Y" type phrase implement a same handler.'
|
|
671
676
|
const match = `({context}) => context.marker == '${one.marker}' && context.same && <other conditions as you like>`
|
|
@@ -677,7 +682,7 @@ const config = {
|
|
|
677
682
|
|
|
678
683
|
const one = context.one;
|
|
679
684
|
const two = context.two;
|
|
680
|
-
const onePrime = await
|
|
685
|
+
const onePrime = await e({ marker: 'same', one: one, two: two }, where())
|
|
681
686
|
if (!onePrime.sameWasProcessed) {
|
|
682
687
|
warningSameNotEvaluated(log, one)
|
|
683
688
|
} else {
|
|
@@ -709,14 +714,13 @@ const config = {
|
|
|
709
714
|
{
|
|
710
715
|
where: where(),
|
|
711
716
|
notes: 'get variable from stm',
|
|
712
|
-
match: ({context, kms}) =>
|
|
713
|
-
// match: ({context, kms}) => context.evaluate,
|
|
717
|
+
match: ({context, kms}) => kms.stm.api.getVariable(context),
|
|
714
718
|
priority: -1,
|
|
715
719
|
apply: async ({context, kms, e}) => {
|
|
716
720
|
const api = kms.stm.api
|
|
717
721
|
context.value = api.getVariable(context)
|
|
718
722
|
if (context.value && context.value.marker) {
|
|
719
|
-
context.evalue = await e(context.value)
|
|
723
|
+
context.evalue = await e(context.value, where())
|
|
720
724
|
}
|
|
721
725
|
context.focusableForPhrase = true
|
|
722
726
|
}
|
|
@@ -725,11 +729,6 @@ const config = {
|
|
|
725
729
|
};
|
|
726
730
|
|
|
727
731
|
function initializer({objects, config, isModule}) {
|
|
728
|
-
/* TODO add this beck in. some stuff from config needs to be here
|
|
729
|
-
config.addArgs((args) => ({
|
|
730
|
-
e: (context) => config.api.getEvaluator(args.s, args.log, context),
|
|
731
|
-
}))
|
|
732
|
-
*/
|
|
733
732
|
config.addArgs(({config, api, isA, e}) => ({
|
|
734
733
|
toScopedId: (context) => {
|
|
735
734
|
return api('dialogues').toScopedId(context)
|
|
@@ -744,7 +743,7 @@ function initializer({objects, config, isModule}) {
|
|
|
744
743
|
const unification = await e({
|
|
745
744
|
marker: 'unify',
|
|
746
745
|
terms: [term1, term2],
|
|
747
|
-
})
|
|
746
|
+
}, where())
|
|
748
747
|
return unification?.evalue
|
|
749
748
|
}
|
|
750
749
|
}))
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"amount is a concept",
|
|
4
4
|
"measurement modifies unit",
|
|
5
5
|
"dimension and measurement unit are concepts",
|
|
6
|
-
"unit means measurement unit",
|
|
7
6
|
{
|
|
8
7
|
"apply": "({apis}) => {\n apis('properties').addHierarchyWatcher({\n match: ({parentId, isA}) => isA(parentId, 'unit') && parentId.startsWith('unit_'),\n apply: ({config, childId, parent, parentId}) => {\n config.updateBridge(childId, ({ bridge }) => {\n if (!bridge.initial) {\n bridge.initial = {}\n }\n bridge.initial['dimension'] = parent.objects[1].value\n })\n }\n })\n }"
|
|
9
8
|
},
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"verb"
|
|
94
93
|
],
|
|
95
94
|
"bridge": "{ ...next(operator), quantity: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'quantity' }] }",
|
|
96
|
-
"semantic": "async ({context, e, api, toArray, resolveEvaluate}) => {\n const preferredUnits = await api.getPreferredUnits(context.quantity)\n if (!preferredUnits) {\n return\n }\n const from = context.quantity;\n const value = await e({ marker: 'convertToUnits', from, to: preferredUnits })\n resolveEvaluate(context, value.evalue)\n }"
|
|
95
|
+
"semantic": "async ({context, e, api, toArray, resolveEvaluate}) => {\n const preferredUnits = await api.getPreferredUnits(context.quantity)\n if (!preferredUnits) {\n return\n }\n const from = context.quantity;\n const value = await e({ marker: 'convertToUnits', from, to: preferredUnits }, where())\n resolveEvaluate(context, value.evalue)\n }"
|
|
97
96
|
},
|
|
98
97
|
{
|
|
99
98
|
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:216",
|
|
@@ -178,7 +177,7 @@
|
|
|
178
177
|
]
|
|
179
178
|
],
|
|
180
179
|
"generatorp": "async ({context, g}) => `${await g(context.from)} ${context.word} ${await g(context.to)}`",
|
|
181
|
-
"
|
|
180
|
+
"semantic": "async ({context, api, toArray, callId, resolveEvaluate}) => {\n const from = context.from;\n const tos = toArray(context.to);\n resolveEvaluate(context, await api.convertToUnits(context, from, tos))\n }"
|
|
182
181
|
},
|
|
183
182
|
{
|
|
184
183
|
"id": "unit",
|
|
@@ -198,7 +197,7 @@
|
|
|
198
197
|
"bridges": [
|
|
199
198
|
{
|
|
200
199
|
"id": "useMeasurementSystem",
|
|
201
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:
|
|
200
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:324",
|
|
202
201
|
"isA": [
|
|
203
202
|
"verb"
|
|
204
203
|
],
|
|
@@ -226,7 +225,7 @@
|
|
|
226
225
|
"semantics": [
|
|
227
226
|
{
|
|
228
227
|
"match": "({context, isA, debug}) => {\n return context.marker == 'unify' && \n context.terms.every((term) => isA(term, 'quantity')) &&\n context.terms.every((term) => term.instance)\n }",
|
|
229
|
-
"apply": "async ({context, e, unify, toEValue}) => {\n const t1 = context.terms[0]\n const t2 = context.terms[1]\n if (t1.propertyType !== t2.propertyType) {\n return\n }\n if (t1[t1.propertyType].marker !== t2[t2.propertyType].marker) {\n return\n }\n const convert = await e({ marker: 'convertToUnits', from: t2, to: t1.unit })\n const t2InT1Units = await toEValue(await toEValue(convert))\n // debug.coxunter('greg29')\n if (!await unify(t1.amount, await t2InT1Units.amount)) {\n // debugger\n }\n // debugger\n }"
|
|
228
|
+
"apply": "async ({context, e, unify, toEValue}) => {\n const t1 = context.terms[0]\n const t2 = context.terms[1]\n if (t1.propertyType !== t2.propertyType) {\n return\n }\n if (t1[t1.propertyType].marker !== t2[t2.propertyType].marker) {\n return\n }\n const convert = await e({ marker: 'convertToUnits', from: t2, to: t1.unit }, where())\n const t2InT1Units = await toEValue(await toEValue(convert))\n // debug.coxunter('greg29')\n if (!await unify(t1.amount, await t2InT1Units.amount)) {\n // debugger\n }\n // debugger\n }"
|
|
230
229
|
}
|
|
231
230
|
]
|
|
232
231
|
}
|
|
@@ -1407,298 +1406,6 @@
|
|
|
1407
1406
|
"query": "dimension and measurement unit are concepts"
|
|
1408
1407
|
}
|
|
1409
1408
|
},
|
|
1410
|
-
{
|
|
1411
|
-
"metadata": {
|
|
1412
|
-
"opChoices": [
|
|
1413
|
-
{
|
|
1414
|
-
"op": [
|
|
1415
|
-
"measurement_unit",
|
|
1416
|
-
0
|
|
1417
|
-
],
|
|
1418
|
-
"ops": [
|
|
1419
|
-
[
|
|
1420
|
-
"means",
|
|
1421
|
-
0
|
|
1422
|
-
],
|
|
1423
|
-
[
|
|
1424
|
-
"measurement",
|
|
1425
|
-
0
|
|
1426
|
-
],
|
|
1427
|
-
[
|
|
1428
|
-
"measurement_unit",
|
|
1429
|
-
0
|
|
1430
|
-
],
|
|
1431
|
-
[
|
|
1432
|
-
"unit",
|
|
1433
|
-
0
|
|
1434
|
-
]
|
|
1435
|
-
],
|
|
1436
|
-
"counter": 1
|
|
1437
|
-
},
|
|
1438
|
-
{
|
|
1439
|
-
"op": [
|
|
1440
|
-
"unit",
|
|
1441
|
-
0
|
|
1442
|
-
],
|
|
1443
|
-
"ops": [
|
|
1444
|
-
[
|
|
1445
|
-
"means",
|
|
1446
|
-
0
|
|
1447
|
-
],
|
|
1448
|
-
[
|
|
1449
|
-
"unit",
|
|
1450
|
-
0
|
|
1451
|
-
]
|
|
1452
|
-
],
|
|
1453
|
-
"counter": 2
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
"op": [
|
|
1457
|
-
"means",
|
|
1458
|
-
0
|
|
1459
|
-
],
|
|
1460
|
-
"ops": [
|
|
1461
|
-
[
|
|
1462
|
-
"means",
|
|
1463
|
-
0
|
|
1464
|
-
]
|
|
1465
|
-
],
|
|
1466
|
-
"counter": 3
|
|
1467
|
-
}
|
|
1468
|
-
]
|
|
1469
|
-
},
|
|
1470
|
-
"trace": "undefined",
|
|
1471
|
-
"contexts": [
|
|
1472
|
-
{
|
|
1473
|
-
"marker": "means",
|
|
1474
|
-
"value": "means",
|
|
1475
|
-
"default": true,
|
|
1476
|
-
"text": "unit means measurement unit",
|
|
1477
|
-
"word": "means",
|
|
1478
|
-
"range": {
|
|
1479
|
-
"start": 0,
|
|
1480
|
-
"end": 26
|
|
1481
|
-
},
|
|
1482
|
-
"dead": true,
|
|
1483
|
-
"from": {
|
|
1484
|
-
"value": "unit",
|
|
1485
|
-
"number": "one",
|
|
1486
|
-
"text": "unit",
|
|
1487
|
-
"marker": "unit",
|
|
1488
|
-
"word": "unit",
|
|
1489
|
-
"range": {
|
|
1490
|
-
"start": 0,
|
|
1491
|
-
"end": 3
|
|
1492
|
-
},
|
|
1493
|
-
"dead": true,
|
|
1494
|
-
"level": 1
|
|
1495
|
-
},
|
|
1496
|
-
"to": {
|
|
1497
|
-
"value": "measurement_unit",
|
|
1498
|
-
"number": "one",
|
|
1499
|
-
"text": "measurement unit",
|
|
1500
|
-
"marker": "measurement_unit",
|
|
1501
|
-
"word": "unit",
|
|
1502
|
-
"range": {
|
|
1503
|
-
"start": 11,
|
|
1504
|
-
"end": 26
|
|
1505
|
-
},
|
|
1506
|
-
"types": [
|
|
1507
|
-
"measurement_unit",
|
|
1508
|
-
"unit"
|
|
1509
|
-
],
|
|
1510
|
-
"modifier_measurement": {
|
|
1511
|
-
"value": "measurement",
|
|
1512
|
-
"number": "one",
|
|
1513
|
-
"text": "measurement",
|
|
1514
|
-
"marker": "measurement",
|
|
1515
|
-
"word": "measurement",
|
|
1516
|
-
"range": {
|
|
1517
|
-
"start": 11,
|
|
1518
|
-
"end": 21
|
|
1519
|
-
},
|
|
1520
|
-
"types": [
|
|
1521
|
-
"measurement"
|
|
1522
|
-
],
|
|
1523
|
-
"level": 0
|
|
1524
|
-
},
|
|
1525
|
-
"atomic": true,
|
|
1526
|
-
"dead": true,
|
|
1527
|
-
"compatible_types": [
|
|
1528
|
-
"unit"
|
|
1529
|
-
],
|
|
1530
|
-
"modifiers": [
|
|
1531
|
-
"modifier_measurement"
|
|
1532
|
-
],
|
|
1533
|
-
"level": 0
|
|
1534
|
-
},
|
|
1535
|
-
"level": 1,
|
|
1536
|
-
"context_index": 1,
|
|
1537
|
-
"topLevel": true,
|
|
1538
|
-
"metaInfo": "The mapping from from the expression being defined \"unit\" to the definition phrase \"measurement unit\" is [{\"from\":[\"number\"],\"to\":[\"number\"]}]",
|
|
1539
|
-
"touchedBy": [
|
|
1540
|
-
"dimension#call2"
|
|
1541
|
-
]
|
|
1542
|
-
}
|
|
1543
|
-
],
|
|
1544
|
-
"generated": [
|
|
1545
|
-
""
|
|
1546
|
-
],
|
|
1547
|
-
"paraphrases": [
|
|
1548
|
-
"unit means measurement unit"
|
|
1549
|
-
],
|
|
1550
|
-
"paraphrasesParenthesized": [],
|
|
1551
|
-
"generatedParenthesized": [],
|
|
1552
|
-
"responses": [
|
|
1553
|
-
""
|
|
1554
|
-
],
|
|
1555
|
-
"associations": [],
|
|
1556
|
-
"summaries": [
|
|
1557
|
-
{
|
|
1558
|
-
"summaries": [
|
|
1559
|
-
{
|
|
1560
|
-
"operators": [
|
|
1561
|
-
{
|
|
1562
|
-
"marker": [
|
|
1563
|
-
"unit",
|
|
1564
|
-
0
|
|
1565
|
-
],
|
|
1566
|
-
"range": {
|
|
1567
|
-
"start": 0,
|
|
1568
|
-
"end": 3
|
|
1569
|
-
}
|
|
1570
|
-
},
|
|
1571
|
-
{
|
|
1572
|
-
"marker": [
|
|
1573
|
-
"means",
|
|
1574
|
-
0
|
|
1575
|
-
],
|
|
1576
|
-
"range": {
|
|
1577
|
-
"start": 5,
|
|
1578
|
-
"end": 9
|
|
1579
|
-
}
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
"marker": [
|
|
1583
|
-
"measurement",
|
|
1584
|
-
0
|
|
1585
|
-
],
|
|
1586
|
-
"range": {
|
|
1587
|
-
"start": 11,
|
|
1588
|
-
"end": 21
|
|
1589
|
-
}
|
|
1590
|
-
},
|
|
1591
|
-
{
|
|
1592
|
-
"marker": [
|
|
1593
|
-
"unit",
|
|
1594
|
-
0
|
|
1595
|
-
],
|
|
1596
|
-
"range": {
|
|
1597
|
-
"start": 23,
|
|
1598
|
-
"end": 26
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
],
|
|
1602
|
-
"counter": 1
|
|
1603
|
-
},
|
|
1604
|
-
{
|
|
1605
|
-
"operators": [
|
|
1606
|
-
{
|
|
1607
|
-
"marker": [
|
|
1608
|
-
"unit",
|
|
1609
|
-
0
|
|
1610
|
-
],
|
|
1611
|
-
"range": {
|
|
1612
|
-
"start": 0,
|
|
1613
|
-
"end": 3
|
|
1614
|
-
}
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
"marker": [
|
|
1618
|
-
"means",
|
|
1619
|
-
0
|
|
1620
|
-
],
|
|
1621
|
-
"range": {
|
|
1622
|
-
"start": 5,
|
|
1623
|
-
"end": 9
|
|
1624
|
-
}
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
"marker": [
|
|
1628
|
-
"measurement_unit",
|
|
1629
|
-
0
|
|
1630
|
-
],
|
|
1631
|
-
"range": {
|
|
1632
|
-
"start": 11,
|
|
1633
|
-
"end": 26
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
],
|
|
1637
|
-
"counter": 2
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
"operators": [
|
|
1641
|
-
{
|
|
1642
|
-
"marker": [
|
|
1643
|
-
"unit",
|
|
1644
|
-
1
|
|
1645
|
-
],
|
|
1646
|
-
"range": {
|
|
1647
|
-
"start": 0,
|
|
1648
|
-
"end": 3
|
|
1649
|
-
}
|
|
1650
|
-
},
|
|
1651
|
-
{
|
|
1652
|
-
"marker": [
|
|
1653
|
-
"means",
|
|
1654
|
-
0
|
|
1655
|
-
],
|
|
1656
|
-
"range": {
|
|
1657
|
-
"start": 5,
|
|
1658
|
-
"end": 9
|
|
1659
|
-
}
|
|
1660
|
-
},
|
|
1661
|
-
{
|
|
1662
|
-
"marker": [
|
|
1663
|
-
"measurement_unit",
|
|
1664
|
-
0
|
|
1665
|
-
],
|
|
1666
|
-
"range": {
|
|
1667
|
-
"start": 11,
|
|
1668
|
-
"end": 26
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
],
|
|
1672
|
-
"counter": 3
|
|
1673
|
-
},
|
|
1674
|
-
{
|
|
1675
|
-
"operators": [
|
|
1676
|
-
{
|
|
1677
|
-
"marker": [
|
|
1678
|
-
"means",
|
|
1679
|
-
1
|
|
1680
|
-
],
|
|
1681
|
-
"range": {
|
|
1682
|
-
"start": 0,
|
|
1683
|
-
"end": 26
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
],
|
|
1687
|
-
"counter": 4
|
|
1688
|
-
}
|
|
1689
|
-
],
|
|
1690
|
-
"length": 1
|
|
1691
|
-
}
|
|
1692
|
-
],
|
|
1693
|
-
"learned_contextual_priorities": [],
|
|
1694
|
-
"explain_associations_details": [
|
|
1695
|
-
null
|
|
1696
|
-
],
|
|
1697
|
-
"query": "unit means measurement unit",
|
|
1698
|
-
"key": {
|
|
1699
|
-
"query": "unit means measurement unit"
|
|
1700
|
-
}
|
|
1701
|
-
},
|
|
1702
1409
|
{
|
|
1703
1410
|
"apply": "({apis}) => {\n apis('properties').addHierarchyWatcher({\n match: ({parentId, isA}) => isA(parentId, 'unit') && parentId.startsWith('unit_'),\n apply: ({config, childId, parent, parentId}) => {\n config.updateBridge(childId, ({ bridge }) => {\n if (!bridge.initial) {\n bridge.initial = {}\n }\n bridge.initial['dimension'] = parent.objects[1].value\n })\n }\n })\n }"
|
|
1704
1411
|
},
|
|
@@ -5332,7 +5039,7 @@
|
|
|
5332
5039
|
"bridges": [
|
|
5333
5040
|
{
|
|
5334
5041
|
"id": "useMeasurementSystem",
|
|
5335
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:
|
|
5042
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:324",
|
|
5336
5043
|
"isA": [
|
|
5337
5044
|
"verb"
|
|
5338
5045
|
],
|
|
@@ -5971,141 +5678,6 @@
|
|
|
5971
5678
|
],
|
|
5972
5679
|
"length": 1
|
|
5973
5680
|
},
|
|
5974
|
-
{
|
|
5975
|
-
"summaries": [
|
|
5976
|
-
{
|
|
5977
|
-
"operators": [
|
|
5978
|
-
{
|
|
5979
|
-
"marker": [
|
|
5980
|
-
"unit",
|
|
5981
|
-
0
|
|
5982
|
-
],
|
|
5983
|
-
"range": {
|
|
5984
|
-
"start": 0,
|
|
5985
|
-
"end": 3
|
|
5986
|
-
}
|
|
5987
|
-
},
|
|
5988
|
-
{
|
|
5989
|
-
"marker": [
|
|
5990
|
-
"means",
|
|
5991
|
-
0
|
|
5992
|
-
],
|
|
5993
|
-
"range": {
|
|
5994
|
-
"start": 5,
|
|
5995
|
-
"end": 9
|
|
5996
|
-
}
|
|
5997
|
-
},
|
|
5998
|
-
{
|
|
5999
|
-
"marker": [
|
|
6000
|
-
"measurement",
|
|
6001
|
-
0
|
|
6002
|
-
],
|
|
6003
|
-
"range": {
|
|
6004
|
-
"start": 11,
|
|
6005
|
-
"end": 21
|
|
6006
|
-
}
|
|
6007
|
-
},
|
|
6008
|
-
{
|
|
6009
|
-
"marker": [
|
|
6010
|
-
"unit",
|
|
6011
|
-
0
|
|
6012
|
-
],
|
|
6013
|
-
"range": {
|
|
6014
|
-
"start": 23,
|
|
6015
|
-
"end": 26
|
|
6016
|
-
}
|
|
6017
|
-
}
|
|
6018
|
-
],
|
|
6019
|
-
"counter": 1
|
|
6020
|
-
},
|
|
6021
|
-
{
|
|
6022
|
-
"operators": [
|
|
6023
|
-
{
|
|
6024
|
-
"marker": [
|
|
6025
|
-
"unit",
|
|
6026
|
-
0
|
|
6027
|
-
],
|
|
6028
|
-
"range": {
|
|
6029
|
-
"start": 0,
|
|
6030
|
-
"end": 3
|
|
6031
|
-
}
|
|
6032
|
-
},
|
|
6033
|
-
{
|
|
6034
|
-
"marker": [
|
|
6035
|
-
"means",
|
|
6036
|
-
0
|
|
6037
|
-
],
|
|
6038
|
-
"range": {
|
|
6039
|
-
"start": 5,
|
|
6040
|
-
"end": 9
|
|
6041
|
-
}
|
|
6042
|
-
},
|
|
6043
|
-
{
|
|
6044
|
-
"marker": [
|
|
6045
|
-
"measurement_unit",
|
|
6046
|
-
0
|
|
6047
|
-
],
|
|
6048
|
-
"range": {
|
|
6049
|
-
"start": 11,
|
|
6050
|
-
"end": 26
|
|
6051
|
-
}
|
|
6052
|
-
}
|
|
6053
|
-
],
|
|
6054
|
-
"counter": 2
|
|
6055
|
-
},
|
|
6056
|
-
{
|
|
6057
|
-
"operators": [
|
|
6058
|
-
{
|
|
6059
|
-
"marker": [
|
|
6060
|
-
"unit",
|
|
6061
|
-
1
|
|
6062
|
-
],
|
|
6063
|
-
"range": {
|
|
6064
|
-
"start": 0,
|
|
6065
|
-
"end": 3
|
|
6066
|
-
}
|
|
6067
|
-
},
|
|
6068
|
-
{
|
|
6069
|
-
"marker": [
|
|
6070
|
-
"means",
|
|
6071
|
-
0
|
|
6072
|
-
],
|
|
6073
|
-
"range": {
|
|
6074
|
-
"start": 5,
|
|
6075
|
-
"end": 9
|
|
6076
|
-
}
|
|
6077
|
-
},
|
|
6078
|
-
{
|
|
6079
|
-
"marker": [
|
|
6080
|
-
"measurement_unit",
|
|
6081
|
-
0
|
|
6082
|
-
],
|
|
6083
|
-
"range": {
|
|
6084
|
-
"start": 11,
|
|
6085
|
-
"end": 26
|
|
6086
|
-
}
|
|
6087
|
-
}
|
|
6088
|
-
],
|
|
6089
|
-
"counter": 3
|
|
6090
|
-
},
|
|
6091
|
-
{
|
|
6092
|
-
"operators": [
|
|
6093
|
-
{
|
|
6094
|
-
"marker": [
|
|
6095
|
-
"means",
|
|
6096
|
-
1
|
|
6097
|
-
],
|
|
6098
|
-
"range": {
|
|
6099
|
-
"start": 0,
|
|
6100
|
-
"end": 26
|
|
6101
|
-
}
|
|
6102
|
-
}
|
|
6103
|
-
],
|
|
6104
|
-
"counter": 4
|
|
6105
|
-
}
|
|
6106
|
-
],
|
|
6107
|
-
"length": 1
|
|
6108
|
-
},
|
|
6109
5681
|
{
|
|
6110
5682
|
"summaries": [
|
|
6111
5683
|
{
|