ekms 9.8.0 → 9.9.0-beta.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 (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
@@ -32,7 +32,7 @@
32
32
  "points are nameable orderable countable and memorable",
33
33
  "drone modifies direction",
34
34
  {
35
- "apply": "(args) => {\n expectDirection(args)\n expectDistanceForMove(args)\n\n args.config.addSemantic({\n match: ({context, isA}) => isA(context.marker, 'quantity') && isA(context.unit?.marker, 'unitPerUnit'),\n apply: async ({context, objects, api, gr, fragments, e, say}) => {\n // send a command to the drone\n const instantiation = await fragments(\"quantity in meters per second\", { quantity: context })\n const result = await e(instantiation)\n const desired_speed = result.evalue.amount.evalue.evalue\n objects.runCommand = true\n objects.current.speed = desired_speed\n objects.current.speedUnitsOfUser = context.unit\n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlStart',\n apply: ({context, objects, api}) => {\n objects.runCommand = false \n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlEnd',\n apply: async ({context, objects, api}) => {\n // send a command to the drone\n if (objects.runCommand) {\n await api.sendCommand()\n }\n }\n })\n }"
35
+ "apply": "(args) => {\n expectDirection(args)\n expectDistanceForMove(args)\n\n args.config.addSemantic({\n match: ({context, isA}) => isA(context.marker, 'quantity') && isA(context.unit?.marker, 'unitPerUnit'),\n apply: async ({context, objects, api, gr, toEValue, fragments, e, say}) => {\n // send a command to the drone\n const instantiation = await fragments(\"quantity in meters per second\", { quantity: context })\n const result = await e(instantiation, where())\n const desired_speed = toEValue(result.evalue.amount)\n objects.runCommand = true\n objects.current.speed = desired_speed\n objects.current.speedUnitsOfUser = context.unit\n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlStart',\n apply: ({context, objects, api}) => {\n objects.runCommand = false \n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlEnd',\n apply: async ({context, objects, api}) => {\n // send a command to the drone\n if (objects.runCommand) {\n await api.sendCommand()\n }\n }\n })\n }"
36
36
  },
37
37
  {
38
38
  "priorities": [
@@ -164,6 +164,7 @@
164
164
  },
165
165
  {
166
166
  "id": "startPath",
167
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:942",
167
168
  "isA": [
168
169
  "verb"
169
170
  ],
@@ -263,6 +264,7 @@
263
264
  },
264
265
  {
265
266
  "id": "patrol",
267
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:983",
266
268
  "isA": [
267
269
  "verb",
268
270
  "repeatable",
@@ -284,10 +286,11 @@
284
286
  },
285
287
  "path"
286
288
  ],
287
- "semantic": "async ({context, g, e, toArray, fragments, toEValue, toFinalValue, recall, objects, verbatim}) => {\n const paths = toArray(context.path)\n for (const context_path of paths) {\n const evaluated = await(e(context_path))\n const path = toEValue(evaluated)\n if (path.marker == 'answerNotKnown') {\n verbatim(`${await g(context_path)} is not a known path`)\n continue\n }\n \n objects.current.path.push({ message: await g(context) })\n\n // TODO put this in a common place for use by do+patrol \n\n // ordinal to pause time in seconds \n const pauseTimeInSeconds = {}\n if (context.pause) {\n const timeAtPoints = toArray(context.pause.timeAtPoint)\n for (const timeAtPoint of timeAtPoints) {\n const instantiation = await fragments(\"quantity in seconds\", { quantity: timeAtPoint.time })\n const result = await e(instantiation)\n const seconds = toFinalValue(toFinalValue(result).amount)\n\n const points = await recall({ context: timeAtPoint.point.point, frameOfReference: path })\n for (const point of toArray(points)) {\n pauseTimeInSeconds[point.ordinal] = seconds\n }\n }\n }\n\n let skipPoints = []\n if (context.skip) {\n skipPoints = toArray(await recall({ context: context.skip.points, frameOfReference: path }))\n }\n\n // get to the start of the patrol \n objects.current.path.push(path.points[0])\n objects.current.path.push({ aimOnly: true, ...path.points[1] })\n objects.current.path.push({ repeatStart: true })\n for (const point of path.points) {\n if (skipPoints.find((skipPoint) => skipPoint.ordinal == point.ordinal)) {\n continue\n }\n objects.current.path.push(point)\n if (pauseTimeInSeconds[point.ordinal]) {\n objects.current.path.push({ marker: 'pause', pauseSeconds: pauseTimeInSeconds[point.ordinal] })\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n // if the patrol does not start and end at the same spot then \n // go back to the start along the same path\n\n\n // if the start is not the end of the patrol then go backwards along the patrol\n if (JSON.stringify(path.points[0].point) !== JSON.stringify(path.points[path.points.length-1].point)) {\n for (const point of [...path.points].reverse().slice(1)) {\n if (skipPoints.find((skipPoint) => skipPoint.ordinal == point.ordinal)) {\n continue\n }\n objects.current.path.push(point)\n if (pauseTimeInSeconds[point.ordinal]) {\n objects.current.path.push({ marker: 'pause', pauseSeconds: pauseTimeInSeconds[point.ordinal] })\n }\n }\n\n const secondPoint = path.points[1]\n objects.current.path.push({ ...secondPoint, aimOnly: true })\n }\n }\n objects.runCommand = true\n }"
289
+ "semantic": "async ({context, g, e, toArray, fragments, toEValue, toFinalValue, recall, objects, verbatim}) => {\n const paths = toArray(context.path)\n for (const context_path of paths) {\n const evaluated = await(e(context_path))\n const path = toEValue(evaluated)\n if (path.marker === 'undefined') {\n verbatim(`${await g(context_path)} is not a known path`)\n continue\n }\n \n objects.current.path.push({ message: await g(context) })\n\n // TODO put this in a common place for use by do+patrol \n\n // ordinal to pause time in seconds \n const pauseTimeInSeconds = {}\n if (context.pause) {\n const timeAtPoints = toArray(context.pause.timeAtPoint)\n for (const timeAtPoint of timeAtPoints) {\n const instantiation = await fragments(\"quantity in seconds\", { quantity: timeAtPoint.time })\n const result = await e(instantiation, where())\n const seconds = toFinalValue(toFinalValue(result).amount)\n\n const points = await recall({ context: timeAtPoint.point.point, frameOfReference: path })\n for (const point of toArray(points)) {\n pauseTimeInSeconds[point.ordinal] = seconds\n }\n }\n }\n\n let skipPoints = []\n if (context.skip) {\n skipPoints = toArray(await recall({ context: context.skip.points, frameOfReference: path }))\n }\n\n // get to the start of the patrol \n objects.current.path.push(path.points[0])\n objects.current.path.push({ aimOnly: true, ...path.points[1] })\n objects.current.path.push({ repeatStart: true })\n for (const point of path.points) {\n if (skipPoints.find((skipPoint) => skipPoint.ordinal == point.ordinal)) {\n continue\n }\n objects.current.path.push(point)\n if (pauseTimeInSeconds[point.ordinal]) {\n objects.current.path.push({ marker: 'pause', pauseSeconds: pauseTimeInSeconds[point.ordinal] })\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n // if the patrol does not start and end at the same spot then \n // go back to the start along the same path\n\n\n // if the start is not the end of the patrol then go backwards along the patrol\n if (JSON.stringify(path.points[0].point) !== JSON.stringify(path.points[path.points.length-1].point)) {\n for (const point of [...path.points].reverse().slice(1)) {\n if (skipPoints.find((skipPoint) => skipPoint.ordinal == point.ordinal)) {\n continue\n }\n objects.current.path.push(point)\n if (pauseTimeInSeconds[point.ordinal]) {\n objects.current.path.push({ marker: 'pause', pauseSeconds: pauseTimeInSeconds[point.ordinal] })\n }\n }\n\n const secondPoint = path.points[1]\n objects.current.path.push({ ...secondPoint, aimOnly: true })\n }\n }\n objects.runCommand = true\n }"
288
290
  },
289
291
  {
290
292
  "id": "lift",
293
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1068",
291
294
  "isA": [
292
295
  "verb"
293
296
  ],
@@ -311,6 +314,7 @@
311
314
  },
312
315
  {
313
316
  "id": "lower",
317
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1080",
314
318
  "isA": [
315
319
  "verb"
316
320
  ],
@@ -334,6 +338,7 @@
334
338
  },
335
339
  {
336
340
  "id": "openDrone",
341
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1092",
337
342
  "isA": [
338
343
  "verb"
339
344
  ],
@@ -357,6 +362,7 @@
357
362
  },
358
363
  {
359
364
  "id": "close",
365
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1104",
360
366
  "isA": [
361
367
  "verb"
362
368
  ],
@@ -380,6 +386,7 @@
380
386
  },
381
387
  {
382
388
  "id": "back",
389
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1116",
383
390
  "isA": [
384
391
  "noun"
385
392
  ],
@@ -393,6 +400,7 @@
393
400
  },
394
401
  {
395
402
  "id": "toPoint",
403
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1128",
396
404
  "isA": [
397
405
  "preposition"
398
406
  ],
@@ -418,10 +426,11 @@
418
426
  },
419
427
  "point"
420
428
  ],
