ekms 9.8.0 → 9.9.0-beta.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.
Files changed (99) hide show
  1. package/common/actions.instance.json +12 -10
  2. package/common/actions.js +14 -12
  3. package/common/angle.instance.json +37 -17
  4. package/common/animals.instance.json +54 -28
  5. package/common/askfor.instance.json +89 -192
  6. package/common/askfor.js +49 -12
  7. package/common/asking.js +13 -5
  8. package/common/avatar.js +3 -3
  9. package/common/can.instance.json +32 -20
  10. package/common/can.js +2 -2
  11. package/common/colors.instance.json +44 -16
  12. package/common/colors.js +1 -1
  13. package/common/comparable.instance.json +25 -22
  14. package/common/compass.instance.json +9 -3
  15. package/common/compass.js +1 -1
  16. package/common/concept.instance.json +14 -6
  17. package/common/concept.js +2 -0
  18. package/common/conjunction.js +20 -12
  19. package/common/control.js +10 -18
  20. package/common/countable.js +4 -3
  21. package/common/crew.instance.json +95 -27
  22. package/common/dateTimeSelectors.instance.json +4 -4
  23. package/common/dateTimeSelectors.js +4 -7
  24. package/common/dates.instance.json +52 -28
  25. package/common/dates.js +16 -11
  26. package/common/debug.instance.json +52 -0
  27. package/common/debug.js +52 -0
  28. package/common/debug.test.json +1 -0
  29. package/common/dialogues.js +126 -70
  30. package/common/dimension.instance.json +259 -492
  31. package/common/dimension.js +72 -12
  32. package/common/drone.instance.json +441 -84
  33. package/common/drone.js +57 -56
  34. package/common/drone_v1.instance.json +36 -12
  35. package/common/drone_v1.js +20 -15
  36. package/common/edible.instance.json +96 -32
  37. package/common/emotions.instance.json +15 -1
  38. package/common/evaluate.js +10 -13
  39. package/common/fastfood.instance.json +282 -100
  40. package/common/fastfood.js +30 -15
  41. package/common/formulas.instance.json +162 -24
  42. package/common/formulas.js +18 -9
  43. package/common/gdefaults.js +20 -96
  44. package/common/helpers/concept.js +2 -9
  45. package/common/helpers/conjunction.js +11 -1
  46. package/common/helpers/dialogues.js +48 -24
  47. package/common/helpers/gdefaults.js +15 -5
  48. package/common/helpers/properties.js +132 -326
  49. package/common/helpers.js +28 -58
  50. package/common/hierarchy.js +71 -41
  51. package/common/kirk.instance.json +3 -1
  52. package/common/latin.instance.json +14 -14
  53. package/common/latin.js +7 -7
  54. package/common/length.instance.json +331 -61
  55. package/common/linear_orderings.instance.json +1 -0
  56. package/common/linear_orderings.js +90 -0
  57. package/common/linear_orderings.test.json +1 -0
  58. package/common/math.instance.json +144 -5
  59. package/common/math.js +18 -7
  60. package/common/menus.instance.json +29 -11
  61. package/common/menus.js +8 -5
  62. package/common/meta.js +14 -13
  63. package/common/nameable.js +9 -5
  64. package/common/numbers.instance.json +8 -3
  65. package/common/numbers.js +59 -35
  66. package/common/ordering.instance.json +53 -4
  67. package/common/ordinals.js +25 -25
  68. package/common/people.instance.json +66 -12
  69. package/common/percentages.js +4 -2
  70. package/common/pipboy.instance.json +89 -44
  71. package/common/pipboy.js +21 -14
  72. package/common/pokemon.instance.json +39 -13
  73. package/common/pressure.instance.json +20 -6
  74. package/common/properties.instance.json +2648 -501
  75. package/common/properties.js +561 -82
  76. package/common/punctuation.js +1 -0
  77. package/common/rates.instance.json +2 -2
  78. package/common/rates.js +3 -3
  79. package/common/reminders.instance.json +16 -0
  80. package/common/reminders.js +24 -20
  81. package/common/reports.instance.json +11 -12
  82. package/common/reports.js +12 -12
  83. package/common/scorekeeper.js +20 -10
  84. package/common/sdefaults.js +30 -9
  85. package/common/spock.instance.json +3 -1
  86. package/common/stm.js +16 -21
  87. package/common/temperature.instance.json +40 -11
  88. package/common/testing.js +2 -2
  89. package/common/time.instance.json +149 -47
  90. package/common/time.js +9 -8
  91. package/common/ui.instance.json +4 -2
  92. package/common/ui.js +5 -5
  93. package/common/weight.instance.json +113 -21
  94. package/common/weight.js +5 -1
  95. package/common/words.js +113 -2
  96. package/common/wp.instance.json +125 -18
  97. package/common/wp.js +6 -2
  98. package/main.js +2 -0
  99. package/package.json +10 -3
