tpmkms_4wp 8.0.0-beta.4 → 8.0.0-beta.41

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 (98) hide show
  1. package/common/animals.instance.json +2855 -1363
  2. package/common/animals.js +2 -2
  3. package/common/articles.js +108 -0
  4. package/common/articles.test.json +310 -0
  5. package/common/avatar.js +2 -2
  6. package/common/characters.js +9 -11
  7. package/common/colors.instance.json +6980 -3523
  8. package/common/colors.js +2 -2
  9. package/common/colors.test.json +345 -780
  10. package/common/comparable.js +2 -15
  11. package/common/concept.js +17 -11
  12. package/common/countable.js +5 -5
  13. package/common/crew.instance.json +13032 -6570
  14. package/common/crew.js +4 -4
  15. package/common/crew.test.json +714 -452
  16. package/common/currency.js +7 -7
  17. package/common/dialogues.js +117 -238
  18. package/common/dimension.instance.json +265 -264
  19. package/common/dimension.js +13 -13
  20. package/common/dimension.test.json +446 -1640
  21. package/common/edible.instance.json +19910 -9988
  22. package/common/edible.js +2 -2
  23. package/common/emotions.instance.json +146 -128
  24. package/common/emotions.js +4 -4
  25. package/common/evaluate.instance.json +2 -0
  26. package/common/evaluate.js +55 -0
  27. package/common/evaluate.test.json +574 -0
  28. package/common/events.js +6 -6
  29. package/common/fastfood.instance.json +221110 -111293
  30. package/common/fastfood.js +25 -25
  31. package/common/formulas.instance.json +241 -255
  32. package/common/formulas.js +14 -14
  33. package/common/gdefaults.js +19 -19
  34. package/common/help.js +4 -4
  35. package/common/help.test.json +22 -22
  36. package/common/helpers/concept.js +9 -6
  37. package/common/helpers/dialogues.js +2 -3
  38. package/common/helpers/properties.js +48 -58
  39. package/common/helpers.js +1 -1
  40. package/common/hierarchy.js +12 -16
  41. package/common/javascript.js +8 -8
  42. package/common/kirk.instance.json +583 -289
  43. package/common/kirk.js +2 -2
  44. package/common/length.instance.json +5530 -4754
  45. package/common/length.js +2 -2
  46. package/common/listener.js +54 -0
  47. package/common/listener.test.json +104 -0
  48. package/common/math.instance.json +176 -1168
  49. package/common/math.js +11 -11
  50. package/common/meta.js +22 -29
  51. package/common/nameable.instance.json +2 -0
  52. package/common/nameable.js +142 -0
  53. package/common/nameable.test.json +2121 -0
  54. package/common/negation.instance.json +2 -0
  55. package/common/negation.js +38 -0
  56. package/common/negation.test.json +308 -0
  57. package/common/numbers.js +3 -3
  58. package/common/ordering.instance.json +340 -228
  59. package/common/ordering.js +5 -5
  60. package/common/people.instance.json +2066 -1014
  61. package/common/people.js +4 -5
  62. package/common/percentages.instance.json +2 -0
  63. package/common/percentages.js +57 -0
  64. package/common/percentages.test.json +751 -0
  65. package/common/pipboy.instance.json +7974 -6300
  66. package/common/pipboy.js +29 -32
  67. package/common/pokemon.instance.json +4207 -2069
  68. package/common/pokemon.js +4 -4
  69. package/common/pos.js +1 -1
  70. package/common/pressure.instance.json +1341 -1189
  71. package/common/pressure.js +2 -2
  72. package/common/properties.instance.json +130 -60
  73. package/common/properties.js +54 -125
  74. package/common/punctuation.js +2 -2
  75. package/common/reports.instance.json +595 -557
  76. package/common/reports.js +58 -76
  77. package/common/scorekeeper.js +14 -22
  78. package/common/sdefaults.js +13 -3
  79. package/common/sizeable.js +2 -2
  80. package/common/spock.instance.json +583 -289
  81. package/common/spock.js +2 -2
  82. package/common/stgame.js +13 -9
  83. package/common/stm.js +162 -19
  84. package/common/stm.test.json +1734 -1
  85. package/common/tell.js +10 -10
  86. package/common/temperature.instance.json +1484 -1204
  87. package/common/temperature.js +2 -2
  88. package/common/tester.js +2 -2
  89. package/common/testing.js +5 -5
  90. package/common/time.js +7 -7
  91. package/common/tokenize.js +1 -1
  92. package/common/ui.instance.json +257 -258
  93. package/common/ui.js +9 -9
  94. package/common/weight.instance.json +5212 -4233
  95. package/common/weight.js +2 -2
  96. package/common/yesno.js +1 -1
  97. package/main.js +59 -46
  98. package/package.json +27 -6