421
- "semantic": "async ({objects, api, e, context}) => {\n objects.runCommand = true\n const point = await e(context.point)\n objects.current.path.push(point.evalue)\n }"
429
+ "semantic": "async ({objects, api, e, context}) => {\n objects.runCommand = true\n const point = await e(context.point, where())\n objects.current.path.push(point.evalue)\n }"
422
430
  },
423
431
  {
424
432
  "id": "go",
433
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1141",
425
434
  "level": 0,
426
435
  "isA": [
427
436
  "verb",
@@ -577,10 +586,11 @@
577
586
  "points": "(@<= 'point')"
578
587
  }
579
588
  },
580
- "semantic": "async (args) => {\n const {api, toFinalValue, context, objects, e, toArray, toEValue} = args\n if (context.distance) {\n await handleDistance(args, context.distance)\n }\n if (context.direction) {\n const array = toArray(context.direction)\n if (array.length == 2 && array[0].marker == 'back' && array[1].marker == 'forth') {\n await args.api.backAndForth()\n } else if (context.direction.marker == 'back') {\n await args.api.back(context.points)\n } else {\n objects.current.direction = context.direction.marker\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n if (context.to) {\n const evaluation = await e(context.to.point)\n const point = toEValue(evaluation)\n objects.current.path.push(point)\n }\n objects.runCommand = true\n await api.sendCommand()\n }"
589
+ "semantic": "async (args) => {\n const {api, toFinalValue, context, objects, e, toArray, toEValue} = args\n if (context.distance) {\n await handleDistance(args, context.distance)\n }\n if (context.direction) {\n const array = toArray(context.direction)\n if (array.length == 2 && array[0].marker == 'back' && array[1].marker == 'forth') {\n await args.api.backAndForth()\n } else if (context.direction.marker == 'back') {\n await args.api.back(context.points)\n } else {\n objects.current.direction = context.direction.marker\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n if (context.to) {\n const evaluation = await e(context.to.point, where())\n const point = toEValue(evaluation)\n objects.current.path.push(point)\n }\n objects.runCommand = true\n await api.sendCommand()\n }"
581
590
  },
582
591
  {
583
592
  "id": "turn",
593
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1196",
584
594
  "isA": [
585
595
  "verb",
586
596
  "action",
@@ -616,10 +626,11 @@
616
626
  "angle": "(@<= 'quantity' && context.unit.dimension == 'angle')"
617
627
  }
618
628
  },
619
- "semantic": "async ({context, fragments, objects, e, s, api, say, toFinalValue}) => {\n const current = objects.current\n current.direction = context.direction.marker\n if (context.repeats) {\n current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n async function toRadians(angle) {\n const fi = await fragments(\"40 degrees in radians\")\n return await fi.instantiate([\n { \n match: ({path, pathEquals}) => pathEquals(path, ['0', 'from']),\n apply: ({context}) => {\n Object.assign(context, angle)\n }\n }\n ])\n }\n if (context.angle) {\n const instantiation = await toRadians(context.angle)\n try {\n const result = await e(instantiation)\n current.turnAngle = toFinalValue(result.evalue.amount)\n objects.runCommand = true\n } catch (e) {\n say(`Don't know how to interpret ${await gp(context.angle)} in radians`)\n return\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n current.justTurn = true\n objects.runCommand = true\n await api.sendCommand()\n }"
629
+ "semantic": "async ({context, fragments, objects, e, s, api, say, toFinalValue}) => {\n const current = objects.current\n current.direction = context.direction.marker\n if (context.repeats) {\n current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n async function toRadians(angle) {\n const fi = await fragments(\"40 degrees in radians\")\n return await fi.instantiate([\n { \n match: ({path, pathEquals}) => pathEquals(path, ['0', 'from']),\n apply: ({context}) => {\n Object.assign(context, angle)\n }\n }\n ])\n }\n if (context.angle) {\n const instantiation = await toRadians(context.angle)\n try {\n const result = await e(instantiation, where())\n current.turnAngle = toFinalValue(result.evalue.amount)\n objects.runCommand = true\n } catch (e) {\n say(`Don't know how to interpret ${await gp(context.angle)} in radians`)\n return\n }\n }\n if (context.repeats) {\n objects.current.timeRepeats = toFinalValue(context.repeats.repeats)\n }\n current.justTurn = true\n objects.runCommand = true\n await api.sendCommand()\n }"
620
630
  },
621
631
  {
622
632
  "id": "pause",
633
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1255",
623
634
  "isA": [
624
635
  "verb"
625
636
  ],
@@ -769,7 +780,7 @@
769
780
  "timeAtPoint": "(@<= 'timeAtPoint')"
770
781
  }
771
782
  },
772
- "semantic": "async ({context, remember, api, e, fragments, toFinalValue}) => {\n let time = context.time \n if (!time) {\n return\n }\n if (time.marker == 'forQuantity') {\n time = time.quantity\n }\n const instantiation = await fragments(\"quantity in seconds\", { quantity: time})\n const result = await e(instantiation)\n const seconds = toFinalValue(toFinalValue(result).amount)\n context.pauseSeconds = seconds\n remember(context)\n api.pause(seconds)\n }"
783
+ "semantic": "async ({context, remember, api, e, fragments, toFinalValue}) => {\n let time = context.time \n if (!time) {\n return\n }\n if (time.marker == 'forQuantity') {\n time = time.quantity\n }\n const instantiation = await fragments(\"quantity in seconds\", { quantity: time})\n const result = await e(instantiation, where())\n const seconds = toFinalValue(toFinalValue(result).amount)\n context.pauseSeconds = seconds\n remember(context)\n api.pause(seconds)\n }"
773
784
  },
774
785
  {
775
786
  "id": "pause",
@@ -800,6 +811,7 @@
800
811
  },
801
812
  {
802
813
  "id": "stop",
814
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1300",
803
815
  "isA": [
804
816
  "verb"
805
817
  ],
@@ -810,6 +822,23 @@
810
822
  "semantic": "async ({context, objects, api, say}) => {\n await api.stop()\n await api.markCurrentPoint()\n }"
811
823
  }
812
824
  ],