@@ -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
  },
@@ -87,32 +86,63 @@
87
86
  ]
88
87
  },
89
88
  {
90
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:200",
89
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:201",
91
90
  "id": "preferredUnits",
92
91
  "isA": [
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, resolveResponse}) => {\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 resolveResponse(context, value.evalue)\n }"
95
+ "check": [
96
+ "marker",
97
+ "text",
98
+ "verbatim",
99
+ "value",
100
+ "evalue",
101
+ "isResponse",
102
+ {
103
+ "properties": "modifiers"
104
+ },
105
+ {
106
+ "properties": "postModifiers"
107
+ },
108
+ "quantity"
109
+ ],
110
+ "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
111
  },
98
112
  {
99
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:215",
113
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:217",
100
114
  "id": "useUnits",
101
115
  "isA": [
102
116
  "verb"
103
117
  ],
104
118
  "bridge": "{ ...next(operator), units: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'units' }] }",
119
+ "check": [
120
+ "marker",
121
+ "text",
122
+ "verbatim",
123
+ "value",
124
+ "evalue",
125
+ "isResponse",
126
+ {
127
+ "properties": "modifiers"
128
+ },
129
+ {
130
+ "properties": "postModifiers"
131
+ },
132
+ "units"
133
+ ],
105
134
  "semantic": "({context, api}) => {\n api.setPreferredUnits(context.units)\n }"
106
135
  },
107
136
  {
108
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:224",
137
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:227",
109
138
  "id": "dimension"
110
139
  },
111
140
  {
112
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:228",
141
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:231",
113
142
  "id": "quantity",
114
143
  "isA": [
115
- "noun"
144
+ "noun",
145
+ "linearlyOrdered"
116
146
  ],
117
147
  "check": [
118
148
  "marker",
@@ -151,12 +181,50 @@
151
181
  "after": [
152
182
  "mathematical_operator"
153
183
  ],
154
- "bridge": "{ marker: next(operator('quantity')), dead: true, unit: after[0], amount: before[0], interpolate: [ { property: 'amount' }, { property: 'unit' } ] }"
184
+ "localHierarchy": [
185
+ [
186
+ "linearOrderedRange",
187
+ "number"
188
+ ]
189
+ ],
190
+ "bridge": "{ \n marker: next(operator('quantity')), \n dead: true, \n instance: true,\n rangeableWith: ['quantity'],\n unit: after[0], \n amount: before[0], \n interpolate: [ { property: 'amount' }, { property: 'unit' } ] \n }",
191
+ "check": [
192
+ "marker",
193
+ "text",
194
+ "verbatim",
195
+ "value",
196
+ "evalue",
197
+ "isResponse",
198
+ {
199
+ "properties": "modifiers"
200
+ },
201
+ {
202
+ "properties": "postModifiers"
203
+ },
204
+ "unit",
205
+ "amount"
206
+ ]
155
207
  },
156
208
  {
157
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:259",
209
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:271",
158
210
  "id": "convertToUnits",
159
211
  "bridge": "{ ...next(operator), from: before[0], to: after[0] }",
212
+ "check": [
213
+ "marker",
214
+ "text",
215
+ "verbatim",
216
+ "value",
217
+ "evalue",
218
+ "isResponse",
219
+ {
220
+ "properties": "modifiers"
221
+ },
222
+ {
223
+ "properties": "postModifiers"
224
+ },
225
+ "from",
226
+ "to"
227
+ ],
160
228
  "isA": [
161
229
  "expression",
162
230
  "queryable"
@@ -178,12 +246,15 @@
178
246
  ]
179
247
  ],
180
248
  "generatorp": "async ({context, g}) => `${await g(context.from)} ${context.word} ${await g(context.to)}`",
181
- "evaluator": "async ({context, api, toArray, resolveEvaluate}) => {\n const from = context.from;\n const tos = toArray(context.to);\n resolveEvaluate(context, await api.convertToUnits(context, from, tos))\n }"
249
+ "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
250
  },
183
251
  {
184
252
  "id": "unit",
185
253
  "isA": [
186
254
  "mathematicalExpression"
255
+ ],
256
+ "before": [
257
+ "mathematical_operator"
187
258
  ]
188
259
  }
189
260
  ]
