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
package/common/meta.js CHANGED
@@ -1,4 +1,4 @@
1
- const { knowledgeModule, ensureTestFile, where, unflatten, flattens } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, ensureTestFile, where, unflatten, flattens, debug } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const _ = require('lodash')
4
4
  const gdefaults = require('./gdefaults.js')
@@ -78,7 +78,7 @@ const config = {
78
78
  id: 'synonymOfWord',
79
79
  operator: "((synonym/*) [synonymOfWord|of] (word))",
80
80
  bridge: "{ ...next(operator), word: after[0] }",
81
- evaluator: ({context}) => {
81
+ semantic: ({context}) => {
82
82
  }
83
83
  },
84
84
  */
@@ -192,10 +192,10 @@ const config = {
192
192
  {
193
193
  where: where(),
194
194
  match: ({context}) => context.marker == 'orList',
195
- apply: async ({context, s}) => {
195
+ apply: async ({context, e}) => {
196
196
  const response = []
197
197
  for (const value of context.value) {
198
- response.push(await s(value))
198
+ response.push(await e(value, where()))
199
199
  }
200
200
  context.evalue = {
201
201
  marker: 'orList',
@@ -219,7 +219,7 @@ const config = {
219
219
  function invertMappings(mappings) {
220
220
  return mappings.map( ({ from, to }) => { return { to: from, from: to } } )
221
221
  }
222
- return async ({context, s, config}) => {
222
+ return async ({context, e, config}) => {
223
223
  DEFINITIONs = _.cloneDeep(DEFINITIONs)
224
224
  //const mappings = mappingss[0]
225
225
  let toPrimes = []
@@ -229,7 +229,7 @@ const config = {
229
229
  }
230
230
  // next move add debug arg to s and g
231
231
  TO.query = true
232
- toPrimes.push([await s(TO), mappings])
232
+ toPrimes.push([await e(TO, where()), mappings])
233
233
  }
234
234
 
235
235
  let hasResponse = false
@@ -323,12 +323,12 @@ const config = {
323
323
  return ({context}) => context.evalue == defContext.from.value && !context.query && !context.objects
324
324
  }
325
325
  function apply(mappings, TO) {
326
- return async ({context, s}) => {
326
+ return async ({context, e}) => {
327
327
  TO = _.cloneDeep(TO)
328
328
  for (const { from, to } of mappings) {
329
329
  hashIndexesSet(TO, to, hashIndexesGet(context, from))
330
330
  }
331
- toPrime = await s(TO)
331
+ toPrime = await e(TO, where())
332
332
  context.result = toPrime.result
333
333
  }
334
334
  }
@@ -349,14 +349,15 @@ const config = {
349
349
 
350
350
  // setup the read semantic
351
351
  {
352
+ // TODO change this disable to callOnce
352
353
  function matchByMarker(defContext) {
353
- return ({context, uuid}) => context.marker == defContext.from.marker && (context.query || context.evaluate) && !context[`disable${uuid}`]
354
+ return ({context, uuid}) => context.marker == defContext.from.marker && !context[`disable${uuid}`]
354
355
  }
355
356
  function matchByValue(defContext) {
356
- return ({context, uuid}) => context.value == defContext.from.value && (context.query || context.evaluate) && !context[`disable${uuid}`]
357
+ return ({context, uuid, stack}) => context.value == defContext.from.value && !context[`disable${uuid}`]
357
358
  }
358
359
  function apply(mappings, TO) {
359
- return async ({uuid, context, s, g, config}) => {
360
+ return async ({uuid, context, e, g, config}) => {
360
361
  TO = _.cloneDeep(TO)
361
362
  for (const { from, to } of mappings) {
362
363
  hashIndexesSet(TO, to, hashIndexesGet(context, from))
@@ -366,10 +367,10 @@ const config = {
366
367
  if (context.query) {
367
368
  TO.query = context.query
368
369
  } else {
369
- TO.evaluate = context.evaluate
370
+ TO.metaDefinition = true
370
371
  }
371
372
  TO[`disable${uuid}`] = true
372
- toPrime = await s(TO)
373
+ toPrime = await e(TO, where())
373
374
  if (context.query) {
374
375
  if (toPrime.evalue) {
375
376
  context.evalue = toPrime.evalue
@@ -19,7 +19,7 @@ class API {
19
19
  context.namespaced.nameable ??= {}
20
20
  context.namespaced.nameable.names ??= []
21
21
  context.namespaced.nameable.names.push(name)
22
- this.args.config.addWord(name, { id: context.marker, initial: `{ value: "${name}", pullFromContext: true, nameable_named: true, instance: ${context.instance ? 'true' : 'false'} }` })
22
+ this.args.config.addWord(name, { id: context.marker, initial: `{ value: "${name}", pullFromContext: true, nameable_named: true, isInstance: ${context.isInstance ? 'true' : 'false'} }` })
23
23
  }
24
24
 
25
25
  // used by mongo km
@@ -88,11 +88,12 @@ const config = {
88
88
  },
89
89
  {
90
90
  id: 'getNamesByType',
91
+ where: where(),
91
92
  scope: "testing",
92
93
  isA: ['verb'],
93
94
  bridge: "{ ...next(operator), type: after[0] }",
94
95
  semantic: async ({context, api}) => {
95
- context.response = api.getNamesByType(context.type.value).join(" ")
96
+ context.evalue = api.getNamesByType(context.type.value).join(" ")
96
97
  context.isResponse = true
97
98
  }
98
99
  },
@@ -113,6 +114,7 @@ const config = {
113
114
  },
114
115
  {
115
116
  id: 'call',
117
+ where: where(),
116
118
  isA: ['verb'],
117
119
  words: englishHelpers.conjugateVerb('call'),
118
120
  bridge: `{
@@ -124,7 +126,7 @@ const config = {
124
126
  `,
125
127
  // generatorp: async ({context, g, gs}) => `call ${await g(context.nameable)} ${await gs(context.name)}`,
126
128
  semantic: async ({config, context, api, e, verbatim, g}) => {
127
- const nameable = (await e(context.nameable))?.evalue
129
+ const nameable = (await e(context.nameable, where()))?.evalue
128
130
  if (!nameable) {
129
131
  verbatim(`${await g(context.nameable)} is not known`)
130
132
  return
@@ -156,7 +158,7 @@ const config = {
156
158
  semantics: [
157
159
  {
158
160
  where: where(),
159
- match: ({context}) => context.marker == 'mentions' && context.evaluate && context.args?.context?.nameable_named,
161
+ match: ({context}) => context.marker == 'mentions' && context.args?.context?.nameable_named,
160
162
  apply: async ({callId, _continue, toList, context, kms, e, log, retry}) => {
161
163
  context.args.condition ??= () => true
162
164
  const oldCondition = context.args.condition
@@ -188,7 +190,9 @@ knowledgeModule( {
188
190
  context: [
189
191
  defaultContextCheck({ extra: ['pullFromContext'] }),
190
192
  ],
191
- objects: ['mentioned', { km: 'stm' }],
193
+ objects: [
194
+ { km: 'stm' }
195
+ ],
192
196
  },
193
197
  include: {
194
198
  words: [ "peter james chunkington", "banana" ],
@@ -23,8 +23,11 @@
23
23
  "trace": "undefined",
24
24
  "contexts": [
25
25
  {
26
- "instance": true,
26
+ "isInstance": true,
27
27
  "value": 10.2345,
28
+ "rangeableWith": [
29
+ "number"
30
+ ],
28
31
  "text": "10.2345",
29
32
  "marker": "number",
30
33
  "word": "10.2345",
@@ -35,8 +38,7 @@
35
38
  "dead": true,
36
39
  "level": 1,
37
40
  "context_index": 1,
38
- "topLevel": true,
39
- "context_id": 2
41
+ "topLevel": true
40
42
  }
41
43
  ],
42
44
  "generated": [
@@ -89,6 +91,9 @@
89
91
  }
90
92
  ],
91
93
  "learned_contextual_priorities": [],
94
+ "explain_associations_details": [
95
+ null
96
+ ],
92
97
  "query": "10.2345",
93
98
  "skipSemantics": true,
94
99
  "key": {
package/common/numbers.js CHANGED
@@ -4,6 +4,7 @@ const numbers_tests = require('./numbers.test.json')
4
4
  const instance = require('./numbers.instance.json')
5
5
  const gdefaults = require('./gdefaults')
6
6
  const sdefaults = require('./sdefaults')
7
+ const linear_orderings = require('./linear_orderings')
7
8
 
8
9
  /*
9
10
  TODO
@@ -20,61 +21,57 @@ const config = {
20
21
  "([integer])",
21
22
  ],
22
23
  bridges: [
23
- /*
24
- {
25
- id: "testNumber",
26
- scope: 'testing',
27
- },
28
- */
29
24
  {
30
25
  id: "number",
31
- bridge: "{ instance: false, ...next(operator) }"
26
+ bridge: "{ isInstance: false, ...next(operator) }",
27
+ isA: ['linearlyOrdered'],
32
28
  },
33
29
  {
34
30
  id: "integer",
35
31
  isA: ['number'],
36
- bridge: "{ instance: false, ...next(operator) }"
32
+ initial: { rangeableWith: ['number'] },
33
+ bridge: "{ isInstance: false, ...next(operator) }"
37
34
  },
38
35
  ],
39
36
  words: {
40
37
  "literals": {
41
- "one": [{"id": "integer", "initial": "{ value: 1, instance: true }" }],
42
- "ones": [{"id": "integer", "initial": "{ value: 1, integer: 'many', instance: true }" }],
43
- "two": [{"id": "integer", "initial": "{ value: 2 , instance: true}" }],
44
- "twos": [{"id": "integer", "initial": "{ value: 2 , integer: 'many', instance: true}" }],
45
- "three": [{"id": "integer", "initial": "{ value: 3, instance: true }" }],
46
- "threes": [{"id": "integer", "initial": "{ value: 3, integer: 'many', instance: true }" }],
47
- "four": [{"id": "integer", "initial": "{ value: 4, instance: true }" }],
48
- "fours": [{"id": "integer", "initial": "{ value: 4, integer: 'many', instance: true }" }],
49
- "five": [{"id": "integer", "initial": "{ value: 5, instance: true }" }],
50
- "fives": [{"id": "integer", "initial": "{ value: 5, integer: 'many', instance: true }" }],
51
- "six": [{"id": "integer", "initial": "{ value: 6, instance: true }" }],
52
- "sixes": [{"id": "integer", "initial": "{ value: 6, integer: 'many', instance: true }" }],
53
- "seven": [{"id": "integer", "initial": "{ value: 7, instance: true }" }],
54
- "sevens": [{"id": "integer", "initial": "{ value: 7, integer: 'many', instance: true }" }],
55
- "eight": [{"id": "integer", "initial": "{ value: 8, instance: true }" }],
56
- "eights": [{"id": "integer", "initial": "{ value: 8, integer: 'many', instance: true }" }],
57
- "nine": [{"id": "integer", "initial": "{ value: 9, instance: true }" }],
58
- "nines": [{"id": "integer", "initial": "{ value: 9, integer: 'many', instance: true }" }],
59
- "ten": [{"id": "integer", "initial": "{ value: 10, instance: true }" }],
60
- "tens": [{"id": "integer", "initial": "{ value: 10, integer: 'many', instance: true }" }],
61
- "pi": [{"id": "integer", "initial": { value: 3.1415926, integer: 'many', instance: true } }],
38
+ "one": [{"id": "integer", "initial": "{ value: 1, isInstance: true, rangeableWith: ['number'] }" }],
39
+ "ones": [{"id": "integer", "initial": "{ value: 1, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
40
+ "two": [{"id": "integer", "initial": "{ value: 2 , isInstance: true, rangeableWith: ['number'] }" }],
41
+ "twos": [{"id": "integer", "initial": "{ value: 2 , integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
42
+ "three": [{"id": "integer", "initial": "{ value: 3, isInstance: true, rangeableWith: ['number'] }" }],
43
+ "threes": [{"id": "integer", "initial": "{ value: 3, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
44
+ "four": [{"id": "integer", "initial": "{ value: 4, isInstance: true, rangeableWith: ['number'] }" }],
45
+ "fours": [{"id": "integer", "initial": "{ value: 4, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
46
+ "five": [{"id": "integer", "initial": "{ value: 5, isInstance: true, rangeableWith: ['number'] }" }],
47
+ "fives": [{"id": "integer", "initial": "{ value: 5, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
48
+ "six": [{"id": "integer", "initial": "{ value: 6, isInstance: true, rangeableWith: ['number'] }" }],
49
+ "sixes": [{"id": "integer", "initial": "{ value: 6, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
50
+ "seven": [{"id": "integer", "initial": "{ value: 7, isInstance: true, rangeableWith: ['number'] }" }],
51
+ "sevens": [{"id": "integer", "initial": "{ value: 7, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
52
+ "eight": [{"id": "integer", "initial": "{ value: 8, isInstance: true, rangeableWith: ['number'] }" }],
53
+ "eights": [{"id": "integer", "initial": "{ value: 8, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
54
+ "nine": [{"id": "integer", "initial": "{ value: 9, isInstance: true, rangeableWith: ['number'] }" }],
55
+ "nines": [{"id": "integer", "initial": "{ value: 9, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
56
+ "ten": [{"id": "integer", "initial": "{ value: 10, isInstance: true, rangeableWith: ['number'] }" }],
57
+ "tens": [{"id": "integer", "initial": "{ value: 10, integer: 'many', isInstance: true, rangeableWith: ['number'] }" }],
58
+ "pi": [{"id": "integer", "initial": { value: 3.1415926, integer: 'many', isInstance: true, rangeableWith: ['number'] } }],
62
59
  },
63
60
  patterns: [
64
61
  {
65
62
  pattern: [{ type: 'digit' }, { repeat: true }],
66
63
  allow_partial_matches: false,
67
- defs: [{id: "integer", uuid: '1', initial: "{ value: int(text), instance: true }" }]
64
+ defs: [{id: "integer", uuid: '1', initial: "{ value: int(text), isInstance: true, rangeableWith: ['number'] }" }]
68
65
  },
69
66
  {
70
67
  pattern: [{ type: 'digit' }, { repeat: true }, '.', { type: 'digit' }, { repeat: true }],
71
68
  allow_partial_matches: false,
72
- defs: [{id: "number", uuid: '1', initial: "{ value: float(text), instance: true }" }]
69
+ defs: [{id: "number", uuid: '1', initial: "{ value: float(text), isInstance: true, rangeableWith: ['number'] }" }]
73
70
  },
74
71
  {
75
72
  pattern: ['.', { type: 'digit' }, { repeat: true }],
76
73
  allow_partial_matches: false,
77
- defs: [{id: "number", uuid: '1', initial: "{ value: float(text), instance: true }" }]
74
+ defs: [{id: "number", uuid: '1', initial: "{ value: float(text), isInstance: true, rangeableWith: ['number'] }" }]
78
75
  },
79
76
  ],
80
77
  },
@@ -114,6 +111,33 @@ const config = {
114
111
  ],
115
112
 
116
113
  semantics: [
114
+ {
115
+ where: where(),
116
+ match: ({context, callId, isA, toFinalValue}) => {
117
+ const left = toFinalValue(context.left)
118
+ const right = toFinalValue(context.right)
119
+ return context.marker == 'linearlyOrderedCompare' && isA(context.left, ['number', 'mathematicalExpression']) && isA(context.right, ['number', 'mathematicalExpression'])
120
+ },
121
+ apply: ({context, callId, toFinalValue, resolveEvaluate}) => {
122
+ const { left, right } = context
123
+ const l = toFinalValue(left)
124
+ const r = toFinalValue(right)
125
+ if (l == r) {
126
+ resolveEvaluate(context, '==')
127
+ } else if (l < r) {
128
+ resolveEvaluate(context, '<')
129
+ } else if (r > l) {
130
+ resolveEvaluate(context, '>')
131
+ }
132
+ }
133
+ },
134
+ {
135
+ where: where(),
136
+ match: ({context, debug, isA}) => context.marker == 'unify' && context.terms.every((term) => term.isInstance && isA(term, 'number')),
137
+ apply: ({context, resolveEvaluate}) => {
138
+ resolveEvaluate(context, context.terms[0].value == context.terms[1].value)
139
+ }
140
+ },
117
141
  ],
118
142
  };
119
143
 
@@ -125,7 +149,7 @@ const template = {
125
149
 
126
150
  knowledgeModule( {
127
151
  config,
128
- includes: [gdefaults, sdefaults],
152
+ includes: [linear_orderings, gdefaults, sdefaults],
129
153
 
130
154
  instance,
131
155
  template,
@@ -137,8 +161,8 @@ knowledgeModule( {
137
161
  contents: numbers_tests,
138
162
  checks: {
139
163
  context: [
140
- defaultContextCheck({ marker: 'number', exported: true, extra: ['instance'] }),
141
- defaultContextCheck({ match: ({isA, context}) => isA(context.marker, 'integer'), exported: true, extra: ['instance'] }),
164
+ defaultContextCheck({ marker: 'number', exported: true, extra: ['isInstance'] }),
165
+ defaultContextCheck({ match: ({isA, context}) => isA(context.marker, 'integer'), exported: true, extra: ['isInstance'] }),
142
166
  defaultContextCheck()
143
167
  ],
144
168
  }
@@ -203,8 +203,7 @@
203
203
  "types": [
204
204
  "unknown"
205
205
  ],
206
- "level": 0,
207
- "evaluate": false
206
+ "level": 0
208
207
  },
209
208
  "two": {
210
209
  "marker": "xfx",
@@ -288,7 +287,6 @@
288
287
  "level": 2,
289
288
  "context_index": 1,
290
289
  "topLevel": true,
291
- "context_id": 2,
292
290
  "touchedBy": [
293
291
  "ordering#call2"
294
292
  ]
@@ -779,6 +777,9 @@
779
777
  }
780
778
  ],
781
779
  "learned_contextual_priorities": [],
780
+ "explain_associations_details": [
781
+ null
782
+ ],
782
783
  "query": "wants is xfx between wanter and wantee",
783
784
  "key": {
784
785
  "query": "wants is xfx between wanter and wantee"
@@ -1361,6 +1362,23 @@
1361
1362
  ],
1362
1363
  "level": 0
1363
1364
  },
1365
+ "relationBacked": false,
1366
+ "orderingArgs": {
1367
+ "name": "preference",
1368
+ "marker": "like",
1369
+ "object": "liker",
1370
+ "category": "likee"
1371
+ },
1372
+ "relationArgs": [
1373
+ {
1374
+ "tag": "liker",
1375
+ "id": "object"
1376
+ },
1377
+ {
1378
+ "tag": "likee",
1379
+ "id": "object"
1380
+ }
1381
+ ],
1364
1382
  "operator": {
1365
1383
  "value": "like",
1366
1384
  "isVerb": true,
@@ -1449,6 +1467,23 @@
1449
1467
  ],
1450
1468
  "level": 0
1451
1469
  },
1470
+ "relationBacked": false,
1471
+ "orderingArgs": {
1472
+ "name": "preference",
1473
+ "marker": "love",
1474
+ "object": "lover",
1475
+ "category": "lovee"
1476
+ },
1477
+ "relationArgs": [
1478
+ {
1479
+ "tag": "lover",
1480
+ "id": "object"
1481
+ },
1482
+ {
1483
+ "tag": "lovee",
1484
+ "id": "object"
1485
+ }
1486
+ ],
1452
1487
  "operator": {
1453
1488
  "value": "love",
1454
1489
  "isVerb": true,
@@ -1542,6 +1577,18 @@
1542
1577
  ],
1543
1578
  "level": 0
1544
1579
  },
1580
+ "relationBacked": false,
1581
+ "orderingArgs": {},
1582
+ "relationArgs": [
1583
+ {
1584
+ "tag": "wanter",
1585
+ "id": "object"
1586
+ },
1587
+ {
1588
+ "tag": "wantee",
1589
+ "id": "object"
1590
+ }
1591
+ ],
1545
1592
  "operator": {
1546
1593
  "value": "want",
1547
1594
  "text": "wants",
@@ -1585,7 +1632,6 @@
1585
1632
  "level": 1,
1586
1633
  "context_index": 1,
1587
1634
  "topLevel": true,
1588
- "context_id": 2,
1589
1635
  "touchedBy": [
1590
1636
  "ordering#call2"
1591
1637
  ]
@@ -2946,6 +2992,9 @@
2946
2992
  }
2947
2993
  ],
2948
2994
  "learned_contextual_priorities": [],
2995
+ "explain_associations_details": [
2996
+ null
2997
+ ],
2949
2998
  "query": "if x likes y or x loves y then x wants y",
2950
2999
  "key": {
2951
3000
  "query": "if x likes y or x loves y then x wants y"
@@ -16,7 +16,7 @@ const config = {
16
16
  {
17
17
  id: "ordinal",
18
18
  isA: ["listable"],
19
- bridge: "{ instance: false, ordinal: true, ...next(operator) }",
19
+ bridge: "{ isInstance: false, ordinal: true, ...next(operator) }",
20
20
  initial: { 'notConjunctableWith':['quantity', 'number'] },
21
21
  },
22
22
  {
@@ -41,7 +41,7 @@ const config = {
41
41
  semantics: [
42
42
  {
43
43
  where: where(),
44
- match: ({context}) => context.marker == 'mentions' && context.evaluate && context.args?.context?.ordinal,
44
+ match: ({context}) => context.marker == 'mentions' && context.args?.context?.ordinal,
45
45
  apply: async ({callId, _continue, toList, context, kms, e, log, toArray, retry}) => {
46
46
  // const ordinals = toArray(context.args?.context?.ordinal)
47
47
  const lastNotFirst = context.args?.context?.ordinal.value < 0
@@ -87,31 +87,31 @@ const config = {
87
87
  ],
88
88
  words: {
89
89
  "literals": {
90
- "first": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, instance: true }" }],
91
- "last": [{"id": "ordinal", "initial": "{ value: -1, ordinal: true, instance: true }" }],
92
- "1st": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, instance: true }" }],
93
- "second": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, instance: true }" }],
94
- "2nd": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, instance: true }" }],
95
- "third": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, instance: true }" }],
96
- "3rd": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, instance: true }" }],
97
- "fourth": [{"id": "ordinal", "initial": "{ value: 4, ordinal: true, instance: true }" }],
98
- "4rd": [{"id": "ordinal", "initial": "{ value: 4, ordinal: true, instance: true }" }],
99
- "fifth": [{"id": "ordinal", "initial": "{ value: 5, ordinal: true, instance: true }" }],
100
- "5th": [{"id": "ordinal", "initial": "{ value: 5, ordinal: true, instance: true }" }],
101
- "sixth": [{"id": "ordinal", "initial": "{ value: 6, ordinal: true, instance: true }" }],
102
- "6th": [{"id": "ordinal", "initial": "{ value: 6, ordinal: true, instance: true }" }],
103
- "seventh": [{"id": "ordinal", "initial": "{ value: 7, ordinal: true, instance: true }" }],
104
- "7th": [{"id": "ordinal", "initial": "{ value: 7, ordinal: true, instance: true }" }],
105
- "eigth": [{"id": "ordinal", "initial": "{ value: 8, ordinal: true, instance: true }" }],
106
- "8th": [{"id": "ordinal", "initial": "{ value: 8, ordinal: true, instance: true }" }],
107
- "ninth": [{"id": "ordinal", "initial": "{ value: 9, ordinal: true, instance: true }" }],
108
- "9th": [{"id": "ordinal", "initial": "{ value: 9, ordinal: true, instance: true }" }],
90
+ "first": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, isInstance: true }" }],
91
+ "last": [{"id": "ordinal", "initial": "{ value: -1, ordinal: true, isInstance: true }" }],
92
+ "1st": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, isInstance: true }" }],
93
+ "second": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, isInstance: true }" }],
94
+ "2nd": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, isInstance: true }" }],
95
+ "third": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, isInstance: true }" }],
96
+ "3rd": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, isInstance: true }" }],
97
+ "fourth": [{"id": "ordinal", "initial": "{ value: 4, ordinal: true, isInstance: true }" }],
98
+ "4rd": [{"id": "ordinal", "initial": "{ value: 4, ordinal: true, isInstance: true }" }],
99
+ "fifth": [{"id": "ordinal", "initial": "{ value: 5, ordinal: true, isInstance: true }" }],
100
+ "5th": [{"id": "ordinal", "initial": "{ value: 5, ordinal: true, isInstance: true }" }],
101
+ "sixth": [{"id": "ordinal", "initial": "{ value: 6, ordinal: true, isInstance: true }" }],
102
+ "6th": [{"id": "ordinal", "initial": "{ value: 6, ordinal: true, isInstance: true }" }],
103
+ "seventh": [{"id": "ordinal", "initial": "{ value: 7, ordinal: true, isInstance: true }" }],
104
+ "7th": [{"id": "ordinal", "initial": "{ value: 7, ordinal: true, isInstance: true }" }],
105
+ "eigth": [{"id": "ordinal", "initial": "{ value: 8, ordinal: true, isInstance: true }" }],
106
+ "8th": [{"id": "ordinal", "initial": "{ value: 8, ordinal: true, isInstance: true }" }],
107
+ "ninth": [{"id": "ordinal", "initial": "{ value: 9, ordinal: true, isInstance: true }" }],
108
+ "9th": [{"id": "ordinal", "initial": "{ value: 9, ordinal: true, isInstance: true }" }],
109
109
  },
110
110
  patterns: [
111
- { "pattern": [{ type: 'digit' }, { repeat: true }, 'th'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
112
- { "pattern": [{ type: 'digit' }, { repeat: true }, '1st'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
113
- { "pattern": [{ type: 'digit' }, { repeat: true }, '2nd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
114
- { "pattern": [{ type: 'digit' }, { repeat: true }, '3rd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
111
+ { "pattern": [{ type: 'digit' }, { repeat: true }, 'th'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, isInstance: true }" }]},
112
+ { "pattern": [{ type: 'digit' }, { repeat: true }, '1st'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, isInstance: true }" }]},
113
+ { "pattern": [{ type: 'digit' }, { repeat: true }, '2nd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, isInstance: true }" }]},
114
+ { "pattern": [{ type: 'digit' }, { repeat: true }, '3rd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, isInstance: true }" }]},
115
115
  ],
116
116
  },
117
117
  };