825
+ "associations": {
826
+ "positive": [
827
+ {
828
+ "context": [
829
+ [
830
+ "go",
831
+ 0
832
+ ],
833
+ [
834
+ "toPoint",
835
+ 0
836
+ ]
837
+ ],
838
+ "choose": 0
839
+ }
840
+ ]
841
+ },
813
842
  "generators": [
814
843
  {
815
844
  "match": "({context}) => context.marker == 'help' && !context.paraphrase && context.isResponse",
@@ -823,31 +852,31 @@
823
852
  "semantics": [
824
853
  {
825
854
  "match": "({context}) => context.marker == 'doAction'",
826
- "apply": "async ({context, fragments, e, s, toEValue, toFinalValue, namespaced, objects}) => {\n const updated = { ...context, marker: 'patrol', path: context.action }\n namespaced.set('actions', updated, 'logged', true)\n await s(updated)\n // await s({ ...context, marker: 'patrol', path: context.action })\n }"
855
+ "apply": "async ({context, fragments, e, toEValue, toFinalValue, namespaced, objects}) => {\n const updated = { ...context, marker: 'patrol', path: context.action }\n namespaced.set('actions', updated, 'logged', true)\n await e(updated, where())\n }"
827
856
  },
828
857
  {
829
- "match": "({context, contextHierarchy}) => {\n if (!context.pullFromContext || !context.evaluate || contextHierarchy.under(['doAction', 'evaluate', 'patrol']) || context.instance) {\n return false\n }\n \n if (context.marker == 'path' || context.marker == 'this' || context.marker == 'that') {\n return true\n }\n }",
830
- "apply": "async ({context, frameOfReference, toArray, fragments, objects, remember, recall, resolveEvaluate, _continue, contextHierarchy}) => {\n const pathComponents = toArray(await recall({ \n context: { marker: 'pathComponent' }, \n all: true,\n stopCondition: (context) => context.marker == 'startPath',\n }))\n const path = (await fragments('path')).contexts()[0]\n delete path.value\n path.instance = true\n path.points = pathComponents.reverse()\n frameOfReference(path, { mentioned: 'points', reversed: true })\n await remember(path)\n\n _continue() // let the call pick the object out from the stm\n }"
858
+ "match": "({context, contextHierarchy}) => {\n if (!context.pullFromContext || contextHierarchy.under(['doAction', 'evaluate', 'patrol']) || context.isInstance) {\n return false\n }\n \n if (context.marker == 'path' || context.marker == 'this' || context.marker == 'that') {\n return true\n }\n }",
859
+ "apply": "async ({context, frameOfReference, toArray, fragments, objects, remember, recall, resolveEvaluate, _continue, contextHierarchy}) => {\n const pathComponents = toArray(await recall({ \n context: { marker: 'pathComponent' }, \n all: true,\n stopCondition: (context) => context.marker == 'startPath',\n }))\n const path = (await fragments('path')).contexts()[0]\n delete path.value\n path.isInstance = true\n path.points = pathComponents.reverse()\n frameOfReference(path, { mentioned: 'points', reversed: true })\n await remember(path)\n\n _continue() // let the call pick the object out from the stm\n }"
831
860
  },
832
861
  {
833
- "match": "({context, contextHierarchy}) => {\n if (!context.pullFromContext || !context.evaluate || !contextHierarchy.under('call') || context.notUnderCall) {\n return false\n }\n \n if (context.marker == 'point' || context.marker == 'ordinal') {\n return true\n }\n }",
834
- "apply": "async ({frameOfReference, context, e, fragments, stm, toEValue, toArray, objects, remember, recall, resolveEvaluate, _continue, contextHierarchy}) => {\n const evaluated = await e({...context, notUnderCall: true})\n const pointsContext = toEValue(evaluated)\n const pathComponents = toArray(pointsContext)\n\n const path = (await fragments('path')).contexts()[0]\n delete path.value\n path.instance = true\n path.points = [...pathComponents]\n frameOfReference(path, { mentioned: 'points', reversed: true })\n await remember(path)\n resolveEvaluate(context, path)\n }"
862
+ "match": "({context, contextHierarchy}) => {\n if (!context.pullFromContext || !contextHierarchy.under('call') || context.notUnderCall) {\n return false\n }\n \n if (context.marker == 'point' || context.marker == 'ordinal') {\n return true\n }\n }",
863
+ "apply": "async ({frameOfReference, context, e, fragments, stm, toEValue, toArray, objects, remember, recall, resolveEvaluate, _continue, contextHierarchy}) => {\n const evaluated = await e({...context, notUnderCall: true}, where())\n const pointsContext = toEValue(evaluated)\n const pathComponents = toArray(pointsContext)\n\n const path = (await fragments('path')).contexts()[0]\n delete path.value\n path.isInstance = true\n path.points = [...pathComponents]\n frameOfReference(path, { mentioned: 'points', reversed: true })\n await remember(path)\n resolveEvaluate(context, path)\n }"
835
864
  },
836
865
  {
837
- "match": "({context}) => context.evaluate && ['start', 'end'].includes(context.marker) && context.objects && context.objects[1].marker == 'path'",
866
+ "match": "({context}) => ['start', 'end'].includes(context.marker) && context.objects && context.objects[1].marker == 'path'",
838
867
  "apply": "async ({gp, s, context, objects, fragments, resolveEvaluate, api, recall}) => {\n const path = await recall({ context: context.objects[1] })\n if (!path?.points) {\n return\n }\n if (context.marker == 'start') {\n resolveEvaluate(context, path?.points[0])\n } else if (context.marker == 'end') {\n resolveEvaluate(context, path?.points[path?.points.length-1])\n }\n }"
839
868
  },
840
869
  {
841
- "match": "({context, contextHierarchy}) => \n context.evaluate && \n ['start', 'end', 'point'].includes(context.marker) && \n !context.propertyOf && \n contextHierarchy.under('go') &&\n !contextHierarchy.under('call')",
870
+ "match": "({context, contextHierarchy}) => \n ['start', 'end', 'point'].includes(context.marker) && \n !context.propertyOf && \n contextHierarchy.under('go') &&\n !contextHierarchy.under('call')",
842
871
  "apply": "async ({gp, s, toArray, context, objects, fragments, resolveEvaluate, api, recall}) => {\n const path = await recall({ context: { marker: 'path' } })\n if (!path?.points) {\n return\n }\n \n if (context.marker == 'start') {\n resolveEvaluate(context, path?.points[0])\n } else if (context.marker == 'end') {\n resolveEvaluate(context, path?.points[path?.points.length-1])\n } else {\n const points = await recall({ context, frameOfReference: path })\n resolveEvaluate(context, toArray(points)[0])\n }\n }"
843
872
  },
844
873
  {
845
- "match": "({context}) => {\n // from stm lookup\n if (context.marker == 'mentions' && context.evaluate && context.args.context.marker == 'speed') {\n return true\n }\n // from property directly\n if (context.marker == 'speed' && context.evaluate) {\n return true\n }\n }",
846
- "apply": "async ({gp, s, context, objects, fragments, resolveEvaluate, api}) => {\n let return_context = context\n if (context.marker == 'speed') {\n // okay\n } else {\n // stm lookup\n return_context = context\n context = context.args.context\n }\n let value = objects.current.speed\n if (context.condition) {\n if (['highest', 'maximum'].includes(context.condition.marker)) {\n value = api.maximumSpeedDrone()\n } else if (['lowest', 'minimum'].includes(context.condition.marker)) {\n value = api.minimumSpeedDrone()\n }\n }\n const speed = await fragments(\"number meters per second\", { number: { marker: 'integer', value, word: undefined} })\n const preferred = await s({ marker: 'preferredUnits', quantity: speed }) \n resolveEvaluate(return_context, preferred.response || speed)\n }"
874
+ "match": "({context}) => {\n // from stm lookup\n if (context.marker == 'mentions' && context.args.context.marker == 'speed') {\n return true\n }\n // from property directly\n if (context.marker == 'speed') {\n return true\n }\n }",
875
+ "apply": "async ({gp, e, context, objects, fragments, resolveEvaluate, api}) => {\n let return_context = context\n if (context.marker == 'speed') {\n // okay\n } else {\n // stm lookup\n return_context = context\n context = context.args.context\n }\n let value = objects.current.speed\n if (context.condition) {\n if (['highest', 'maximum'].includes(context.condition.marker)) {\n value = api.maximumSpeedDrone()\n } else if (['lowest', 'minimum'].includes(context.condition.marker)) {\n value = api.minimumSpeedDrone()\n }\n }\n const speed = await fragments(\"number meters per second\", { number: { marker: 'integer', value, word: undefined} })\n const preferred = await e({ marker: 'preferredUnits', quantity: speed }, where()) \n resolveEvaluate(return_context, preferred.evalue || speed)\n }"
847
876
  },
848
877
  {
849
- "match": "({context}) => {\n if (context.marker == 'mentions' && context.evaluate && ['direction', 'drone_direction'].includes(context.args.context.marker)) {\n return true\n }\n if (['direction', 'drone_direction'].includes(context.marker) && context.evaluate) {\n return true\n }\n }",
850
- "apply": "async ({gp, s, context, objects, fragments, resolveEvaluate, api}) => {\n const value = objects.current.angleInRadians\n const fi = await fragments(\"number radians\")\n const direction = await fi.instantiate([\n { \n match: ({path, pathEquals}) => pathEquals(path, ['0', 'amount']),\n apply: ({context}) => {\n Object.assign(context, { marker: 'number', value: value, word: undefined })\n }\n }\n ])\n const preferred = await s({ marker: 'preferredUnits', quantity: direction }) \n resolveEvaluate(context, preferred.response || direction)\n }"
878
+ "match": "({context}) => {\n if (context.marker == 'mentions' && ['direction', 'drone_direction'].includes(context.args.context.marker)) {\n return true\n }\n if (['direction', 'drone_direction'].includes(context.marker)) {\n return true\n }\n }",
879
+ "apply": "async ({gp, e, context, objects, fragments, resolveEvaluate, api}) => {\n const value = objects.current.angleInRadians\n const fi = await fragments(\"number radians\")\n const direction = await fi.instantiate([\n { \n match: ({path, pathEquals}) => pathEquals(path, ['0', 'amount']),\n apply: ({context}) => {\n Object.assign(context, { marker: 'number', value: value, word: undefined })\n }\n }\n ])\n const preferred = await e({ marker: 'preferredUnits', quantity: direction }, where()) \n resolveEvaluate(context, preferred.evalue || direction)\n }"
851
880
  },
852
881
  {
853
882
  "match": "({context}) => context.marker == 'timeRepeats'",
@@ -1197,7 +1226,6 @@
1197
1226
  "level": 2,
1198
1227
  "context_index": 1,
1199
1228
  "topLevel": true,
1200
- "context_id": 2,
1201
1229
  "touchedBy": [
1202
1230
  "drone#call2"
1203
1231
  ]
@@ -1763,6 +1791,9 @@
1763
1791
  }
1764
1792
  ],
1765
1793
  "learned_contextual_priorities": [],
1794
+ "explain_associations_details": [
1795
+ null
1796
+ ],
1766
1797
  "query": "arm, claw and drone are concepts",
1767
1798
  "key": {
1768
1799
  "query": "arm, claw and drone are concepts"
@@ -2736,7 +2767,6 @@
2736
2767
  "level": 2,
2737
2768
  "context_index": 1,
2738
2769
  "topLevel": true,
2739
- "context_id": 2,
2740
2770
  "touchedBy": [
2741
2771
  "drone#call2"
2742
2772
  ]
@@ -5102,6 +5132,9 @@
5102
5132
  }
5103
5133
  ],
5104
5134
  "learned_contextual_priorities": [],
5135
+ "explain_associations_details": [
5136
+ null
5137
+ ],
5105
5138
  "query": "around, forward, left, right, back, forth and backward are directions",
5106
5139
  "key": {
5107
5140
  "query": "around, forward, left, right, back, forth and backward are directions"
@@ -5290,7 +5323,6 @@
5290
5323
  "level": 2,
5291
5324
  "context_index": 1,
5292
5325
  "topLevel": true,
5293
- "context_id": 2,
5294
5326
  "touchedBy": [
5295
5327
  "drone#call2"
5296
5328
  ]
@@ -5546,6 +5578,9 @@
5546
5578
  }
5547
5579
  ],