@@ -195,6 +266,7 @@
195
266
  "bridges": [
196
267
  {
197
268
  "id": "useMeasurementSystem",
269
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:329",
198
270
  "isA": [
199
271
  "verb"
200
272
  ],
@@ -217,6 +289,18 @@
217
289
  ]
218
290
  }
219
291
  ]
292
+ },
293
+ {
294
+ "semantics": [
295
+ {
296
+ "match": "({context, isA}) => {\n if (context.marker == 'linearlyOrderedCompare') {\n const terms = [context.left, context.right]\n return terms.every((term) => isA(term, 'quantity')) && terms.every((term) => term.instance)\n }\n }",
297
+ "apply": "async ({context, toFinalValue, toEValue, compare, resolveEvaluate, e}) => {\n debugger\n const { left, right } = context\n if (left.propertyType !== right.propertyType) {\n return\n }\n const convert = await e({ marker: 'convertToUnits', from: right, to: left.unit }, where())\n const rightInLeftUnits = await toEValue(convert)\n resolveEvaluate(context, await compare(left.amount, await rightInLeftUnits.amount))\n }"
298
+ },
299
+ {
300
+ "match": "({context, isA, debug}) => {\n if (context.marker !== 'unify') {\n return\n }\n if (context.terms[0].marker == 'linearOrderedRange') {\n } else {\n return context.terms.every((term) => isA(term, 'quantity')) && context.terms.every((term) => term.instance)\n }\n }",
301
+ "apply": "async ({context, e, debug, unify, resolveEvaluate, toEValue}) => {\n const t1 = context.terms[0]\n const t2 = context.terms[1]\n if (t1.propertyType !== t2.propertyType) {\n return\n }\n const convert = await e({ marker: 'convertToUnits', from: t2, to: t1.unit }, where())\n const t2InT1Units = await toEValue(convert)\n resolveEvaluate(context, await unify(t1.amount, await t2InT1Units.amount))\n }"
302
+ }
303
+ ]
220
304
  }
221
305
  ],
222
306
  "resultss": [
@@ -355,7 +439,6 @@
355
439
  "level": 2,
356
440
  "context_index": 1,
357
441
  "topLevel": true,
358
- "context_id": 2,
359
442
  "touchedBy": [
360
443
  "dimension#call2"
361
444
  ]
@@ -536,6 +619,9 @@
536
619
  }
537
620
  ],
538
621
  "learned_contextual_priorities": [],
622
+ "explain_associations_details": [
623
+ null
624
+ ],
539
625
  "query": "amount is a concept",
540
626
  "key": {
541
627
  "query": "amount is a concept"
@@ -641,7 +727,6 @@
641
727
  "level": 1,
642
728
  "context_index": 1,
643
729
  "topLevel": true,
644
- "context_id": 2,
645
730
  "touchedBy": [
646
731
  "dimension#call2"
647
732
  ]
@@ -787,6 +872,9 @@
787
872
  }
788
873
  ],
789
874
  "learned_contextual_priorities": [],
875
+ "explain_associations_details": [
876
+ null
877
+ ],
790
878
  "query": "measurement modifies unit",
791
879
  "key": {
792
880
  "query": "measurement modifies unit"
@@ -1043,7 +1131,6 @@
1043
1131
  "level": 2,
1044
1132
  "context_index": 1,
1045
1133
  "topLevel": true,
1046
- "context_id": 2,
1047
1134
  "touchedBy": [
1048
1135
  "dimension#call2"
1049
1136
  ]
@@ -1297,386 +1384,99 @@
1297
1384
  0
1298
1385
  ],
