ekms 8.0.0 → 8.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/common/animals.instance.json +3055 -1651
  2. package/common/animals.js +17 -20
  3. package/common/articles.js +103 -0
  4. package/common/articles.test.json +310 -0
  5. package/common/asking.instance.json +2 -0
  6. package/common/asking.js +253 -0
  7. package/common/asking.test.json +2290 -0
  8. package/common/avatar.js +6 -10
  9. package/common/characters.js +23 -30
  10. package/common/colors.instance.json +25666 -0
  11. package/common/colors.js +67 -0
  12. package/common/colors.test.json +4425 -0
  13. package/common/comparable.instance.json +1750 -0
  14. package/common/comparable.js +36 -28
  15. package/common/comparable.test.json +1196 -2
  16. package/common/concept.js +121 -119
  17. package/common/concept.test.json +688 -0
  18. package/common/conjunction.instance.json +2 -0
  19. package/common/conjunction.js +104 -0
  20. package/common/conjunction.test.json +322 -0
  21. package/common/countable.js +20 -14
  22. package/common/countable.test.json +1050 -0
  23. package/common/crew.instance.json +16432 -9850
  24. package/common/crew.js +39 -42
  25. package/common/crew.test.json +714 -452
  26. package/common/currency.js +28 -46
  27. package/common/dialogues.js +187 -429
  28. package/common/dialogues.test.json +684 -450
  29. package/common/dimension.instance.json +517 -289
  30. package/common/dimension.js +22 -24
  31. package/common/dimension.test.json +727 -1944
  32. package/common/edible.instance.json +20506 -10664
  33. package/common/edible.js +4 -9
  34. package/common/emotions.instance.json +195 -123
  35. package/common/emotions.js +36 -39
  36. package/common/evaluate.instance.json +2 -0
  37. package/common/evaluate.js +53 -0
  38. package/common/evaluate.test.json +574 -0
  39. package/common/events.js +11 -15
  40. package/common/fastfood.instance.json +223185 -113172
  41. package/common/fastfood.js +77 -87
  42. package/common/fastfood.test.json +8205 -3733
  43. package/common/formulas.instance.json +444 -244
  44. package/common/formulas.js +20 -27
  45. package/common/formulas.test.json +1027 -955
  46. package/common/gdefaults.js +45 -32
  47. package/common/help.js +9 -14
  48. package/common/help.test.json +71 -18
  49. package/common/helpers/concept.js +37 -10
  50. package/common/helpers/dialogues.js +22 -4
  51. package/common/helpers/formulas.js +0 -14
  52. package/common/helpers/meta.js +0 -1
  53. package/common/helpers/properties.js +92 -84
  54. package/common/helpers.js +35 -24
  55. package/common/hierarchy.js +18 -25
  56. package/common/javascript.js +12 -19
  57. package/common/kirk.instance.json +583 -300
  58. package/common/kirk.js +6 -9
  59. package/common/length.instance.json +8995 -4964
  60. package/common/length.js +5 -9
  61. package/common/listener.js +48 -0
  62. package/common/listener.test.json +104 -0
  63. package/common/math.instance.json +409 -1202
  64. package/common/math.js +17 -21
  65. package/common/meta.js +24 -50
  66. package/common/nameable.instance.json +2 -0
  67. package/common/nameable.js +144 -0
  68. package/common/nameable.test.json +3191 -0
  69. package/common/negation.instance.json +2 -0
  70. package/common/negation.js +38 -0
  71. package/common/negation.test.json +308 -0
  72. package/common/numbers.js +28 -32
  73. package/common/ordering.instance.json +459 -274
  74. package/common/ordering.js +81 -87
  75. package/common/ordinals.instance.json +2 -0
  76. package/common/ordinals.js +61 -0
  77. package/common/ordinals.test.json +412 -0
  78. package/common/people.instance.json +2138 -1321
  79. package/common/people.js +9 -14
  80. package/common/people.test.json +1815 -1073
  81. package/common/percentages.instance.json +2 -0
  82. package/common/percentages.js +53 -0
  83. package/common/percentages.test.json +751 -0
  84. package/common/pipboy.instance.json +12261 -6898
  85. package/common/pipboy.js +53 -62
  86. package/common/pipboy.test.json +2835 -0
  87. package/common/pokemon.instance.json +4432 -2351
  88. package/common/pokemon.js +8 -21
  89. package/common/pos.js +16 -14
  90. package/common/pressure.instance.json +2311 -1303
  91. package/common/pressure.js +5 -9
  92. package/common/properties.instance.json +151 -87
  93. package/common/properties.js +164 -167
  94. package/common/properties.test.json +17605 -4030
  95. package/common/punctuation.js +24 -8
  96. package/common/punctuation.test.json +233 -5
  97. package/common/reports.instance.json +1037 -551
  98. package/common/reports.js +77 -103
  99. package/common/reports.test.json +15623 -10458
  100. package/common/scorekeeper.js +19 -31
  101. package/common/sdefaults.js +17 -8
  102. package/common/sizeable.js +13 -12
  103. package/common/spock.instance.json +582 -299
  104. package/common/spock.js +6 -9
  105. package/common/stgame.js +20 -20
  106. package/common/stm.js +182 -29
  107. package/common/stm.test.json +1734 -1
  108. package/common/tell.js +15 -19
  109. package/common/temperature.instance.json +2379 -1355
  110. package/common/temperature.js +5 -9
  111. package/common/tester.js +15 -4
  112. package/common/testing.js +8 -13
  113. package/common/time.js +21 -26
  114. package/common/tokenize.js +8 -8
  115. package/common/tokenize.test.json +86 -1
  116. package/common/ui.instance.json +151 -460
  117. package/common/ui.js +22 -34
  118. package/common/ui.test.json +641 -5357
  119. package/common/weight.instance.json +7957 -4350
  120. package/common/weight.js +5 -9
  121. package/common/weight.test.json +242 -238
  122. package/common/yesno.js +6 -6
  123. package/main.js +68 -45
  124. package/package.json +44 -6