5548
5580
  "learned_contextual_priorities": [],
5581
+ "explain_associations_details": [
5582
+ null
5583
+ ],
5549
5584
  "query": "paths are nameable and memorable",
5550
5585
  "key": {
5551
5586
  "query": "paths are nameable and memorable"
@@ -5909,7 +5944,6 @@
5909
5944
  "level": 2,
5910
5945
  "context_index": 1,
5911
5946
  "topLevel": true,
5912
- "context_id": 2,
5913
5947
  "touchedBy": [
5914
5948
  "drone#call2"
5915
5949
  ]
@@ -6435,6 +6469,9 @@
6435
6469
  }
6436
6470
  ],
6437
6471
  "learned_contextual_priorities": [],
6472
+ "explain_associations_details": [
6473
+ null
6474
+ ],
6438
6475
  "query": "start and end are properties of path",
6439
6476
  "key": {
6440
6477
  "query": "start and end are properties of path"
@@ -6638,7 +6675,6 @@
6638
6675
  "level": 2,
6639
6676
  "context_index": 1,
6640
6677
  "topLevel": true,
6641
- "context_id": 2,
6642
6678
  "touchedBy": [
6643
6679
  "drone#call2"
6644
6680
  ]
@@ -6894,6 +6930,9 @@
6894
6930
  }
6895
6931
  ],
6896
6932
  "learned_contextual_priorities": [],
6933
+ "explain_associations_details": [
6934
+ null
6935
+ ],
6897
6936
  "query": "start and end are points",
6898
6937
  "key": {
6899
6938
  "query": "start and end are points"
@@ -7117,7 +7156,6 @@
7117
7156
  "level": 2,
7118
7157
  "context_index": 1,
7119
7158
  "topLevel": true,
7120
- "context_id": 2,
7121
7159
  "touchedBy": [
7122
7160
  "drone#call2"
7123
7161
  ]
@@ -7428,6 +7466,9 @@
7428
7466
  }
7429
7467
  ],
7430
7468
  "learned_contextual_priorities": [],
7469
+ "explain_associations_details": [
7470
+ null
7471
+ ],
7431
7472
  "query": "rest and remaining are concepts",
7432
7473
  "key": {
7433
7474
  "query": "rest and remaining are concepts"
@@ -7668,7 +7709,6 @@
7668
7709
  "level": 2,
7669
7710
  "context_index": 1,
7670
7711
  "topLevel": true,
7671
- "context_id": 2,
7672
7712
  "touchedBy": [
7673
7713
  "drone#call2"
7674
7714
  ]
@@ -7959,6 +7999,9 @@
7959
7999
  }
7960
8000
  ],
7961
8001
  "learned_contextual_priorities": [],
8002
+ "explain_associations_details": [
8003
+ null
8004
+ ],
7962
8005
  "query": "speed and power are properties",
7963
8006
  "key": {
7964
8007
  "query": "speed and power are properties"
@@ -8130,7 +8173,6 @@
8130
8173
  "level": 2,
8131
8174
  "context_index": 1,
8132
8175
  "topLevel": true,
8133
- "context_id": 2,
8134
8176
  "touchedBy": [
8135
8177
  "drone#call2"
8136
8178
  ]
@@ -8331,6 +8373,9 @@
8331
8373
  }
8332
8374
  ],
8333
8375
  "learned_contextual_priorities": [],
8376
+ "explain_associations_details": [
8377
+ null
8378
+ ],
8334
8379
  "query": "speed and power are comparable",
8335
8380
  "key": {
8336
8381
  "query": "speed and power are comparable"
@@ -8470,7 +8515,6 @@
8470
8515
  "level": 2,
8471
8516
  "context_index": 1,
8472
8517
  "topLevel": true,
8473
- "context_id": 2,
8474
8518
  "touchedBy": [
8475
8519
  "drone#call2"
8476
8520
  ]
@@ -8651,6 +8695,9 @@
8651
8695
  }