1299
1386
  "range": {
1300
- "start": 31,
1301
- "end": 33
1302
- }
1303
- },
1304
- {
1305
- "marker": [
1306
- "unknown",
1307
- 0
1308
- ],
1309
- "range": {
1310
- "start": 35,
1311
- "end": 42
1312
- }
1313
- }
1314
- ],
1315
- "counter": 4
1316
- },
1317
- {
1318
- "operators": [
1319
- {
1320
- "marker": [
1321
- "list",
1322
- 1
1323
- ],
1324
- "range": {
1325
- "start": 0,
1326
- "end": 29
1327
- }
1328
- },
1329
- {
1330
- "marker": [
1331
- "is",
1332
- 0
1333
- ],
1334
- "range": {
1335
- "start": 31,
1336
- "end": 33
1337
- }
1338
- },
1339
- {
1340
- "marker": [
1341
- "unknown",
1342
- 0
1343
- ],
1344
- "range": {
1345
- "start": 35,
1346
- "end": 42
1347
- }
1348
- }
1349
- ],
1350
- "counter": 5
1351
- },
1352
- {
1353
- "operators": [
1354
- {
1355
- "marker": [
1356
- "is",
1357
- 1
1358
- ],
1359
- "range": {
1360
- "start": 0,
1361
- "end": 42
1362
- }
1363
- }
1364
- ],
1365
- "counter": 6
1366
- },
1367
- {
1368
- "operators": [
1369
- {
1370
- "marker": [
1371
- "is",
1372
- 2
1373
- ],
1374
- "range": {
1375
- "start": 0,
1376
- "end": 42
1377
- }
1378
- }
1379
- ],
1380
- "counter": 7
1381
- }
1382
- ],
1383
- "length": 1
1384
- }
1385
- ],
1386
- "learned_contextual_priorities": [],
1387
- "query": "dimension and measurement unit are concepts",
1388
- "key": {
1389
- "query": "dimension and measurement unit are concepts"
1390
- }
1391
- },
1392
- {
1393
- "metadata": {
1394
- "opChoices": [
1395
- {
1396
- "op": [
1397
- "measurement_unit",
1398
- 0
1399
- ],
1400
- "ops": [
1401
- [
1402
- "means",
1403
- 0
1404
- ],
1405
- [
1406
- "measurement",
1407
- 0
1408
- ],
1409
- [
1410
- "measurement_unit",
1411
- 0
1412
- ],
1413
- [
1414
- "unit",
1415
- 0
1416
- ]
1417
- ],
1418
- "counter": 1
1419
- },
1420
- {
1421
- "op": [
1422
- "unit",
1423
- 0
1424
- ],
1425
- "ops": [
1426
- [
1427
- "means",
1428
- 0
1429
- ],
1430
- [
1431
- "unit",
1432
- 0
1433
- ]
1434
- ],
1435
- "counter": 2
1436
- },
1437
- {
1438
- "op": [
1439
- "means",
1440
- 0
1441
- ],
1442
- "ops": [
1443
- [
1444
- "means",
1445
- 0
1446
- ]
1447
- ],
1448
- "counter": 3
1449
- }
1450
- ]
1451
- },
1452
- "trace": "undefined",
1453
- "contexts": [
1454
- {
1455
- "marker": "means",
1456
- "value": "means",
1457
- "default": true,
1458
- "text": "unit means measurement unit",
1459
- "word": "means",
1460
- "range": {
1461
- "start": 0,
1462
- "end": 26
1463
- },
1464
- "dead": true,
1465
- "from": {
1466
- "value": "unit",
1467
- "number": "one",
1468
- "text": "unit",
1469
- "marker": "unit",
1470
- "word": "unit",
1471
- "range": {
1472
- "start": 0,
1473
- "end": 3
1474
- },
1475
- "dead": true,
1476
- "level": 1
1477
- },
1478
- "to": {
1479
- "value": "measurement_unit",
1480
- "number": "one",
1481
- "text": "measurement unit",
1482
- "marker": "measurement_unit",
1483
- "word": "unit",
1484
- "range": {
1485
- "start": 11,
1486
- "end": 26
1487
- },
1488
- "types": [
1489
- "measurement_unit",
1490
- "unit"
1491
- ],
1492
- "modifier_measurement": {
1493
- "value": "measurement",
1494
- "number": "one",
1495
- "text": "measurement",
1496
- "marker": "measurement",
1497
- "word": "measurement",
1498
- "range": {
1499
- "start": 11,
1500
- "end": 21
1501
- },
1502
- "types": [
1503
- "measurement"
1504
- ],
1505
- "level": 0
1506
- },
1507
- "atomic": true,
1508
- "dead": true,
1509
- "compatible_types": [
1510
- "unit"
1511
- ],
1512
- "modifiers": [
1513
- "modifier_measurement"
1514
- ],
1515
- "level": 0
1516
- },
1517
- "level": 1,
1518
- "context_index": 1,
1519
- "topLevel": true,
1520
- "context_id": 2,
1521
- "metaInfo": "The mapping from from the expression being defined \"unit\" to the definition phrase \"measurement unit\" is [{\"from\":[\"number\"],\"to\":[\"number\"]}]",
1522
- "touchedBy": [
1523
- "dimension#call2"
1524
- ]
1525
- }
1526
- ],
1527
- "generated": [
1528
- ""
1529
- ],
1530
- "paraphrases": [
1531
- "unit means measurement unit"
1532
- ],
1533
- "paraphrasesParenthesized": [],
1534
- "generatedParenthesized": [],
1535
- "responses": [
1536
- ""
1537
- ],
1538
- "associations": [],
1539
- "summaries": [
1540
- {
1541
- "summaries": [
1542
- {
1543
- "operators": [
1544
- {
1545
- "marker": [
1546
- "unit",
1547
- 0
1548
- ],
1549
- "range": {
1550
- "start": 0,
1551
- "end": 3
1552
- }
1553
- },
1554
- {
1555
- "marker": [
1556
- "means",
1557
- 0
1558
- ],
1559
- "range": {
1560
- "start": 5,
1561
- "end": 9
1562
- }
1563
- },
1564
- {
1565
- "marker": [
1566
- "measurement",
1567
- 0
1568
- ],
1569
- "range": {
1570
- "start": 11,
1571
- "end": 21
1572
- }
1573
- },
1574
- {
1575
- "marker": [
1576
- "unit",
1577
- 0
1578
- ],
1579
- "range": {
1580
- "start": 23,
1581
- "end": 26
1582
- }
1583
- }
1584
- ],
1585
- "counter": 1
1586
- },
1587
- {
1588
- "operators": [
1589
- {
1590
- "marker": [
1591
- "unit",
1592
- 0
1593
- ],
1594
- "range": {
1595
- "start": 0,
1596
- "end": 3
1597
- }
1598
- },
1599
- {
1600
- "marker": [
1601
- "means",
1602
- 0
1603
- ],
1604
- "range": {
1605
- "start": 5,
1606
- "end": 9
1387
+ "start": 31,
1388
+ "end": 33
1607
1389
  }
1608
1390
  },
1609
1391
  {
1610
1392
  "marker": [
1611
- "measurement_unit",
1393
+ "unknown",
1612
1394
  0
1613
1395
  ],
1614
1396
  "range": {
1615
- "start": 11,
1616
- "end": 26
1397
+ "start": 35,
1398
+ "end": 42
1617
1399
  }
1618
1400
  }
1619
1401
  ],
1620
- "counter": 2
1402
+ "counter": 4
1621
1403
  },
1622
1404
  {
1623
1405
  "operators": [
1624
1406
  {
1625
1407
  "marker": [
1626
- "unit",
1408
+ "list",
1627
1409
  1
1628
1410
  ],
1629
1411
  "range": {
1630
1412
  "start": 0,
1631
- "end": 3
1413
+ "end": 29
1632
1414
  }
1633
1415
  },
1634
1416
  {
1635
1417
  "marker": [
1636
- "means",
1418
+ "is",
1637
1419
  0
1638
1420
  ],
1639
1421
  "range": {
1640
- "start": 5,
1641
- "end": 9
1422
+ "start": 31,
1423
+ "end": 33
1642
1424
  }
1643
1425
  },
1644
1426
  {
1645
1427
  "marker": [
1646
- "measurement_unit",
1428
+ "unknown",
1647
1429
  0
1648
1430
  ],
1649
1431
  "range": {
1650
- "start": 11,
1651
- "end": 26
1432
+ "start": 35,
1433
+ "end": 42
1652
1434
  }
1653
1435
  }
1654
1436
  ],
1655
- "counter": 3
1437
+ "counter": 5
1656
1438
  },
1657
1439
  {
1658
1440
  "operators": [
1659
1441
  {
1660
1442
  "marker": [
1661
- "means",
1443
+ "is",
1662
1444
  1
1663
1445
  ],
1664
1446
  "range": {
1665
1447
  "start": 0,
1666
- "end": 26
1448
+ "end": 42
1667
1449
  }
1668
1450
  }
1669
1451
  ],
1670
- "counter": 4
1452
+ "counter": 6
1453
+ },
1454
+ {
1455
+ "operators": [
1456
+ {
1457
+ "marker": [
1458
+ "is",
1459
+ 2
1460
+ ],
1461
+ "range": {
1462
+ "start": 0,
1463
+ "end": 42
1464
+ }
1465
+ }
1466
+ ],
1467
+ "counter": 7
1671
1468
  }
1672
1469
  ],
1673
1470
  "length": 1
1674
1471
  }
1675
1472
  ],
1676
1473
  "learned_contextual_priorities": [],
1677
- "query": "unit means measurement unit",
1474
+ "explain_associations_details": [
1475
+ null
1476
+ ],
1477
+ "query": "dimension and measurement unit are concepts",
1678
1478
  "key": {
1679
- "query": "unit means measurement unit"
1479
+ "query": "dimension and measurement unit are concepts"
1680
1480
  }
1681
1481
  },
