tpmkms_4wp 9.5.1 → 9.6.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 (135) hide show
  1. package/common/animals.instance.json +151 -61
  2. package/common/animals.js +3 -5
  3. package/common/asking.js +116 -106
  4. package/common/avatar.test.json +1001 -860
  5. package/common/can.instance.json +2194 -0
  6. package/common/can.js +251 -0
  7. package/common/can.test.json +51307 -0
  8. package/common/characters.js +5 -5
  9. package/common/colors.instance.json +152 -12
  10. package/common/colors.js +3 -6
  11. package/common/comparable.instance.json +33 -3
  12. package/common/comparable.js +3 -6
  13. package/common/concept.js +25 -27
  14. package/common/concept.test.json +180 -144
  15. package/common/conjunction.js +13 -5
  16. package/common/conjunction.test.json +32 -42
  17. package/common/crew.instance.json +433 -173
  18. package/common/crew.js +4 -7
  19. package/common/crew.test.json +4148 -3324
  20. package/common/currency.js +1 -1
  21. package/common/dateTimeSelectors.instance.json +2 -2
  22. package/common/dateTimeSelectors.js +6 -9
  23. package/common/dateTimeSelectors.test.json +76935 -35739
  24. package/common/dates.instance.json +53 -3
  25. package/common/dates.js +3 -6
  26. package/common/dates.test.json +284 -287
  27. package/common/dialogues.js +43 -122
  28. package/common/dialogues.test.json +1248 -1152
  29. package/common/dimension.instance.json +21493 -561
  30. package/common/dimension.js +150 -55
  31. package/common/dimension.test.json +10979 -4625
  32. package/common/drone.instance.json +24709 -0
  33. package/common/drone.js +662 -0
  34. package/common/drone.test.json +30522 -0
  35. package/common/drone_v1.instance.json +24703 -0
  36. package/common/drone_v1.js +596 -0
  37. package/common/drone_v1.test.json +115538 -0
  38. package/common/edible.instance.json +388 -32
  39. package/common/edible.js +3 -5
  40. package/common/emotions.instance.json +85 -76
  41. package/common/emotions.js +4 -7
  42. package/common/emotions.test.json +242 -174
  43. package/common/english_helpers.js +336 -0
  44. package/common/errors.js +6 -6
  45. package/common/evaluate.js +2 -2
  46. package/common/events.js +8 -8
  47. package/common/fastfood.instance.json +1071 -393
  48. package/common/fastfood.js +14 -16
  49. package/common/fastfood.test.json +6970 -6829
  50. package/common/formulas.instance.json +11 -1
  51. package/common/formulas.js +3 -2
  52. package/common/gdefaults.js +111 -17
  53. package/common/help.js +12 -12
  54. package/common/help.test.json +65 -11
  55. package/common/helpers/concept.js +1 -1
  56. package/common/helpers/conjunction.js +54 -44
  57. package/common/helpers/dateTimeSelectors.js +2 -2
  58. package/common/helpers/dialogues.js +10 -2
  59. package/common/helpers/formulas.js +13 -11
  60. package/common/helpers/menus.js +12 -12
  61. package/common/helpers/meta.js +9 -9
  62. package/common/helpers/properties.js +186 -64
  63. package/common/helpers.js +167 -48
  64. package/common/hierarchy.js +12 -10
  65. package/common/kirk.instance.json +11 -1
  66. package/common/kirk.js +4 -6
  67. package/common/kirk.test.json +600 -424
  68. package/common/latin.instance.json +12 -12
  69. package/common/latin.js +12 -14
  70. package/common/length.instance.json +34660 -3158
  71. package/common/length.js +11 -6
  72. package/common/length.test.json +54357 -2557
  73. package/common/math.instance.json +39 -29
  74. package/common/math.js +49 -47
  75. package/common/menus.instance.json +77 -10
  76. package/common/menus.js +4 -13
  77. package/common/meta.js +80 -65
  78. package/common/nameable.js +36 -22
  79. package/common/nameable.test.json +436 -0
  80. package/common/numbers.js +1 -1
  81. package/common/ordering.instance.json +107 -19
  82. package/common/ordering.js +4 -6
  83. package/common/ordering.test.json +835 -417
  84. package/common/people.instance.json +176 -348
  85. package/common/people.js +9 -9
  86. package/common/people.test.json +4135 -3606
  87. package/common/pipboy.instance.json +187 -17
  88. package/common/pipboy.js +4 -4
  89. package/common/pokemon.instance.json +143 -13
  90. package/common/pokemon.js +4 -6
  91. package/common/pressure.instance.json +3610 -1601
  92. package/common/pressure.js +3 -5
  93. package/common/pressure.test.json +433 -477
  94. package/common/properties.instance.json +16 -17
  95. package/common/properties.js +32 -13
  96. package/common/properties.test.json +9565 -6951
  97. package/common/rates.instance.json +59 -0
  98. package/common/rates.js +95 -0
  99. package/common/rates.test.json +27702 -0
  100. package/common/reminders.instance.json +4 -4
  101. package/common/reminders.js +8 -11
  102. package/common/reminders.test.json +64635 -25787
  103. package/common/reports.instance.json +23 -3
  104. package/common/reports.js +21 -21
  105. package/common/scorekeeper.js +9 -12
  106. package/common/sdefaults.js +22 -2
  107. package/common/spock.instance.json +11 -1
  108. package/common/spock.js +4 -7
  109. package/common/spock.test.json +606 -430
  110. package/common/stgame.js +1 -1
  111. package/common/stm.js +41 -24
  112. package/common/tell.js +1 -1
  113. package/common/temperature.instance.json +3163 -1154
  114. package/common/temperature.js +3 -5
  115. package/common/temperature.test.json +433 -477
  116. package/common/tester.js +3 -3
  117. package/common/time.instance.json +24852 -0
  118. package/common/time.js +138 -141
  119. package/common/time.test.json +31876 -3757
  120. package/common/tokenize.js +5 -2
  121. package/common/ui.instance.json +12 -5
  122. package/common/ui.js +4 -13
  123. package/common/weight.instance.json +10501 -4099
  124. package/common/weight.js +3 -5
  125. package/common/weight.test.json +2601 -2263
  126. package/common/words.instance.json +9 -0
  127. package/common/words.js +50 -0
  128. package/common/words.test.json +2 -0
  129. package/common/wp.instance.json +548 -8
  130. package/common/wp.js +10 -8
  131. package/common/wp.test.json +7385 -6906
  132. package/main.js +6 -2
  133. package/package.json +25 -6
  134. package/common/listener.js +0 -50
  135. package/common/listener.test.json +0 -142