8652
8696
  ],
8653
8697
  "learned_contextual_priorities": [],
8698
+ "explain_associations_details": [
8699
+ null
8700
+ ],
8654
8701
  "query": "speed is a quantity",
8655
8702
  "key": {
8656
8703
  "query": "speed is a quantity"
@@ -8790,7 +8837,6 @@
8790
8837
  "level": 2,
8791
8838
  "context_index": 1,
8792
8839
  "topLevel": true,
8793
- "context_id": 2,
8794
8840
  "touchedBy": [
8795
8841
  "drone#call2"
8796
8842
  ]
@@ -8971,6 +9017,9 @@
8971
9017
  }
8972
9018
  ],
8973
9019
  "learned_contextual_priorities": [],
9020
+ "explain_associations_details": [
9021
+ null
9022
+ ],
8974
9023
  "query": "point is a concept",
8975
9024
  "key": {
8976
9025
  "query": "point is a concept"
@@ -9264,7 +9313,6 @@
9264
9313
  "level": 2,
9265
9314
  "context_index": 1,
9266
9315
  "topLevel": true,
9267
- "context_id": 2,
9268
9316
  "touchedBy": [
9269
9317
  "drone#call2"
9270
9318
  ]
@@ -9715,6 +9763,9 @@
9715
9763
  }
9716
9764
  ],
9717
9765
  "learned_contextual_priorities": [],
9766
+ "explain_associations_details": [
9767
+ null
9768
+ ],
9718
9769
  "query": "points are nameable orderable countable and memorable",
9719
9770
  "key": {
9720
9771
  "query": "points are nameable orderable countable and memorable"
@@ -9820,7 +9871,6 @@
9820
9871
  "level": 1,
9821
9872
  "context_index": 1,
9822
9873
  "topLevel": true,
9823
- "context_id": 2,
9824
9874
  "touchedBy": [
9825
9875
  "drone#call2"
9826
9876
  ]
@@ -9966,13 +10016,16 @@
9966
10016
  }
9967
10017
  ],
9968
10018
  "learned_contextual_priorities": [],
10019
+ "explain_associations_details": [
10020
+ null
10021
+ ],
9969
10022
  "query": "drone modifies direction",
9970
10023
  "key": {
9971
10024
  "query": "drone modifies direction"
9972
10025
  }
9973
10026
  },
9974
10027
  {
9975
- "apply": "(args) => {\n expectDirection(args)\n expectDistanceForMove(args)\n\n args.config.addSemantic({\n match: ({context, isA}) => isA(context.marker, 'quantity') && isA(context.unit?.marker, 'unitPerUnit'),\n apply: async ({context, objects, api, gr, fragments, e, say}) => {\n // send a command to the drone\n const instantiation = await fragments(\"quantity in meters per second\", { quantity: context })\n const result = await e(instantiation)\n const desired_speed = result.evalue.amount.evalue.evalue\n objects.runCommand = true\n objects.current.speed = desired_speed\n objects.current.speedUnitsOfUser = context.unit\n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlStart',\n apply: ({context, objects, api}) => {\n objects.runCommand = false \n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlEnd',\n apply: async ({context, objects, api}) => {\n // send a command to the drone\n if (objects.runCommand) {\n await api.sendCommand()\n }\n }\n })\n }"
10028
+ "apply": "(args) => {\n expectDirection(args)\n expectDistanceForMove(args)\n\n args.config.addSemantic({\n match: ({context, isA}) => isA(context.marker, 'quantity') && isA(context.unit?.marker, 'unitPerUnit'),\n apply: async ({context, objects, api, gr, toEValue, fragments, e, say}) => {\n // send a command to the drone\n const instantiation = await fragments(\"quantity in meters per second\", { quantity: context })\n const result = await e(instantiation, where())\n const desired_speed = toEValue(result.evalue.amount)\n objects.runCommand = true\n objects.current.speed = desired_speed\n objects.current.speedUnitsOfUser = context.unit\n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlStart',\n apply: ({context, objects, api}) => {\n objects.runCommand = false \n }\n })\n\n args.config.addSemantic({\n match: ({context, objects, isA}) => objects.current.direction && context.marker == 'controlEnd',\n apply: async ({context, objects, api}) => {\n // send a command to the drone\n if (objects.runCommand) {\n await api.sendCommand()\n }\n }\n })\n }"
9976
10029
  },
9977
10030
  {
9978
10031
  "extraConfig": true,
@@ -10105,6 +10158,7 @@
10105
10158
  },
10106
10159
  {
10107
10160
  "id": "startPath",
10161
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:942",
10108
10162
  "isA": [
10109
10163
  "verb"
10110
10164
  ],
@@ -10203,6 +10257,7 @@
10203
10257
  },
10204
10258
  {
10205
10259
  "id": "patrol",
10260
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:983",
10206
10261
  "isA": [
10207
10262
  "verb",
10208
10263
  "repeatable",
@@ -10227,6 +10282,7 @@
10227
10282
  },
10228
10283
  {
10229
10284
  "id": "lift",
10285
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1068",
10230
10286
  "isA": [
10231
10287
  "verb"
10232
10288
  ],
@@ -10249,6 +10305,7 @@
10249
10305
  },
10250
10306
  {
10251
10307
  "id": "lower",
10308
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1080",
10252
10309
  "isA": [
10253
10310
  "verb"
10254
10311
  ],
@@ -10271,6 +10328,7 @@
10271
10328
  },
10272
10329
  {
10273
10330
  "id": "openDrone",
10331
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1092",
10274
10332
  "isA": [
10275
10333
  "verb"
10276
10334
  ],
@@ -10293,6 +10351,7 @@
10293
10351
  },
10294
10352
  {
10295
10353
  "id": "close",
10354
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1104",
10296
10355
  "isA": [
10297
10356
  "verb"
10298
10357
  ],
@@ -10315,6 +10374,7 @@
10315
10374
  },
10316
10375
  {
10317
10376
  "id": "back",
10377
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1116",
10318
10378
  "isA": [
10319
10379
  "noun"
10320
10380
  ]
@@ -10327,6 +10387,7 @@
10327
10387
  },
10328
10388
  {
10329
10389
  "id": "toPoint",
10390
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1128",
10330
10391
  "isA": [
10331
10392
  "preposition"
10332
10393
  ],
@@ -10355,6 +10416,7 @@
10355
10416
  },
10356
10417
  {
10357
10418
  "id": "go",
10419
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1141",
10358
10420
  "level": 0,
10359
10421
  "isA": [
10360
10422
  "verb",
@@ -10513,6 +10575,7 @@
10513
10575
  },
10514
10576
  {
10515
10577
  "id": "turn",
10578
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1196",
10516
10579
  "isA": [
10517
10580
  "verb",
10518
10581
  "action",
@@ -10551,6 +10614,7 @@
10551
10614
  },
10552
10615
  {
10553
10616
  "id": "pause",
10617
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1255",
10554
10618
  "isA": [
10555
10619
  "verb"
10556
10620
  ],
@@ -10730,6 +10794,7 @@
10730
10794
  },
10731
10795
  {
10732
10796
  "id": "stop",
10797
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1300",
10733
10798
  "isA": [
10734
10799
  "verb"
10735
10800
  ],
@@ -10739,35 +10804,52 @@
10739
10804
  "bridge": "{ ...next(operator), object: after[0], interpolate: [{ context: operator }, { property: 'object' }] }"
10740
10805
  }
10741
10806
  ],
10807
+ "associations": {
10808
+ "positive": [
10809
+ {
10810
+ "context": [
10811
+ [
10812
+ "go",
10813
+ 0
10814
+ ],
10815
+ [
10816
+ "toPoint",
10817
+ 0
10818
+ ]
10819
+ ],
10820
+ "choose": 0
10821
+ }
10822
+ ]
10823
+ },
10742
10824
  "generators": [
10743
10825
  {},
10744
10826
  {}
10745
10827
  ],
10746
10828
  "semantics": [
10747
10829
  {
10748
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1328"
10830
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1331"
10749
10831
  },
10750
10832
  {
10751
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1338"
10833
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1340"
10752
10834
  },
10753
10835
  {
10754
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1365"
10836
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1367"
10755
10837
  },
10756
10838
  {
10757
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1400"
10839
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1402"
10758
10840
  },
10759
10841
  {},
10760
10842
  {
10761
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1438"
10843
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1439"
10762
10844
  },
10763
10845
  {
10764
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1472"
10846
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1473"
10765
10847
  },
10766
10848
  {
10767
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1498"
10849
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1499"
10768
10850
  },
10769
10851
  {
10770
- "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1505"
10852
+ "where": "/home/dev/code/theprogrammablemind/kms/common/drone.js:1506"
10771
10853
  }
10772
10854
  ]
10773
10855
  }
@@ -10855,8 +10937,7 @@
10855
10937
  },