1682
1482
  {
@@ -1782,7 +1582,6 @@
1782
1582
  "level": 1,
1783
1583
  "context_index": 1,
1784
1584
  "topLevel": true,
1785
- "context_id": 2,
1786
1585
  "touchedBy": [
1787
1586
  "dimension#call2"
1788
1587
  ]
@@ -1928,6 +1727,9 @@
1928
1727
  }
1929
1728
  ],
1930
1729
  "learned_contextual_priorities": [],
1730
+ "explain_associations_details": [
1731
+ null
1732
+ ],
1931
1733
  "query": "metric modifies system",
1932
1734
  "key": {
1933
1735
  "query": "metric modifies system"
@@ -2033,7 +1835,6 @@
2033
1835
  "level": 1,
2034
1836
  "context_index": 1,
2035
1837
  "topLevel": true,
2036
- "context_id": 2,
2037
1838
  "touchedBy": [
2038
1839
  "dimension#call2"
2039
1840
  ]
@@ -2179,6 +1980,9 @@
2179
1980
  }
2180
1981
  ],
2181
1982
  "learned_contextual_priorities": [],
1983
+ "explain_associations_details": [
1984
+ null
1985
+ ],
2182
1986
  "query": "imperial modifies system",
2183
1987
  "key": {
2184
1988
  "query": "imperial modifies system"
@@ -2284,7 +2088,6 @@
2284
2088
  "level": 1,
2285
2089
  "context_index": 1,
2286
2090
  "topLevel": true,
2287
- "context_id": 2,
2288
2091
  "touchedBy": [
2289
2092
  "dimension#call2"
2290
2093
  ]
@@ -2430,6 +2233,9 @@
2430
2233
  }