@@ -1,4 +1,4 @@
1
- const { Config, knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const dimension = require('./dimension.js')
4
4
  const pressure_tests = require('./pressure.test.json')
@@ -14,16 +14,12 @@ const template = {
14
14
  ],
15
15
  }
16
16
 
17
- const createConfig = () => {
18
- const config = new Config({ name: 'pressure' }, module)
19
- config.add(dimension())
20
- return config
21
- }
22
-
23
17
  knowledgeModule({
18
+ config: { name: 'pressure' },
19
+ includes: [dimension],
20
+
24
21
  module,
25
22
  description: 'Pressure dimension',
26
- createConfig,
27
23
  test: {
28
24
  name: './pressure.test.json',
29
25
  contents: pressure_tests
@@ -32,7 +28,7 @@ knowledgeModule({
32
28
  template,
33
29
  instance: pressure_instance,
34
30
  checks: {
35
- context: defaultContextCheck,
31
+ context: defaultContextCheck(),
36
32
  },
37
33
  }
38
34
  })
@@ -6,219 +6,283 @@
6
6
  "hierarchy": [
7
7
  [
8
8
  "a",
9
- "articlePOS"
9
+ "articlePOS",
10
+ false
11
+ ],
12
+ [
13
+ "adjective",
14
+ "adjective",
15
+ false
10
16
  ],
11
17
  [
12
18
  "articlePOS",
13
- "articlePOS"
19
+ "articlePOS",
20
+ false
14
21
  ],
15
22
  [
16
23
  "between",
17
- "preposition"
24
+ "preposition",
25
+ false
18
26
  ],
19
27
  [
20
28
  "canBeDoQuestion",
21
- "canBeDoQuestion"
29
+ "canBeDoQuestion",
30
+ false
22
31
  ],
23
32
  [
24
33
  "canBeQuestion",
25
- "canBeQuestion"
34
+ "canBeQuestion",
35
+ false
26
36
  ],
27
37
  [
28
38
  "concept",
29
- "queryable"
39
+ "queryable",
40
+ false
30
41
  ],
31
42
  [
32
43
  "concept",
33
- "theAble"
44
+ "theAble",
45
+ false
46
+ ],
47
+ [
48
+ "doubleQuote",
49
+ "queryable",
50
+ false
51
+ ],
52
+ [
53
+ "evaluate",
54
+ "verb",
55
+ false
34
56
  ],
35
57
  [
36
58
  "have",
37
- "canBeDoQuestion"
59
+ "canBeDoQuestion",
60
+ false
38
61
  ],
39
62
  [
40
63
  "have",
41
- "canBeQuestion"
64
+ "canBeQuestion",
65
+ false
42
66
  ],
43
67
  [
44
68
  "hierarchyAble",
45
- "queryable"
69
+ "queryable",
70
+ false
46
71
  ],
47
72
  [
48
73
  "ifAble",
49
- "ifAble"
74
+ "ifAble",
75
+ false
50
76
  ],
51
77
  [
52
78
  "is",
53
- "canBeQuestion"
79
+ "canBeQuestion",
80
+ false
54
81
  ],
55
82
  [
56
83
  "is",
57
- "verby"
84
+ "verb",
85
+ false
58
86
  ],
59
87
  [
60
88
  "it",
61
- "pronoun"
89
+ "pronoun",
90
+ false
62
91
  ],
63
92
  [
64
93
  "it",
65
- "queryable"
94
+ "queryable",
95
+ false
66
96
  ],
67
97
  [
68
98
  "it",
69
- "thisitthat"
99
+ "thisitthat",
100
+ false
70
101
  ],
71
102
  [
72
103
  "it",
73
- "toAble"
104
+ "toAble",
105
+ false
74
106
  ],
75
107
  [
76
- "modifies",
77
- "verby"
108
+ "memorable",
109
+ "theAble",
110
+ false
78
111
  ],
79
112
  [
80
- "notAble",
81
- "notAble"
113
+ "modifies",
114
+ "verb",
115
+ false
82
116
  ],
83
117
  [
84
118
  "noun",
85
- "theAble"
119
+ "theAble",
120
+ false
86
121
  ],
87
122
  [
88
123
  "object",
89
- "queryable"
124
+ "queryable",
125
+ false
90
126
  ],
91
127
  [
92
128
  "object",
93
- "theAble"
129
+ "theAble",
130
+ false
94
131
  ],
95
132
  [
96
133
  "orAble",
97
- "ifAble"
134
+ "ifAble",
135
+ false
98
136
  ],
99
137
  [
100
138
  "preposition",
101
- "preposition"
139
+ "preposition",
140
+ false
102
141
  ],
103
142
  [
104
143
  "pronoun",
105
- "pronoun"
106
- ],
107
- [
108
- "property",
109
- "queryable"
144
+ "pronoun",
145
+ false
110
146
  ],
111
147
  [
112
148
  "property",
113
- "theAble"
149
+ "queryable",
150
+ false
114
151
  ],
115
152
  [
116
153
  "property",
117
- "unknown"
154
+ "theAble",
155
+ false
118
156
  ],
119
157
  [
120
158
  "punctuation",
121
- "punctuation"
159
+ "punctuation",
160
+ false
122
161
  ],
123
162
  [
124
163
  "queryable",
125
- "queryable"
164
+ "queryable",
165
+ false
126
166
  ],
127
167
  [
128
168
  "questionMark",
129
- "punctuation"
169
+ "punctuation",
170
+ false
130
171
  ],
131
172
  [
132
173
  "readonly",
133
- "queryable"
174
+ "queryable",
175
+ false
134
176
  ],
135
177
  [
136
178
  "reason",
137
- "queryable"
179
+ "queryable",
180
+ false
138
181
  ],
139
182
  [
140
183
  "reason",
141
- "theAble"
184
+ "theAble",
185
+ false
186
+ ],
187
+ [
188
+ "remember",
189
+ "verb",
190
+ false
191
+ ],
192
+ [
193
+ "stm_before",
194
+ "adjective",
195
+ false
142
196
  ],
143
197
  [
144
198
  "that",
145
- "thisitthat"
199
+ "thisitthat",
200
+ false
146
201
  ],
147
202
  [
148
203
  "the",
149
- "articlePOS"
204
+ "articlePOS",
205
+ false
150
206
  ],
151
207
  [
152
208
  "theAble",
153
- "theAble"
209
+ "queryable",
210
+ false
154
211
  ],
155
212
  [
156
213
  "this",
157
- "pronoun"
214
+ "pronoun",
215
+ false
158
216
  ],
159
217
  [
160
218
  "this",
161
- "queryable"
219
+ "queryable",
220
+ false
162
221
  ],
163
222
  [
164
223
  "this",
165
- "thisitthat"
224
+ "thisitthat",
225
+ false
166
226
  ],
167
227
  [
168
228
  "thisitthat",
169
- "queryable"
229
+ "queryable",
230
+ false
170
231
  ],
171
232
  [
172
233
  "to",
173
- "preposition"
234
+ "preposition",
235
+ false
174
236
  ],
175
237
  [
176
238
  "toAble",
177
- "toAble"
178
- ],
179
- [
180
- "unknown",
181
- "hierarchyAble"
182
- ],
183
- [
184
- "unknown",
185
- "notAble"
239
+ "toAble",
240
+ false
186
241
  ],
187
242
  [
188
243
  "unknown",
189
- "object"
244
+ "hierarchyAble",
245
+ false
190
246
  ],
191
247
  [
192
248
  "unknown",
193
- "queryable"
249
+ "queryable",
250
+ false
194
251
  ],
195
252
  [
196
253
  "unknown",
197
- "theAble"
254
+ "theAble",
255
+ false
198
256
  ],
199
257
  [
200
- "verby",
201
- "verby"
258
+ "verb",
259
+ "verb",
260
+ false
202
261
  ],
203
262
  [
204
263
  "what",
205
- "object"
264
+ "object",
265
+ false
206
266
  ],
207
267
  [
208
268
  "what",
209
- "queryable"
269
+ "queryable",
270
+ false
210
271
  ],
211
272
  [
212
273
  "whatAble",
213
- "queryable"
274
+ "queryable",
275
+ false
214
276
  ],
215
277
  [
216
278
  "whose",
217
- "object"
279
+ "object",
280
+ false
218
281
  ],
219
282
  [
220
283
  "xfx",
221
- "queryable"
284
+ "queryable",
285
+ false
222
286
  ]
223
287
  ],
224
288
  "metadata": {
@@ -230,15 +294,15 @@
230
294
  ],
231
295
  "ops": [
232
296
  [
233
- "the",
297
+ "is",
234
298
  0
235
299
  ],
236
300
  [
237
- "unknown",
301
+ "propertyOf",
238
302
  0
239
303
  ],
240
304
  [
241
- "propertyOf",
305
+ "the",
242
306
  0
243
307
  ],
244
308
  [
@@ -246,7 +310,7 @@
246
310
  0
247
311
  ],
248
312
  [
249
- "is",
313
+ "unknown",
250
314
  0
251
315
  ],
252
316
  [
@@ -263,7 +327,7 @@
263
327
  ],
264
328
  "ops": [
265
329
  [
266
- "the",
330
+ "is",
267
331
  0
268
332
  ],
269
333
  [
@@ -271,11 +335,11 @@
271
335
  0
272
336
  ],
273
337
  [
274
- "unknown",
338
+ "the",
275
339
  0
276
340
  ],
277
341
  [
278
- "is",
342
+ "unknown",
279
343
  0
280
344
  ],
281
345
  [
@@ -292,7 +356,7 @@
292
356
  ],
293
357
  "ops": [
294
358
  [
295
- "the",
359
+ "is",
296
360
  0
297
361
  ],
298
362
  [
@@ -300,7 +364,7 @@
300
364
  0
301
365
  ],
302
366
  [
303
- "is",
367
+ "the",
304
368
  0
305
369
  ],
306
370
  [
@@ -317,7 +381,7 @@
317
381
  ],
318
382
  "ops": [
319
383
  [
320
- "the",
384
+ "is",
321
385
  0
322
386
  ],
323
387
  [
@@ -325,7 +389,7 @@
325
389
  0
326
390
  ],
327
391
  [
328
- "is",
392
+ "the",
329
393
  0
330
394
  ]
331
395
  ],
@@ -338,11 +402,11 @@
338
402
  ],
339
403
  "ops": [
340
404
  [
341
- "propertyOf",
405
+ "is",
342
406
  0
343
407
  ],
344
408
  [
345
- "is",
409
+ "propertyOf",
346
410
  0
347
411
  ]
348
412
  ],
@@ -354,13 +418,13 @@
354
418
  1
355
419
  ],
356
420
  "ops": [
357
- [
358
- "propertyOf",
359
- 1
360
- ],
361
421
  [
362
422
  "is",
363
423
  0
424
+ ],
425
+ [
426
+ "propertyOf",
427
+ 1
364
428
  ]
365
429
  ],
366
430
  "counter": 6
@@ -432,7 +496,7 @@
432
496
  "value": "object1",
433
497
  "unknown": true,
434
498
  "text": "object1",
435
- "marker": "unknown",
499
+ "marker": "object",
436
500
  "word": "object1",
437
501
  "range": {
438
502
  "start": 17,
@@ -440,7 +504,7 @@
440
504
  },
441
505
  "dead": true,
442
506
  "types": [
443
- "unknown"
507
+ "object"
444
508
  ],
445
509
  "level": 1
446
510
  },
@@ -474,7 +538,7 @@
474
538
  "value": "object1",
475
539
  "unknown": true,
476
540
  "text": "object1",
477
- "marker": "unknown",
541
+ "marker": "object",
478
542
  "word": "object1",
479
543
  "range": {
480
544
  "start": 17,
@@ -482,7 +546,7 @@
482
546
  },
483
547
  "dead": true,
484
548
  "types": [
485
- "unknown"
549
+ "object"
486
550
  ],
487
551
  "level": 1
488
552
  }