10856
10938
  "level": 1,
10857
10939
  "context_index": 1,
10858
- "topLevel": true,
10859
- "context_id": 2
10940
+ "topLevel": true
10860
10941
  }
10861
10942
  ],
10862
10943
  "generated": [
@@ -10964,6 +11045,9 @@
10964
11045
  }
10965
11046
  ],
10966
11047
  "learned_contextual_priorities": [],
11048
+ "explain_associations_details": [
11049
+ null
11050
+ ],
10967
11051
  "query": "quantity in meters",
10968
11052
  "skipSemantics": true,
10969
11053
  "key": {
@@ -11052,8 +11136,7 @@
11052
11136
  },
11053
11137
  "level": 1,
11054
11138
  "context_index": 1,
11055
- "topLevel": true,
11056
- "context_id": 2
11139
+ "topLevel": true
11057
11140
  }
11058
11141
  ],
11059
11142
  "generated": [
@@ -11161,6 +11244,9 @@
11161
11244
  }
11162
11245
  ],
11163
11246
  "learned_contextual_priorities": [],
11247
+ "explain_associations_details": [
11248
+ null
11249
+ ],
11164
11250
  "query": "quantity in seconds",
11165
11251
  "skipSemantics": true,
11166
11252
  "key": {
@@ -11352,8 +11438,7 @@
11352
11438
  },
11353
11439
  "level": 1,
11354
11440
  "context_index": 1,
11355
- "topLevel": true,
11356
- "context_id": 2
11441
+ "topLevel": true
11357
11442
  }
11358
11443
  ],
11359
11444
  "generated": [
@@ -11571,6 +11656,9 @@
11571
11656
  }
11572
11657
  ],
11573
11658
  "learned_contextual_priorities": [],
11659
+ "explain_associations_details": [
11660
+ null
11661
+ ],
11574
11662
  "query": "quantity in meters per second",
11575
11663
  "skipSemantics": true,
11576
11664
  "key": {
@@ -11657,7 +11745,7 @@
11657
11745
  },
11658
11746
  {
11659
11747
  "op": [
11660
- "amountOfCoordinate",
11748
+ "number",
11661
11749
  0
11662
11750
  ],
11663
11751
  "ops": [
@@ -11671,6 +11759,19 @@
11671
11759
  ]
11672
11760
  ],
11673
11761
  "counter": 4
11762
+ },
11763
+ {
11764
+ "op": [
11765
+ "amountOfCoordinate",
11766
+ 0
11767
+ ],
11768
+ "ops": [
11769
+ [
11770
+ "amountOfCoordinate",
11771
+ 0
11772
+ ]
11773
+ ],
11774
+ "counter": 5
11674
11775
  }
11675
11776
  ]
11676
11777
  },
@@ -11679,6 +11780,10 @@
11679
11780
  {
11680
11781
  "marker": "quantity",
11681
11782
  "dead": true,
11783
+ "instance": true,
11784
+ "rangeableWith": [
11785
+ "quantity"
11786
+ ],
11682
11787
  "unit": {
11683
11788
  "marker": "unitPerUnit",
11684
11789
  "default": true,
@@ -11746,6 +11851,7 @@
11746
11851
  "level": 0
11747
11852
  },
11748
11853
  "amount": {
11854
+ "isInstance": false,
11749
11855
  "marker": "number",
11750
11856
  "value": "number",
11751
11857
  "default": true,
@@ -11755,10 +11861,11 @@
11755
11861
  "start": 0,
11756
11862
  "end": 5
11757
11863
  },
11864
+ "dead": true,
11758
11865
  "types": [
11759
11866
  "number"
11760
11867
  ],
11761
- "level": 0
11868
+ "level": 1
11762
11869
  },
11763
11870
  "interpolate": [
11764
11871
  {
@@ -11775,8 +11882,7 @@
11775
11882
  },
11776
11883
  "level": 1,
11777
11884
  "context_index": 1,
11778
- "topLevel": true,
11779
- "context_id": 2
11885
+ "topLevel": true
11780
11886
  }
11781
11887
  ],
11782
11888
  "generated": [
@@ -11938,22 +12044,50 @@
11938
12044
  "operators": [
11939
12045
  {
11940
12046
  "marker": [
11941
- "quantity",
12047
+ "number",
11942
12048
  1
11943
12049
  ],
11944
12050
  "range": {
11945
12051
  "start": 0,
12052
+ "end": 5
12053
+ }
12054
+ },
12055
+ {
12056
+ "marker": [
12057
+ "unitPerUnit",
12058
+ 0
12059
+ ],
12060
+ "range": {
12061
+ "start": 7,
11946
12062
  "end": 23
11947
12063
  }
11948
12064
  }
11949
12065
  ],
11950
12066
  "counter": 5
12067
+ },
12068
+ {
12069
+ "operators": [
12070
+ {
12071
+ "marker": [
12072
+ "quantity",
12073
+ 1
12074
+ ],
12075
+ "range": {
12076
+ "start": 0,
12077
+ "end": 23
12078
+ }
12079
+ }
12080
+ ],
12081
+ "counter": 6
11951
12082
  }
11952
12083
  ],
11953
12084
  "length": 1
11954
12085
  }
11955
12086
  ],
11956
12087
  "learned_contextual_priorities": [],
12088
+ "explain_associations_details": [
12089
+ null
12090
+ ],
11957
12091
  "query": "number meters per second",
11958
12092
  "skipSemantics": true,
11959
12093
  "key": {
@@ -12041,8 +12175,7 @@
12041
12175
  },
12042
12176
  "level": 1,
12043
12177
  "context_index": 1,
12044
- "topLevel": true,
12045
- "context_id": 2
12178
+ "topLevel": true
12046
12179
  }
12047
12180
  ],
12048
12181
  "generated": [
@@ -12150,6 +12283,9 @@
12150
12283
  }
12151
12284
  ],
12152
12285
  "learned_contextual_priorities": [],
12286
+ "explain_associations_details": [
12287
+ null
12288
+ ],
12153
12289
  "query": "quantity in units",
12154
12290
  "skipSemantics": true,
12155
12291
  "key": {
@@ -12161,7 +12297,7 @@
12161
12297
  "opChoices": [
12162
12298
  {
12163
12299
  "op": [
12164
- "radian",
12300
+ "number",
12165
12301
  0
12166
12302
  ],
12167
12303
  "ops": [
@@ -12182,7 +12318,7 @@
12182
12318
  },
12183
12319
  {
12184
12320
  "op": [
12185
- "amountOfCoordinate",
12321
+ "radian",
12186
12322
  0
12187
12323
  ],
12188
12324
  "ops": [
@@ -12191,11 +12327,24 @@
12191
12327
  0
12192
12328
  ],
12193
12329
  [
12194
- "number",
12330
+ "radian",
12195
12331
  0
12196
12332
  ]
12197
12333
  ],
12198
12334
  "counter": 2
12335
+ },
12336
+ {
12337
+ "op": [
12338
+ "amountOfCoordinate",
12339
+ 0
12340
+ ],
12341
+ "ops": [
12342
+ [
12343
+ "amountOfCoordinate",
12344
+ 0
12345
+ ]
12346
+ ],
12347
+ "counter": 3
12199
12348
  }
12200
12349
  ]
12201
12350
  },