2431
2234
  ],
2432
2235
  "learned_contextual_priorities": [],
2236
+ "explain_associations_details": [
2237
+ null
2238
+ ],
2433
2239
  "query": "measurement modifies system",
2434
2240
  "key": {
2435
2241
  "query": "measurement modifies system"
@@ -2760,7 +2566,6 @@
2760
2566
  "level": 2,
2761
2567
  "context_index": 1,
2762
2568
  "topLevel": true,
2763
- "context_id": 2,
2764
2569
  "touchedBy": [
2765
2570
  "dimension#call2"
2766
2571
  ]
@@ -3091,6 +2896,9 @@
3091
2896
  }
3092
2897
  ],
3093
2898
  "learned_contextual_priorities": [],
2899
+ "explain_associations_details": [
2900
+ null
2901
+ ],
3094
2902
  "query": "the metric system is a measurement system",
3095
2903
  "key": {
3096
2904
  "query": "the metric system is a measurement system"
@@ -3421,7 +3229,6 @@
3421
3229
  "level": 2,
3422
3230
  "context_index": 1,
3423
3231
  "topLevel": true,
3424
- "context_id": 2,
3425
3232
  "touchedBy": [
3426
3233
  "dimension#call2"
3427
3234
  ]
@@ -3752,6 +3559,9 @@
3752
3559
  }
3753
3560
  ],
3754
3561
  "learned_contextual_priorities": [],
3562
+ "explain_associations_details": [
3563
+ null
3564
+ ],
3755
3565
  "query": "the imperial system is a measurement system",
3756
3566
  "key": {
3757
3567
  "query": "the imperial system is a measurement system"
@@ -3857,7 +3667,6 @@
3857
3667
  "level": 1,
3858
3668
  "context_index": 1,
3859
3669
  "topLevel": true,
3860
- "context_id": 2,
3861
3670
  "touchedBy": [
3862
3671
  "dimension#call2"
3863
3672
  ]
@@ -4003,6 +3812,9 @@
4003
3812
  }
4004
3813
  ],
4005
3814
  "learned_contextual_priorities": [],
3815
+ "explain_associations_details": [
3816
+ null
3817
+ ],
4006
3818
  "query": "imperial modifies unit",
4007
3819
  "key": {
4008
3820
  "query": "imperial modifies unit"
@@ -4108,7 +3920,6 @@
4108
3920
  "level": 1,
4109
3921
  "context_index": 1,
4110
3922
  "topLevel": true,
4111
- "context_id": 2,
4112
3923
  "touchedBy": [
4113
3924
  "dimension#call2"
4114
3925
  ]
@@ -4254,6 +4065,9 @@
4254
4065
  }
4255
4066
  ],
4256
4067
  "learned_contextual_priorities": [],
4068
+ "explain_associations_details": [
4069
+ null
4070
+ ],
4257
4071
  "query": "metric modifies unit",
4258
4072
  "key": {
4259
4073
  "query": "metric modifies unit"
@@ -4444,7 +4258,6 @@
4444
4258
  "level": 2,
4445
4259
  "context_index": 1,
4446
4260
  "topLevel": true,
4447
- "context_id": 2,
4448
4261
  "touchedBy": [
4449
4262
  "dimension#call2"
4450
4263
  ]
@@ -4680,6 +4493,9 @@
4680
4493
  }