@@ -102,16 +102,16 @@ let configStruct = {
102
102
  "(([expression]) [equals] ([expression]))",
103
103
  ],
104
104
  priorities: [
105
- { "context": [['mathematicalOperator', 0], ['number', 0], ], "choose": [0] },
105
+ { "context": [['mathematical_operator', 0], ['number', 0], ], "choose": [0] },
106
106
  ],
107
107
  semantics: [
108
108
  {
109
109
  where: where(),
110
110
  match: ({context, api}) => context.evaluate && api.get(context),
111
- apply: ({context, api, e}) => {
111
+ apply: async ({context, api, e}) => {
112
112
  const { formula } = api.get(context)
113
113
  // console.log('greg24 -----------', JSON.stringify(formula, null, 2))
114
- context.evalue = e(formula)
114
+ context.evalue = await e(formula)
115
115
  }
116
116
  },
117
117
  ],
@@ -122,7 +122,7 @@ let configStruct = {
122
122
  isA: ['preposition', 'queryable'],
123
123
  convolution: true,
124
124
  bridge: "{ number: before[0].number, ...next(operator), what: before[0], equality: after[0], variable: after[1] }",
125
- generatorp: ({context, g}) => `${g(context.what)} ${g(context.equality)} ${g(context.variable)}`,
125
+ generatorp: async ({context, g}) => `${await g(context.what)} ${await g(context.equality)} ${await g(context.variable)}`,
126
126
  evaluator: ({context, api, objects}) => {
127
127
  const formulas = api.gets(context.variable).map((f) => { return { ...f.equality, paraphrase: true } })
128
128
  context.evalue = { marker: 'list', value: formulas }
@@ -132,7 +132,7 @@ let configStruct = {
132
132
  where: where(),
133
133
  id: 'solve',
134
134
  bridge: "{ ...next(operator), equality: after[0], variable: after[2] }",
135
- generatorp: ({context, gp}) => `${context.word} ${gp(context.equality)} for ${gp(context.variable)}`,
135
+ generatorp: async ({context, gp}) => `${context.word} ${await gp(context.equality)} for ${await gp(context.variable)}`,
136
136
  semantic: ({context}) => {
137
137
  context.response = solveFor(context.equality, context.variable)
138
138
  context.isResponse = true
@@ -160,10 +160,10 @@ let configStruct = {
160
160
  id: 'calculate',
161
161
  isA: ['verby'],
162
162
  bridge: "{ ...next(operator), expression: after[0] }",
163
- generatorp: ({context, g}) => `${context.word} ${g(context.expression)}`,
163
+ generatorp: async ({context, g}) => `${context.word} ${await g(context.expression)}`,
164
164
  localHierarchy: [ ['unknown', 'expression'] ],
165
- semantic: ({context, e}) => {
166
- context.evalue = e(context.expression)
165
+ semantic: async ({context, e}) => {
166
+ context.evalue = await e(context.expression)
167
167
  context.isResponse = true
168
168
  }
169
169
  },
@@ -172,10 +172,10 @@ let configStruct = {
172
172
  id: 'equals',
173
173
  bridge: "{ ...next(operator), left: before[0], right: after[0] }",
174
174
  words: ['='],
175
- after: ['mathematicalOperator'],
175
+ after: ['mathematical_operator'],
176
176
  // TODO have this be per argument then 'is' can map to equals where this only applied to before[0] and not after[0]
177
177
  localHierarchy: [ ['unknown', 'expression'] ],
178
- generatorp: ({context, gp}) => `${gp(context.left)} ${context.word} ${gp(context.right)}`,
178
+ generatorp: async ({context, gp}) => `${await gp(context.left)} ${context.word} ${await gp(context.right)}`,
179
179
  semantic: ({context, api}) => {
180
180
  // TODO make sure left is a single name
181
181
  // TODO calculate invertable formulas?
@@ -192,13 +192,13 @@ const template = {
192
192
  ]
193
193
  }
194
194
 
195
- const createConfig = () => {
195
+ const createConfig = async () => {
196
196
  const api = new API()
197
197
  config = new Config({ name: 'formulas' }, module)
198
198
  config.stop_auto_rebuild()
199
- config.add(dialogues(), pos(), math(), hierarchy(), comparable(), countable())
200
- config.api = api
201
- config.restart_auto_rebuild()
199
+ await config.add(dialogues, pos, math, hierarchy, comparable, countable)
200
+ await config.setApi(api)
201
+ await config.restart_auto_rebuild()
202
202
  return config
203
203
  }
204
204
 
@@ -23,20 +23,26 @@ let configStruct = {
23
23
  /*
24
24
  * modifiers = <list of properties>
25
25
  */
26
+ {
27
+ where: where(),
28
+ match: ({context}) => context.isResponse && context.response,
29
+ apply: ({context, gp}) => gp(context.response),
30
+ },
31
+
26
32
  {
27
33
  where: where(),
28
34
  //({context}) => context.paraphrase && context.modifiers,
29
35
  // match: ({context}) => context.paraphrase && (context.modifiers || context.postModifiers),
30
36
  match: ({context}) => (context.modifiers || context.postModifiers),
31
- apply: ({context, g, gs, callId}) => {
37
+ apply: async ({context, g, callId}) => {
32
38
  const text = []
33
39
  for (modifier of (context.modifiers || [])) {
34
40
  if (Array.isArray(context[modifier])) {
35
41
  for (let m of context[modifier]) {
36
- text.push(g(m))
42
+ text.push(await g(m))
37
43
  }
38
44
  } else {
39
- text.push(g(context[modifier], { isModifier: true }))
45
+ text.push(await g(context[modifier], { isModifier: true }))
40
46
  }
41
47
  }
42
48
  // text.push(context.word)
@@ -47,15 +53,15 @@ let configStruct = {
47
53
  number = isMany(context) ? 'many' : 'one'
48
54
  }
49
55
  if (context.postModifiers) {
50
- text.push(g({...context, number: 'one', postModifiers: undefined, modifiers: undefined}))
56
+ text.push(await g({...context, number: 'one', postModifiers: undefined, modifiers: undefined}))
51
57
  } else {
52
- text.push(g({...context, number, postModifiers: undefined, modifiers: undefined}))
58
+ text.push(await g({...context, number, postModifiers: undefined, modifiers: undefined}))
53
59
  }
54
60
  for ([index, modifier] of (context.postModifiers || []).entries()) {
55
61
  if (index == context.postModifiers.length - 1) {
56
- text.push(g({...context[modifier], number}))
62
+ text.push(await g({...context[modifier], number}))
57
63
  } else {
58
- text.push(g(context[modifier]))
64
+ text.push(await g(context[modifier]))
59
65
  }
60
66
  }
61
67
  return text.join(' ')
@@ -134,19 +140,19 @@ let configStruct = {
134
140
  {
135
141
  where: where(),
136
142
  match: ({context}) => context.evalue,
137
- apply: ({context, g}) => g(context.evalue)
143
+ apply: async ({context, g}) => await g(context.evalue)
138
144
  },
139
145
 
140
146
  {
141
147
  where: where(),
142
148
  match: ({context}) => context.value && Array.isArray(context.value),
143
- apply: ({context, gs}) => gs(context.value)
149
+ apply: async ({context, gs}) => await gs(context.value)
144
150
  },
145
151
 
146
152
  {
147
153
  where: where(),
148
154
  match: ({context}) => context.value,
149
- apply: ({context, g}) => g(context.value)
155
+ apply: async ({context, g}) => await g(context.value)
150
156
  },
151
157
 
152
158
  {
@@ -155,12 +161,6 @@ let configStruct = {
155
161
  apply: ({context}) => `the ${context.word}`
156
162
  },
157
163
 
158
- {
159
- where: where(),
160
- match: ({context}) => context.isResponse && context.response,
161
- apply: ({context, gp}) => gp(context.response),
162
- },
163
-
164
164
  {
165
165
  where: where(),
166
166
  match: ({context}) => context.word,
@@ -181,10 +181,10 @@ let configStruct = {
181
181
  ],
182
182
  };
183
183
 
184
- const createConfig = () => {
184
+ const createConfig = async () => {
185
185
  const config = new Config(configStruct, module)
186
- config.add(tokenize())
187
- config.initializer( ({config}) => {
186
+ await config.add(tokenize)
187
+ await config.initializer( ({config}) => {
188
188
  config.addArgs((args) => {
189
189
  return {
190
190
  number: (context) => isMany(context) ? "many" : "one",
package/common/help.js CHANGED
@@ -82,12 +82,12 @@ const configStruct = {
82
82
  },
83
83
  };
84
84
 
85
- const createConfig = () => {
85
+ const createConfig = async () => {
86
86
  const config = new Config(configStruct, module)
87
87
  config.stop_auto_rebuild()
88
- config.add(dialogues())
88
+ await config.add(dialogues)
89
89
 
90
- config.initializer( ({ config, addWord, kms }) => {
90
+ await config.initializer( ({ config, addWord, kms }) => {
91
91
  const names = new Set()
92
92
  for (let name in kms) {
93
93
  names.add(name);
@@ -96,7 +96,7 @@ const createConfig = () => {
96
96
  addWord(name, {id: "km", initial: `{ value: '${name}', word: '${name}' }`})
97
97
  }
98
98
  })
99
- config.restart_auto_rebuild()
99
+ await config.restart_auto_rebuild()
100
100
  return config
101
101
  }
102
102
 
@@ -19,24 +19,6 @@
19
19
  0
20
20
  ]
21
21
  ],
22
- [
23
- [
24
- "help",
25
- 0
26
- ],
27
- [
28
- "km",
29
- 0
30
- ],
31
- [
32
- "list",
33
- 0
34
- ],
35
- [
36
- "withKM",
37
- 0
38
- ]
39
- ],
40
22
  [
41
23
  [
42
24
  "help",
@@ -212,10 +194,13 @@
212
194
  },
213
195
  "objects": {
214
196
  "nameToUUID": {
197
+ "articles": "articles2",
215
198
  "dialogues": "dialogues2",
199
+ "evaluate": "evaluate2",
216
200
  "gdefaults": "gdefaults2",
217
201
  "help": "help1",
218
202
  "meta": "meta2",
203
+ "negation": "negation2",
219
204
  "pos": "pos2",
220
205
  "punctuation": "punctuation2",
221
206
  "sdefaults": "sdefaults2",
@@ -223,6 +208,8 @@
223
208
  "tokenize": "tokenize2"
224
209
  },
225
210
  "namespaced": {
211
+ "articles2": {
212
+ },
226
213
  "dialogues2": {
227
214
  "idSuffix": "",
228
215
  "mentioned": [
@@ -230,12 +217,16 @@
230
217
  "variables": {
231
218
  }
232
219
  },
220
+ "evaluate2": {
221
+ },
233
222
  "gdefaults2": {
234
223
  },
235
224
  "help1": {
236
225
  },
237
226
  "meta2": {
238
227
  },
228
+ "negation2": {
229
+ },
239
230
  "pos2": {
240
231
  },
241
232
  "punctuation2": {
@@ -361,7 +352,7 @@
361
352
  }
362
353
  ],
363
354
  "generatedParenthesized": [
364
- "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
355
+ "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
365
356
  ],
366
357
  "metadata": {
367
358
  "opChoices": [
@@ -382,10 +373,13 @@
382
373
  },
383
374
  "objects": {
384
375
  "nameToUUID": {
376
+ "articles": "articles2",
385
377
  "dialogues": "dialogues2",
378
+ "evaluate": "evaluate2",
386
379
  "gdefaults": "gdefaults2",
387
380
  "help": "help1",
388
381
  "meta": "meta2",
382
+ "negation": "negation2",
389
383
  "pos": "pos2",
390
384
  "punctuation": "punctuation2",
391
385
  "sdefaults": "sdefaults2",
@@ -393,6 +387,8 @@
393
387
  "tokenize": "tokenize2"
394
388
  },
395
389
  "namespaced": {
390
+ "articles2": {
391
+ },
396
392
  "dialogues2": {
397
393
  "idSuffix": "",
398
394
  "mentioned": [
@@ -400,12 +396,16 @@
400
396
  "variables": {
401
397
  }
402
398
  },
399
+ "evaluate2": {
400
+ },
403
401
  "gdefaults2": {
404
402
  },
405
403
  "help1": {
406
404
  },
407
405
  "meta2": {
408
406
  },
407
+ "negation2": {
408
+ },
409
409
  "pos2": {
410
410
  },
411
411
  "punctuation2": {
@@ -440,11 +440,11 @@
440
440
  "value": "help",
441
441
  "word": "help"
442
442
  },
443
- "generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
443
+ "generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
444
444
  "paraphrases": "help",
445
445
  "paraphrasesParenthesized": "(help)",
446
446
  "responses": [
447
- " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
447
+ " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
448
448
  ]
449
449
  }
450
450
  ]
@@ -457,7 +457,7 @@
457
457
  ],
458
458
  "query": "help",
459
459
  "responses": [
460
- " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
460
+ " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
461
461
  ]
462
462
  }
463
463
  ]
@@ -34,10 +34,9 @@ class API {
34
34
  // TODO make the modifiers objects then below for add words for modifiers only do if !unknown
35
35
  // const objectId = pluralize.singular(object)
36
36
  const objectId = this.args.kms.dialogues.api.toScopedId(object)
37
-
38
37
  // const modifierIds = modifiers.map( (modifier) => pluralize.singular(modifier) )
39
38
  const modifierIds = modifiers.map( (modifier) => this.args.kms.dialogues.api.toScopedId(modifier) )
40
- const modifiersObjectId = `${modifiers.join("_")}_${objectId}`
39
+ const modifiersObjectId = `${modifierIds.join("_")}_${objectId}`
41
40
 
42
41
  const toWord = (object) => {
43
42
  if (typeof object == 'string') {
@@ -76,11 +75,14 @@ class API {
76
75
  config.addWord(objectPlural, { id: objectId, initial: `{ value: '${objectId}', number: 'many' }`})
77
76
  }
78
77
 
79
- zip(modifiers, modifierIds).forEach(([modifierWord, modifierId]) => {
78
+ zip(modifiers, modifierIds).forEach(([modifier, modifierId]) => {
80
79
  // config.addWord(modifier, { id: modifierId, initial: `{ value: '${modifierId}' }`})
81
80
  // TODO call evaluator to pick up overrides
82
- config.addWord(pluralize.singular(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'one' }`})
83
- config.addWord(pluralize.plural(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'many' }`})
81
+ if (modifier.unknown) {
82
+ const modifierWord = modifier.text
83
+ config.addWord(pluralize.singular(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'one' }`})
84
+ config.addWord(pluralize.plural(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'many' }`})
85
+ }
84
86
  })
85
87
  // modifierds.forEach((modifierId) => config.addWord(modifierId, { id: modifierId, initial: `{ value: '${modifierId}' }`}))
86
88
 
@@ -94,7 +96,8 @@ class API {
94
96
  id: modifiersObjectId,
95
97
  level: 0,
96
98
  convolution: true,
97
- isA: ['adjective'],
99
+ isA: [{ parent: 'adjective', instance: true }],
100
+ // isA: ['adjective'],
98
101
  before: ['verby'],
99
102
  bridge: `{ ...after[0], ${modifierProperties}, atomic: true, dead: true, marker: next(operator('${modifiersObjectId}')), value: '${modifiersObjectId}', modifiers: append([${modifierList}], after[0].modifiers)}`,
100
103
  allowDups: true })
@@ -50,10 +50,9 @@ class API {
50
50
  return this._objects.brief
51
51
  }
52
52
 
53
- evaluateToConcept(value, context, log, s) {
53
+ async evaluateToConcept(value, context, log, s) {
54
54
  value.evaluate = { toConcept: true }
55
- // const concept = s(value, { debug: { apply: true } })
56
- const concept = s(value)
55
+ const concept = await s(value)
57
56
  if (!concept.evalue && !concept.verbatim) {
58
57
  this.warningNotEvaluated(log, value);
59
58
  concept.evalue = concept.value