@@ -12204,6 +12353,10 @@
12204
12353
  {
12205
12354
  "marker": "quantity",
12206
12355
  "dead": true,
12356
+ "instance": true,
12357
+ "rangeableWith": [
12358
+ "quantity"
12359
+ ],
12207
12360
  "unit": {
12208
12361
  "value": "radian",
12209
12362
  "number": "many",
@@ -12222,6 +12375,7 @@
12222
12375
  "level": 0
12223
12376
  },
12224
12377
  "amount": {
12378
+ "isInstance": false,
12225
12379
  "marker": "number",
12226
12380
  "value": "number",
12227
12381
  "default": true,
@@ -12231,10 +12385,11 @@
12231
12385
  "start": 0,
12232
12386
  "end": 5
12233
12387
  },
12388
+ "dead": true,
12234
12389
  "types": [
12235
12390
  "number"
12236
12391
  ],
12237
- "level": 0
12392
+ "level": 1
12238
12393
  },
12239
12394
  "interpolate": [
12240
12395
  {
@@ -12251,8 +12406,7 @@
12251
12406
  },
12252
12407
  "level": 1,
12253
12408
  "context_index": 1,
12254
- "topLevel": true,
12255
- "context_id": 2
12409
+ "topLevel": true
12256
12410
  }
12257
12411
  ],
12258
12412
  "generated": [
@@ -12300,7 +12454,7 @@
12300
12454
  {
12301
12455
  "marker": [
12302
12456
  "number",
12303
- 0
12457
+ 1
12304
12458
  ],
12305
12459
  "range": {
12306
12460
  "start": 0,
@@ -12324,22 +12478,50 @@
12324
12478
  "operators": [
12325
12479
  {
12326
12480
  "marker": [
12327
- "quantity",
12481
+ "number",
12328
12482
  1
12329
12483
  ],
12330
12484
  "range": {
12331
12485
  "start": 0,
12486
+ "end": 5
12487
+ }
12488
+ },
12489
+ {
12490
+ "marker": [
12491
+ "radian",
12492
+ 0
12493
+ ],
12494
+ "range": {
12495
+ "start": 7,
12332
12496
  "end": 13
12333
12497
  }
12334
12498
  }
12335
12499
  ],
12336
12500
  "counter": 3
12501
+ },
12502
+ {
12503
+ "operators": [
12504
+ {
12505
+ "marker": [
12506
+ "quantity",
12507
+ 1
12508
+ ],
12509
+ "range": {
12510
+ "start": 0,
12511
+ "end": 13
12512
+ }
12513
+ }
12514
+ ],
12515
+ "counter": 4
12337
12516
  }
12338
12517
  ],
12339
12518
  "length": 1
12340
12519
  }
12341
12520
  ],
12342
12521
  "learned_contextual_priorities": [],
12522
+ "explain_associations_details": [
12523
+ null
12524
+ ],
12343
12525
  "query": "number radians",
12344
12526
  "skipSemantics": true,
12345
12527
  "key": {
@@ -12351,7 +12533,7 @@
12351
12533
  "opChoices": [
12352
12534
  {
12353
12535
  "op": [
12354
- "degree",
12536
+ "integer",
12355
12537
  0
12356
12538
  ],
12357
12539
  "ops": [
@@ -12380,7 +12562,7 @@
12380
12562
  },
12381
12563
  {
12382
12564
  "op": [
12383
- "amountOfCoordinate",
12565
+ "degree",
12384
12566
  0
12385
12567
  ],
12386
12568
  "ops": [
@@ -12389,11 +12571,11 @@
12389
12571
  0
12390
12572
  ],
12391
12573
  [
12392
- "delayTime",
12574
+ "degree",
12393
12575
  0
12394
12576
  ],
12395
12577
  [
12396
- "integer",
12578
+ "delayTime",
12397
12579
  0
12398
12580
  ],
12399
12581
  [
@@ -12403,6 +12585,27 @@
12403
12585
  ],
12404
12586
  "counter": 2
12405
12587
  },
12588
+ {
12589
+ "op": [
12590
+ "amountOfCoordinate",
12591
+ 0
12592
+ ],
12593
+ "ops": [
12594
+ [
12595
+ "amountOfCoordinate",
12596
+ 0
12597
+ ],
12598
+ [
12599
+ "delayTime",
12600
+ 0
12601
+ ],
12602
+ [
12603
+ "radian",
12604
+ 0
12605
+ ]
12606
+ ],
12607
+ "counter": 3
12608
+ },
12406
12609
  {
12407
12610
  "op": [
12408
12611
  "radian",
@@ -12418,7 +12621,7 @@
12418
12621
  0
12419
12622
  ]
12420
12623
  ],
12421
- "counter": 3
12624
+ "counter": 4
12422
12625
  },
12423
12626
  {
12424
12627
  "op": [
@@ -12431,7 +12634,7 @@
12431
12634
  0
12432
12635
  ]
12433
12636
  ],
12434
- "counter": 4
12637
+ "counter": 5
12435
12638
  }
12436
12639
  ]
12437
12640
  },
@@ -12450,6 +12653,10 @@
12450
12653
  "from": {
12451
12654
  "marker": "quantity",
12452
12655
  "dead": true,
12656
+ "instance": true,
12657
+ "rangeableWith": [
12658
+ "quantity"
12659
+ ],
12453
12660
  "unit": {
12454
12661
  "value": "degree",
12455
12662
  "number": "many",
@@ -12468,8 +12675,11 @@
12468
12675
  "level": 0
12469
12676
  },
12470
12677
  "amount": {
12678
+ "isInstance": true,
12471
12679
  "value": 40,
12472
- "instance": true,
12680
+ "rangeableWith": [
12681
+ "number"
12682
+ ],
12473
12683
  "text": "40",
12474
12684
  "marker": "integer",
12475
12685
  "word": "40",
@@ -12477,10 +12687,11 @@
12477
12687
  "start": 0,
12478
12688
  "end": 1
12479
12689
  },
12690
+ "dead": true,
12480
12691
  "types": [
12481
12692
  "integer"
12482
12693
  ],
12483
- "level": 0
12694
+ "level": 1
12484
12695
  },
12485
12696
  "interpolate": [
12486
12697
  {
@@ -12519,8 +12730,7 @@
12519
12730
  },
12520
12731
  "level": 1,
12521
12732
  "context_index": 1,
12522
- "topLevel": true,
12523
- "context_id": 2
12733
+ "topLevel": true
12524
12734
  }
12525
12735
  ],