4681
4494
  ],
4682
4495
  "learned_contextual_priorities": [],
4496
+ "explain_associations_details": [
4497
+ null
4498
+ ],
4683
4499
  "query": "imperial unit is a unit",
4684
4500
  "key": {
4685
4501
  "query": "imperial unit is a unit"
@@ -4870,7 +4686,6 @@
4870
4686
  "level": 2,
4871
4687
  "context_index": 1,
4872
4688
  "topLevel": true,
4873
- "context_id": 2,
4874
4689
  "touchedBy": [
4875
4690
  "dimension#call2"
4876
4691
  ]
@@ -5106,6 +4921,9 @@
5106
4921
  }
5107
4922
  ],
5108
4923
  "learned_contextual_priorities": [],
4924
+ "explain_associations_details": [
4925
+ null
4926
+ ],
5109
4927
  "query": "metric unit is a unit",
5110
4928
  "key": {
5111
4929
  "query": "metric unit is a unit"
@@ -5154,7 +4972,7 @@
5154
4972
  ],
5155
4973
  "generators": [
5156
4974
  {
5157
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:186"
4975
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:187"
5158
4976
  }
5159
4977
  ],
5160
4978
  "bridges": [
@@ -5182,30 +5000,61 @@
5182
5000
  ]
5183
5001
  },
5184
5002
  {
5185
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:200",
5003
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:201",
5186
5004
  "id": "preferredUnits",
5187
5005
  "isA": [
5188
5006
  "verb"
5189
5007
  ],
5190
- "bridge": "{ ...next(operator), quantity: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'quantity' }] }"
5008
+ "bridge": "{ ...next(operator), quantity: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'quantity' }] }",
5009
+ "check": [
5010
+ "marker",
5011
+ "text",
5012
+ "verbatim",
5013
+ "value",
5014
+ "evalue",
5015
+ "isResponse",
5016
+ {
5017
+ "properties": "modifiers"
5018
+ },
5019
+ {
5020
+ "properties": "postModifiers"
5021
+ },
5022
+ "quantity"
5023
+ ]
5191
5024
  },
5192
5025
  {
5193
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:215",
5026
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:217",
5194
5027
  "id": "useUnits",
5195
5028
  "isA": [
5196
5029
  "verb"
5197
5030
  ],
5198
- "bridge": "{ ...next(operator), units: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'units' }] }"
5031
+ "bridge": "{ ...next(operator), units: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'units' }] }",
5032
+ "check": [
5033
+ "marker",
5034
+ "text",
5035
+ "verbatim",
5036
+ "value",
5037
+ "evalue",
5038
+ "isResponse",
5039
+ {
5040
+ "properties": "modifiers"
5041
+ },
5042
+ {
5043
+ "properties": "postModifiers"
5044
+ },
5045
+ "units"
5046
+ ]
5199
5047
  },
5200
5048
  {
5201
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:224",
5049
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:227",
5202
5050
  "id": "dimension"
5203
5051
  },
5204
5052
  {
5205
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:228",
5053
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:231",
5206
5054
  "id": "quantity",
5207
5055
  "isA": [
5208
- "noun"
5056
+ "noun",
5057
+ "linearlyOrdered"
5209
5058
  ],
5210
5059
  "check": [
5211
5060
  "marker",
@@ -5248,12 +5097,50 @@
5248
5097
  "after": [
5249
5098
  "mathematical_operator"
5250
5099
  ],
5251
- "bridge": "{ marker: next(operator('quantity')), dead: true, unit: after[0], amount: before[0], interpolate: [ { property: 'amount' }, { property: 'unit' } ] }"
5100
+ "localHierarchy": [
5101
+ [
5102
+ "linearOrderedRange",
5103
+ "number"
5104
+ ]
5105
+ ],
5106
+ "bridge": "{ \n marker: next(operator('quantity')), \n dead: true, \n instance: true,\n rangeableWith: ['quantity'],\n unit: after[0], \n amount: before[0], \n interpolate: [ { property: 'amount' }, { property: 'unit' } ] \n }",
5107
+ "check": [
5108
+ "marker",
5109
+ "text",
5110
+ "verbatim",
5111
+ "value",
5112
+ "evalue",
5113
+ "isResponse",
5114
+ {
5115
+ "properties": "modifiers"
5116
+ },
5117
+ {
5118
+ "properties": "postModifiers"
5119
+ },
5120
+ "unit",
5121
+ "amount"
5122
+ ]
5252
5123
  },
5253
5124
  {
5254
- "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:259",
5125
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:271",
5255
5126
  "id": "convertToUnits",
5256
5127
  "bridge": "{ ...next(operator), from: before[0], to: after[0] }",
5128
+ "check": [
5129
+ "marker",
5130
+ "text",
5131
+ "verbatim",
5132
+ "value",
5133
+ "evalue",
5134
+ "isResponse",
5135
+ {
5136
+ "properties": "modifiers"
5137
+ },
5138
+ {
5139
+ "properties": "postModifiers"
5140
+ },
5141
+ "from",
5142
+ "to"
5143
+ ],
5257
5144
  "isA": [
5258
5145
  "expression",
5259
5146
  "queryable"
@@ -5279,6 +5166,9 @@
5279
5166
  "id": "unit",
5280
5167
  "isA": [
5281
5168
  "mathematicalExpression"
5169
+ ],
5170
+ "before": [
5171
+ "mathematical_operator"
5282
5172
  ]
5283
5173
  }
5284
5174
  ]
@@ -5291,6 +5181,7 @@
5291
5181
  "bridges": [
5292
5182
  {
5293
5183
  "id": "useMeasurementSystem",
5184
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:329",
5294
5185
  "isA": [
5295
5186
  "verb"
5296
5187
  ],
@@ -5312,6 +5203,17 @@
5312
5203
  ]
5313
5204
  }
5314
5205
  ]