@@ -798,6 +798,16 @@
798
798
  "adjective",
799
799
  false
800
800
  ],
801
+ [
802
+ "stm_current",
803
+ "adjective",
804
+ false
805
+ ],
806
+ [
807
+ "stm_previous",
808
+ "adjective",
809
+ false
810
+ ],
801
811
  [
802
812
  "that",
803
813
  "thisitthat",
@@ -997,7 +1007,7 @@
997
1007
  "word": "formulas",
998
1008
  "range": {
999
1009
  "start": 0,
1000
- "end": 20
1010
+ "end": 7
1001
1011
  },
1002
1012
  "dead": true,
1003
1013
  "types": [
@@ -13,7 +13,7 @@ const instance = require('./formulas.instance.json')
13
13
  /*
14
14
  const template = {
15
15
  configs: [
16
- // { query: "x equals y + 4", development: true },
16
+ // { query: "x equals y + 4", scope: "testing" },
17
17
  ]
18
18
  }
19
19
  */
@@ -199,7 +199,8 @@ knowledgeModule({
199
199
 
200
200
  module,
201
201
  description: 'Formulas using math',
202
- template: { template, instance },
202
+ instance,
203
+ template,
203
204
  test: {
204
205
  name: './formulas.test.json',
205
206
  contents: tests,
@@ -1,9 +1,10 @@
1
1
  const pluralize = require('pluralize')
2
- const { defaultContextCheck } = require('./helpers')
3
- const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
+ const { defaultContextCheck, getValue, isMany } = require('./helpers')
3
+ const { knowledgeModule, where, flatten } = require('./runtime').theprogrammablemind
4
4
  const tokenize = require('./tokenize.js')
5
+ const words = require('./words.js')
5
6
  const gdefaults_tests = require('./gdefaults.test.json')
6
- const { getValue, isMany } = require('./helpers.js')
7
+ const englishHelpers = require('./english_helpers.js')
7
8
  const helpers = require('./helpers')
8
9
 
9
10
  const config = {
@@ -89,7 +90,7 @@ const config = {
89
90
  text.push(await g(m))
90
91
  }
91
92
  } else {
92
- text.push(await g(context[modifier], { isModifier: true }))
93
+ text.push(await g(context[modifier], { assumed: { isModifier: true } }))
93
94
  }
94
95
  }
95
96
  // text.push(context.word)
@@ -151,21 +152,71 @@ const config = {
151
152
  {
152
153
  where: where(),
153
154
  priority: -1,
154
- match: ({context}) => context.evaluateWord && context.paraphrase && context.word && (context.number == 'many' || countext.number > 1),
155
+ // match: ({context}) => context.evaluateWord && context.isVerb && context.paraphrase && context.word && context.number == 'one' && !context.imperative && !context.interpolate,
156
+ match: ({context}) => context.evaluateWord && context.isVerb && context.paraphrase && context.word && !context.imperative && !context.interpolate,
157
+ apply: ({context}) => {
158
+ const infinitive = englishHelpers.getInfinitive(context.word)
159
+ if (context.form == 'infinitive') {
160
+ const cases = englishHelpers.conjugateVerb(infinitive)
161
+ const def = cases.find((def) => def.form == context.form)
162
+ return def.word
163
+ } else if (context.tense) {
164
+ const cases = englishHelpers.conjugateVerb(infinitive)
165
+ const def = cases.find((def) => def.tense == context.tense)
166
+ return def.word
167
+ } else {
168
+ return pluralize.plural(context.word)
169
+ }
170
+ },
171
+ },
172
+
173
+ /*
174
+ {
175
+ where: where(),
176
+ priority: -1,
177
+ match: ({context}) => context.evaluateWord && context.isVerb && context.paraphrase && context.word && context.number == 'many' && !context.imperative && !context.interpolate,
178
+ apply: ({context}) => {
179
+ const infinitive = englishHelpers.getInfinitive(context.word)
180
+ const cases = englishHelpers.conjugateVerb(infinitive)
181
+ return pluralize.singular(context.word)
182
+ },
183
+ },
184
+ */
185
+ {
186
+ where: where(),
187
+ priority: -1,
188
+ match: ({context}) => context.evaluateWord && context.paraphrase && context.word && (context.number == 'many' || context.number > 1) && !context.interpolate,
155
189
  apply: ({context}) => pluralize.plural(context.word),
156
190
  },
157
191
 
158
192
  {
159
193
  where: where(),
160
194
  priority: -1,
161
- match: ({context}) => context.evaluateWord && context.paraphrase && context.word && context.number == 'one',
162
- apply: ({context}) => pluralize.singular(context.word),
195
+ match: ({context}) => context.evaluateWord && context.isVerb && context.paraphrase && context.word && context.number == 'one' && !context.imperative && !context.interpolate,
196
+ apply: ({context}) => {
197
+ const infinitive = englishHelpers.getInfinitive(context.word)
198
+ const cases = englishHelpers.conjugateVerb(infinitive)
199
+ return pluralize.plural(context.word)
200
+ },
201
+ },
202
+
203
+ {
204
+ where: where(),
205
+ priority: -1,
206
+ match: ({context}) => context.evaluateWord && context.paraphrase && context.word && context.number == 'one' && !context.interpolate,
207
+ apply: ({context}) => {
208
+ return pluralize.singular(context.word)
209
+ },
163
210
  },
164
211
 
165
212
  {
166
213
  where: where(),
167
214
  match: ({context}) => context.paraphrase && context.word && (context.number == 'many' || context.number > 1),
168
215
  apply: ({context}) => {
216
+ // TODO make the sentence that the plural celcius is celcius work
217
+ if (["fahrenheit", "celcius"].includes(context.word)) {
218
+ return context.word
219
+ }
169
220
  return pluralize.plural(context.word)
170
221
  }
171
222
  },
@@ -228,27 +279,30 @@ const config = {
228
279
  ],
229
280
  };
230
281
 
231
- const initializer = ({config}) => {
282
+ function initializer({config}) {
232
283
  config.addArgs((args) => {
284
+ function verbatim(text) {
285
+ args.insert({ marker: 'verbatim', verbatim: text, isResponse: true })
286
+ }
233
287
  return {
288
+ flatten,
234
289
  number: (context) => isMany(context) ? "many" : "one",
235
290
  // number/gender/person etc
236
291
  gw: (context, { number: numberContext }) => {
237
292
  const number = numberContext ? args.number(numberContext) : context.number;
238
293
  return args.gp( { ...context, evaluateWord: true, number } )
239
294
  },
240
- verbatim: (text) => {
241
- args.insert({ marker: 'verbatim', verbatim: text, isResponse: true })
242
- },
295
+ verbatim,
296
+ say: verbatim,
243
297
  interpolate: async (interpolate, context) => {
244
- const evaluator = async (key) => {
298
+ async function evaluator(key) {
245
299
  if (Array.isArray(context[key])) {
246
300
  return args.gsp(context[key])
247
301
  } else {
248
302
  return args.gp(context[key])
249
303
  }
250
304
  }
251
- const getValue = (keyOrValue) => {
305
+ function getValue(keyOrValue) {
252
306
  if (typeof keyOrValue == 'string' && context[keyOrValue]) {
253
307
  return context[keyOrValue]
254
308
  }
@@ -259,7 +313,15 @@ const initializer = ({config}) => {
259
313
  const strings = []
260
314
  let separator = ''
261
315
  for (const element of interpolate) {
262
- if (typeof element == 'string') {
316
+ // { "word": { "marker": "canPassive" } ie { word: <selectionCriteria> }
317
+ if (element.word) {
318
+ const word = args.getWordFromDictionary(element.word)
319
+ if (word) {
320
+ strings.push(separator)
321
+ strings.push(await args.gp(word))
322
+ separator = ' '
323
+ }
324
+ } else if (typeof element == 'string') {
263
325
  separator = element
264
326
  } else if (element.separator && element.values) {
265
327
  let ctr = 0
@@ -273,10 +335,42 @@ const initializer = ({config}) => {
273
335
  vstrings.push(getValue(value))
274
336
  }
275
337
  strings.push(await args.gsp(vstrings))
276
- } else {
277
- let value = element
338
+ } else if (element.semantic) {
339
+ const wordContext = {}
340
+ for (const term of element.semantic) {
341
+ if (term.property) {
342
+ Object.assign(wordContext, context[term.property])
343
+ } else if (term.overrides) {
344
+ Object.assign(wordContext, term.overrides)
345
+ }
346
+ }
347
+ const value = await args.gp(wordContext) //, { options: { debug: { apply: true } } })
348
+ if (value) {
349
+ strings.push(separator)
350
+ strings.push(await args.gp(value))
351
+ separator = ' '
352
+ }
353
+ } else if (element.property) {
354
+ value = context[element.property]
355
+ if (value) {
356
+ if (element.context) {
357
+ value = { ...value, ...element.context }
358
+ }
359
+ strings.push(separator)
360
+ strings.push(await args.gp(value))
361
+ separator = ' '
362
+ }
363
+ } else if (element.context) {
364
+ let value = element.context
278
365
  if (element.property) {
279
366
  value = context[element.property]
367
+ if (element.context) {
368
+ Object.assign(value, element.context)
369
+ }
370
+ }
371
+ // if (!value?.number && element.number) {
372
+ if (value?.form !== 'infinitive' && element.number) {
373
+ value.number = isMany(context[element.number]) ? "many": "one"
280
374
  }
281
375
  if (value) {
282
376
  strings.push(separator)
@@ -296,7 +390,7 @@ const initializer = ({config}) => {
296
390
 
297
391
  knowledgeModule({
298
392
  config,
299
- includes: [tokenize],
393
+ includes: [tokenize, words],
300
394
  initializer,
301
395
 
302
396
  module,
package/common/help.js CHANGED
@@ -4,16 +4,16 @@ const dialogues = require('./dialogues')
4
4
  const help_tests = require('./help.test.json')
5
5
  const helpers = require('./helpers')
6
6
 
7
- const getHelp = (config, indent=2) => {
7
+ function getHelp(config, indent=2) {
8
8
  indent = ' '.repeat(indent)
9
9
  let help = ''
10
- if (config.tests.length == 0) {
10
+ if (config.getTests().length == 0) {
11
11
  return ''
12
12
  }
13
- help += `${indent}NAME: ${config.name}\n`
14
- help += `${indent}DESCRIPTION: ${config.description}\n\n`
13
+ help += `${indent}NAME: ${config.getName()}\n`
14
+ help += `${indent}DESCRIPTION: ${config.getDescription()}\n\n`
15
15
  help += `${indent}SAMPLE SENTENCES\n\n`
16
- for (const test of config.tests) {
16
+ for (const test of config.getTests()) {
17
17
  if (test.developerTest) {
18
18
  continue
19
19
  }
@@ -47,17 +47,17 @@ const config = {
47
47
  const isAll = kms.length == 0
48
48
  let help = '';
49
49
  let separator = ''
50
- if (isAll || kms.includes(config.name)) {
51
- if (config.name !== 'tester') {
50
+ if (isAll || kms.includes(config.getName())) {
51
+ if (config.getName() !== 'tester') {
52
52
  help += getHelp(config)
53
53
  separator = '\n'
54
54
  }
55
55
  }
56
56
 
57
- if (config.configs.length > 1) {
58
- for (km of config.configs) {
57
+ if (config.getConfigs().length > 1) {
58
+ for (km of config.getConfigs()) {
59
59
  if (km._config instanceof Config) {
60
- if (isAll || kms.includes(km._config.name)) {
60
+ if (isAll || kms.includes(km._config.getName())) {
61
61
  help += separator + getHelp(km._config)
62
62
  separator = '\n'
63
63
  }
@@ -77,12 +77,12 @@ const config = {
77
77
  words: {
78
78
  "literals": {
79
79
  // "km1": { "the": [{"id": "the", "initial": "{ modifiers: [] }" }],
80
- 'km1': [{id: "km", initial: "{ value: 'km1', word: 'km1' }", development: true }],
80
+ 'km1': [{id: "km", initial: "{ value: 'km1', word: 'km1' }", scope: "testing" }],
81
81
  }
82
82
  },
83
83
  };
84
84
 
85
- const initializer = ({ config, addWord, kms }) => {
85
+ function initializer({ config, addWord, kms }) {
86
86
  const names = new Set()
87
87
  for (const name in kms) {
88
88
  names.add(name);
@@ -52,6 +52,7 @@
52
52
  },
53
53
  "contexts": [
54
54
  {
55
+ "context_id": 2,
55
56
  "context_index": 1,
56
57
  "dead": true,
57
58
  "default": true,
@@ -230,6 +231,8 @@
230
231
  ]
231
232
  },
232
233
  "objects": {
234
+ "associations": [
235
+ ],
233
236
  "nameToUUID": {
234
237
  "articles": "articles2",
235
238
  "asking": "asking2",
@@ -244,50 +247,71 @@
244
247
  "punctuation": "punctuation2",
245
248
  "sdefaults": "sdefaults2",
246
249
  "stm": "stm2",
247
- "tokenize": "tokenize2"
250
+ "tokenize": "tokenize2",
251
+ "words": "words2"
248
252
  },
249
253
  "namespaced": {
250
254
  "articles2": {
255
+ "km": "articles2"
251
256
  },
252
257
  "asking2": {
258
+ "km": "asking2"
253
259
  },
254
260
  "conjunction2": {
261
+ "km": "conjunction2"
255
262
  },
256
263
  "dialogues2": {
257
264
  "idSuffix": "",
265
+ "km": "dialogues2",
258
266
  "mentioned": [
259
267
  ],
260
268
  "variables": {
261
269
  }
262
270
  },
263
271
  "evaluate2": {
272
+ "km": "evaluate2"
264
273
  },
265
274
  "gdefaults2": {
275
+ "km": "gdefaults2"
266
276
  },
267
277
  "help1": {
278
+ "km": "help1"
268
279
  },
269
280
  "meta2": {
281
+ "km": "meta2"
270
282
  },
271
283
  "negation2": {
284
+ "km": "negation2"
272
285
  },
273
286
  "pos2": {
287
+ "km": "pos2"
274
288
  },
275
289
  "punctuation2": {
290
+ "km": "punctuation2"
276
291
  },
277
292
  "sdefaults2": {
293
+ "km": "sdefaults2"
278
294
  },
279
295
  "stm2": {
296
+ "km": "stm2",
280
297
  "mentioned": [
281
298
  ],
282
299
  "variables": {
283
300
  }
284
301
  },
285
302
  "tokenize2": {
303
+ "km": "tokenize2"
304
+ },
305
+ "words2": {
306
+ "km": "words2",
307
+ "words": [
308
+ ]
286
309
  }
287
310
  },
288
311
  "processed": [
289
312
  {
290
313
  "context": {
314
+ "context_id": 2,
291
315
  "context_index": 1,
292
316
  "dead": true,
293
317
  "default": true,
@@ -352,9 +376,12 @@
352
376
  "value": "help",
353
377
  "word": "help"
354
378
  },
355
- "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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n)",
356
- "paraphrases": "help",
357
- "paraphrasesParenthesized": "(help)",
379
+ "generatedParenthesized": [
380
+ ],
381
+ "paraphrases": [
382
+ ],
383
+ "paraphrasesParenthesized": [
384
+ ],
358
385
  "responses": [
359
386
  " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n"
360
387
  ]
@@ -626,6 +653,7 @@
626
653
  },
627
654
  "contexts": [
628
655
  {
656
+ "context_id": 2,
629
657
  "context_index": 1,
630
658
  "dead": true,
631
659
  "default": true,
@@ -645,7 +673,7 @@
645
673
  }
646
674
  ],
647
675
  "generatedParenthesized": [
648
- "( 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\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)"
676
+ "( 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
649
677
  ],
650
678
  "metadata": {
651
679
  "opChoices": [
@@ -665,6 +693,8 @@
665
693
  ]
666
694
  },
667
695
  "objects": {
696
+ "associations": [
697
+ ],
668
698
  "nameToUUID": {
669
699
  "articles": "articles2",
670
700
  "asking": "asking2",
@@ -679,50 +709,71 @@
679
709
  "punctuation": "punctuation2",
680
710
  "sdefaults": "sdefaults2",
681
711
  "stm": "stm2",
682
- "tokenize": "tokenize2"
712
+ "tokenize": "tokenize2",
713
+ "words": "words2"
683
714
  },
684
715
  "namespaced": {
685
716
  "articles2": {
717
+ "km": "articles2"
686
718
  },
687
719
  "asking2": {
720
+ "km": "asking2"
688
721
  },
689
722
  "conjunction2": {
723
+ "km": "conjunction2"
690
724
  },
691
725
  "dialogues2": {
692
726
  "idSuffix": "",
727
+ "km": "dialogues2",
693
728
  "mentioned": [
694
729
  ],
695
730
  "variables": {
696
731
  }
697
732
  },
698
733
  "evaluate2": {
734
+ "km": "evaluate2"
699
735
  },
700
736
  "gdefaults2": {
737
+ "km": "gdefaults2"
701
738
  },
702
739
  "help1": {
740
+ "km": "help1"
703
741
  },
704
742
  "meta2": {
743
+ "km": "meta2"
705
744
  },
706
745
  "negation2": {
746
+ "km": "negation2"
707
747
  },
708
748
  "pos2": {
749
+ "km": "pos2"
709
750
  },
710
751
  "punctuation2": {
752
+ "km": "punctuation2"
711
753
  },
712
754
  "sdefaults2": {
755
+ "km": "sdefaults2"
713
756
  },
714
757
  "stm2": {
758
+ "km": "stm2",
715
759
  "mentioned": [
716
760
  ],
717
761
  "variables": {
718
762
  }
719
763
  },
720
764
  "tokenize2": {
765
+ "km": "tokenize2"
766
+ },
767
+ "words2": {
768
+ "km": "words2",
769
+ "words": [
770
+ ]
721
771
  }
722
772
  },
723
773
  "processed": [
724
774
  {
725
775
  "context": {
776
+ "context_id": 2,
726
777
  "context_index": 1,
727
778
  "dead": true,
728
779
  "default": true,
@@ -740,11 +791,14 @@
740
791
  "value": "help",
741
792
  "word": "help"
742
793
  },
743
- "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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\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)",
744
- "paraphrases": "help",
745
- "paraphrasesParenthesized": "(help)",
794
+ "generatedParenthesized": [
795
+ ],
796
+ "paraphrases": [
797
+ ],
798
+ "paraphrasesParenthesized": [
799
+ ],
746
800
  "responses": [
747
- " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\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"
801
+ " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
748
802
  ]
749
803
  }
750
804
  ]
@@ -757,7 +811,7 @@
757
811
  ],
758
812
  "query": "help",
759
813
  "responses": [
760
- " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\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"
814
+ " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\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: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\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 every distributable\n each distributable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
761
815
  ],
762
816
  "summaries": [
763
817
  {
@@ -38,7 +38,7 @@ class API {
38
38
  const modifierIds = modifiers.map( (modifier) => this.args.kms.dialogues.api.toScopedId(modifier) )
39
39
  const modifiersObjectId = `${modifierIds.join("_")}_${objectId}`
40
40
 
41
- const toWord = (object) => {
41
+ function toWord(object) {
42
42
  if (typeof object == 'string') {
43
43
  return object
44
44
  }