12526
12736
  "generated": [
@@ -12588,7 +12798,7 @@
12588
12798
  {
12589
12799
  "marker": [
12590
12800
  "integer",
12591
- 0
12801
+ 1
12592
12802
  ],
12593
12803
  "range": {
12594
12804
  "start": 0,
@@ -12632,17 +12842,27 @@
12632
12842
  "operators": [
12633
12843
  {
12634
12844
  "marker": [
12635
- "quantity",
12845
+ "integer",
12636
12846
  1
12637
12847
  ],
12638
12848
  "range": {
12639
12849
  "start": 0,
12850
+ "end": 1
12851
+ }
12852
+ },
12853
+ {
12854
+ "marker": [
12855
+ "degree",
12856
+ 0
12857
+ ],
12858
+ "range": {
12859
+ "start": 3,
12640
12860
  "end": 9
12641
12861
  }
12642
12862
  },
12643
12863
  {
12644
12864
  "marker": [
12645
- "convertToUnits",
12865
+ "delayTime",
12646
12866
  0
12647
12867
  ],
12648
12868
  "range": {
@@ -12702,22 +12922,60 @@
12702
12922
  "operators": [
12703
12923
  {
12704
12924
  "marker": [
12705
- "convertToUnits",
12925
+ "quantity",
12706
12926
  1
12707
12927
  ],
12708
12928
  "range": {
12709
12929
  "start": 0,
12930
+ "end": 9
12931
+ }
12932
+ },
12933
+ {
12934
+ "marker": [
12935
+ "convertToUnits",
12936
+ 0
12937
+ ],
12938
+ "range": {
12939
+ "start": 11,
12940
+ "end": 12
12941
+ }
12942
+ },
12943
+ {
12944
+ "marker": [
12945
+ "radian",
12946
+ 0
12947
+ ],
12948
+ "range": {
12949
+ "start": 14,
12710
12950
  "end": 20
12711
12951
  }
12712
12952
  }
12713
12953
  ],
12714
12954
  "counter": 5
12955
+ },
12956
+ {
12957
+ "operators": [
12958
+ {
12959
+ "marker": [
12960
+ "convertToUnits",
12961
+ 1
12962
+ ],
12963
+ "range": {
12964
+ "start": 0,
12965
+ "end": 20
12966
+ }
12967
+ }
12968
+ ],
12969
+ "counter": 6
12715
12970
  }
12716
12971
  ],
12717
12972
  "length": 1
12718
12973
  }
12719
12974
  ],
12720
12975
  "learned_contextual_priorities": [],
12976
+ "explain_associations_details": [
12977
+ null
12978
+ ],
12721
12979
  "query": "40 degrees in radians",
12722
12980
  "skipSemantics": true,
12723
12981
  "key": {
@@ -12757,8 +13015,7 @@
12757
13015
  "dead": true,
12758
13016
  "level": 0,
12759
13017
  "context_index": 1,
12760
- "topLevel": true,
12761
- "context_id": 2
13018
+ "topLevel": true
12762
13019
  }
12763
13020
  ],
12764
13021
  "generated": [
@@ -12811,6 +13068,9 @@
12811
13068
  }
12812
13069
  ],
12813
13070
  "learned_contextual_priorities": [],
13071
+ "explain_associations_details": [
13072
+ null
13073
+ ],
12814
13074
  "query": "path",
12815
13075
  "skipSemantics": true,
12816
13076
  "key": {
@@ -12850,8 +13110,7 @@
12850
13110
  "dead": true,
12851
13111
  "level": 0,
12852
13112
  "context_index": 1,
12853
- "topLevel": true,
12854
- "context_id": 2
13113
+ "topLevel": true
12855
13114
  }
12856
13115
  ],
12857
13116
  "generated": [
@@ -12904,6 +13163,9 @@
12904
13163
  }
12905
13164
  ],
12906
13165
  "learned_contextual_priorities": [],
13166
+ "explain_associations_details": [
13167
+ null
13168
+ ],
12907
13169
  "query": "forward",
12908
13170
  "skipSemantics": true,
12909
13171
  "key": {
@@ -18920,16 +19182,41 @@
18920
19182
  "operators": [
18921
19183
  {
18922
19184
  "marker": [
18923
- "quantity",
19185
+ "number",
18924
19186
  1
18925
19187
  ],
18926
19188
  "range": {
18927
19189
  "start": 0,
19190
+ "end": 5
19191
+ }
19192
+ },
19193
+ {
19194
+ "marker": [
19195
+ "unitPerUnit",
19196
+ 0
19197
+ ],
19198
+ "range": {
19199
+ "start": 7,
18928
19200
  "end": 23
18929
19201
  }
18930
19202
  }
18931
19203
  ],
18932
19204
  "counter": 5
19205
+ },
19206
+ {
19207
+ "operators": [
19208
+ {
19209
+ "marker": [
19210
+ "quantity",
19211
+ 1
19212
+ ],
19213
+ "range": {
19214
+ "start": 0,
19215
+ "end": 23
19216
+ }
19217
+ }
19218
+ ],
19219
+ "counter": 6
18933
19220
  }
18934
19221
  ],
18935
19222
  "length": 1
@@ -19056,7 +19343,7 @@
19056
19343
  {
19057
19344
  "marker": [
19058
19345
  "number",
19059
- 0
19346
+ 1
19060
19347
  ],
19061
19348
  "range": {
19062
19349
  "start": 0,
@@ -19080,16 +19367,41 @@
19080
19367
  "operators": [
19081
19368
  {
19082
19369
  "marker": [
19083
- "quantity",
19370
+ "number",
19084
19371
  1
19085
19372
  ],
19086
19373
  "range": {
19087
19374
  "start": 0,
19375
+ "end": 5
19376
+ }
19377
+ },
19378
+ {
19379
+ "marker": [
19380
+ "radian",
19381
+ 0
19382
+ ],
19383
+ "range": {
19384
+ "start": 7,
19088
19385
  "end": 13
19089
19386
  }
19090
19387
  }
19091
19388
  ],
19092
19389
  "counter": 3
19390
+ },
19391
+ {
19392
+ "operators": [
19393
+ {
19394
+ "marker": [
19395
+ "quantity",
19396
+ 1
19397
+ ],
19398
+ "range": {
19399
+ "start": 0,
19400
+ "end": 13
19401
+ }
19402
+ }
19403
+ ],
19404
+ "counter": 4
19093
19405
  }
19094
19406
  ],
19095
19407
  "length": 1
@@ -19146,7 +19458,7 @@
19146
19458
  {
19147
19459
  "marker": [
19148
19460
  "integer",
19149
- 0
19461
+ 1
19150
19462
  ],
19151
19463
  "range": {
19152
19464
  "start": 0,
@@ -19190,17 +19502,27 @@
19190
19502
  "operators": [
19191
19503
  {
19192
19504
  "marker": [
19193
- "quantity",
19505
+ "integer",
19194
19506
  1
19195
19507
  ],
19196
19508
  "range": {
19197
19509
  "start": 0,
19510
+ "end": 1
19511
+ }
19512
+ },
19513
+ {
19514
+ "marker": [
19515
+ "degree",
19516
+ 0
19517
+ ],
19518
+ "range": {
19519
+ "start": 3,
19198
19520
  "end": 9
19199
19521
  }
19200
19522
  },
19201
19523
  {
19202
19524
  "marker": [
19203
- "convertToUnits",
19525
+ "delayTime",
19204
19526
  0
19205
19527
  ],
19206
19528
  "range": {
@@ -19260,16 +19582,51 @@
19260
19582
  "operators": [
19261
19583
  {
19262
19584
  "marker": [
19263
- "convertToUnits",
19585
+ "quantity",
19264
19586
  1
19265
19587
  ],
19266
19588
  "range": {
19267
19589
  "start": 0,
19590
+ "end": 9
19591
+ }
19592
+ },
19593
+ {
19594
+ "marker": [
19595
+ "convertToUnits",
19596
+ 0
19597
+ ],
19598
+ "range": {
19599
+ "start": 11,
19600
+ "end": 12
19601
+ }
19602
+ },
19603
+ {
19604
+ "marker": [
19605
+ "radian",
19606
+ 0
19607
+ ],
19608
+ "range": {
19609
+ "start": 14,
19268
19610
  "end": 20
19269
19611
  }
19270
19612
  }
19271
19613
  ],
19272
19614
  "counter": 5
19615
+ },
19616
+ {
19617
+ "operators": [
19618
+ {
19619
+ "marker": [
19620
+ "convertToUnits",
19621
+ 1
19622
+ ],
19623
+ "range": {
19624
+ "start": 0,
19625
+ "end": 20
19626
+ }
19627
+ }
19628
+ ],
19629
+ "counter": 6
19273
19630
  }
19274
19631
  ],
19275
19632
  "length": 1