5206
+ },
5207
+ {
5208
+ "extraConfig": true,
5209
+ "semantics": [
5210
+ {
5211
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:342"
5212
+ },
5213
+ {
5214
+ "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:362"
5215
+ }
5216
+ ]
5315
5217
  }
5316
5218
  ],
5317
5219
  "fragments": [],
@@ -5923,141 +5825,6 @@
5923
5825
  ],
5924
5826
  "length": 1
5925
5827
  },
5926
- {
5927
- "summaries": [
5928
- {
5929
- "operators": [
5930
- {
5931
- "marker": [
5932
- "unit",
5933
- 0
5934
- ],
5935
- "range": {
5936
- "start": 0,
5937
- "end": 3
5938
- }
5939
- },
5940
- {
5941
- "marker": [
5942
- "means",
5943
- 0
5944
- ],
5945
- "range": {
5946
- "start": 5,
5947
- "end": 9
5948
- }
5949
- },
5950
- {
5951
- "marker": [
5952
- "measurement",
5953
- 0
5954
- ],
5955
- "range": {
5956
- "start": 11,
5957
- "end": 21
5958
- }
5959
- },
5960
- {
5961
- "marker": [
5962
- "unit",
5963
- 0
5964
- ],
5965
- "range": {
5966
- "start": 23,
5967
- "end": 26
5968
- }
5969
- }
5970
- ],
5971
- "counter": 1
5972
- },
5973
- {
5974
- "operators": [
5975
- {
5976
- "marker": [
5977
- "unit",
5978
- 0
5979
- ],
5980
- "range": {
5981
- "start": 0,
5982
- "end": 3
5983
- }
5984
- },
5985
- {
5986
- "marker": [
5987
- "means",
5988
- 0
5989
- ],
5990
- "range": {
5991
- "start": 5,
5992
- "end": 9
5993
- }
5994
- },
5995
- {
5996
- "marker": [
5997
- "measurement_unit",
5998
- 0
5999
- ],
6000
- "range": {
6001
- "start": 11,
6002
- "end": 26
6003
- }
6004
- }
6005
- ],
6006
- "counter": 2
6007
- },
6008
- {
6009
- "operators": [
6010
- {
6011
- "marker": [
6012
- "unit",
6013
- 1
6014
- ],
6015
- "range": {
6016
- "start": 0,
6017
- "end": 3
6018
- }
6019
- },
6020
- {
6021
- "marker": [
6022
- "means",
6023
- 0
6024
- ],
6025
- "range": {
6026
- "start": 5,
6027
- "end": 9
6028
- }
6029
- },
6030
- {
6031
- "marker": [
6032
- "measurement_unit",
6033
- 0
6034
- ],
6035
- "range": {
6036
- "start": 11,
6037
- "end": 26
6038
- }
6039
- }
6040
- ],
6041
- "counter": 3
6042
- },
6043
- {
6044
- "operators": [
6045
- {
6046
- "marker": [
6047
- "means",
6048
- 1
6049
- ],
6050
- "range": {
6051
- "start": 0,
6052
- "end": 26
6053
- }
6054
- }
6055
- ],
6056
- "counter": 4
6057
- }
6058
- ],
6059
- "length": 1
6060
- },
6061
5828
  {
6062
5829
  "summaries": [
6063
5830
  {