tpmkms_4wp 9.5.1-beta.9 → 9.6.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 (87) hide show
  1. package/common/asking.js +12 -4
  2. package/common/avatar.test.json +1001 -860
  3. package/common/can.instance.json +2162 -5
  4. package/common/can.js +101 -35
  5. package/common/can.test.json +51307 -0
  6. package/common/colors.instance.json +2 -30
  7. package/common/comparable.instance.json +1 -1
  8. package/common/concept.js +25 -27
  9. package/common/concept.test.json +142 -120
  10. package/common/conjunction.test.json +32 -42
  11. package/common/crew.instance.json +163 -113
  12. package/common/dateTimeSelectors.instance.json +2 -2
  13. package/common/dateTimeSelectors.js +3 -3
  14. package/common/dateTimeSelectors.test.json +76935 -35739
  15. package/common/dates.instance.json +0 -84
  16. package/common/dates.test.json +284 -287
  17. package/common/dialogues.js +31 -112
  18. package/common/dialogues.test.json +1171 -996
  19. package/common/dimension.instance.json +21374 -562
  20. package/common/dimension.js +145 -51
  21. package/common/dimension.test.json +8753 -3495
  22. package/common/drone.instance.json +23712 -0
  23. package/common/drone.js +448 -0
  24. package/common/drone.test.json +66665 -0
  25. package/common/edible.instance.json +9 -65
  26. package/common/emotions.instance.json +47 -70
  27. package/common/errors.js +3 -3
  28. package/common/fastfood.instance.json +758 -266
  29. package/common/fastfood.js +7 -7
  30. package/common/fastfood.test.json +6970 -6829
  31. package/common/gdefaults.js +58 -13
  32. package/common/help.js +9 -9
  33. package/common/help.test.json +65 -11
  34. package/common/helpers/dialogues.js +6 -1
  35. package/common/helpers/properties.js +36 -16
  36. package/common/helpers.js +32 -2
  37. package/common/hierarchy.js +3 -1
  38. package/common/kirk.test.json +600 -424
  39. package/common/latin.instance.json +10 -10
  40. package/common/latin.js +5 -5
  41. package/common/length.instance.json +27611 -2889
  42. package/common/length.js +6 -1
  43. package/common/length.test.json +45315 -3925
  44. package/common/math.instance.json +1 -1
  45. package/common/menus.instance.json +4 -7
  46. package/common/menus.js +1 -8
  47. package/common/meta.js +1 -0
  48. package/common/nameable.js +13 -6
  49. package/common/nameable.test.json +436 -0
  50. package/common/numbers.js +1 -1
  51. package/common/ordering.instance.json +4 -2
  52. package/common/ordering.test.json +104 -174
  53. package/common/people.instance.json +60 -315
  54. package/common/pipboy.instance.json +1 -57
  55. package/common/pokemon.instance.json +5 -5
  56. package/common/pressure.instance.json +3959 -1990
  57. package/common/pressure.test.json +433 -477
  58. package/common/properties.instance.json +5 -16
  59. package/common/properties.js +3 -3
  60. package/common/properties.test.json +9565 -6951
  61. package/common/rates.instance.json +59 -0
  62. package/common/rates.js +97 -0
  63. package/common/rates.test.json +27702 -0
  64. package/common/reminders.js +2 -2
  65. package/common/reminders.test.json +64635 -25787
  66. package/common/reports.instance.json +2 -2
  67. package/common/spock.test.json +606 -430
  68. package/common/stm.js +13 -2
  69. package/common/temperature.instance.json +3658 -1689
  70. package/common/temperature.test.json +433 -477
  71. package/common/time.instance.json +24762 -0
  72. package/common/time.js +135 -139
  73. package/common/time.test.json +31876 -3757
  74. package/common/ui.instance.json +2 -5
  75. package/common/ui.js +1 -8
  76. package/common/weight.instance.json +10359 -4077
  77. package/common/weight.test.json +2601 -2263
  78. package/common/words.instance.json +9 -0
  79. package/common/words.js +53 -0
  80. package/common/words.test.json +2 -0
  81. package/common/wp.instance.json +330 -58
  82. package/common/wp.js +4 -0
  83. package/common/wp.test.json +7385 -6906
  84. package/main.js +4 -2
  85. package/package.json +16 -5
  86. package/common/listener.js +0 -50
  87. package/common/listener.test.json +0 -142
@@ -0,0 +1,9 @@
1
+ {
2
+ "configs": [],
3
+ "resultss": [],
4
+ "fragments": [],
5
+ "semantics": [],
6
+ "associations": [],
7
+ "summaries": [],
8
+ "learned_contextual_priorities": []
9
+ }
@@ -0,0 +1,53 @@
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
+ const { defaultContextCheck } = require('./helpers')
3
+ const words_tests = require('./words.test.json')
4
+ const words_instance = require('./words.instance.json')
5
+ const tokenize = require('./tokenize')
6
+
7
+ function initializer({objects, config, isModule}) {
8
+ objects.words = []
9
+ config.addArgs((args) => ({
10
+ getWordFromDictionary: (partial) => {
11
+ for (const word of objects.words) {
12
+ let matches = true
13
+ for (const key in partial) {
14
+ if (partial[key] !== word[key]) {
15
+ matches = false
16
+ }
17
+ }
18
+ if (matches) {
19
+ return word
20
+ }
21
+ }
22
+ },
23
+ addWordToDictionary: (context) => {
24
+ objects.words.push(context)
25
+ }
26
+ }))
27
+ }
28
+
29
+ const template = {
30
+ configs: [],
31
+ fragments: [],
32
+ }
33
+
34
+ knowledgeModule( {
35
+ config: { name: 'words' },
36
+ includes: [tokenize],
37
+ initializer,
38
+
39
+ module,
40
+ description: 'talking about words',
41
+ test: {
42
+ name: './words.test.json',
43
+ contents: words_tests,
44
+ checks: {
45
+ context: [defaultContextCheck()],
46
+ }
47
+ },
48
+ template: {
49
+ template,
50
+ instance: words_instance,
51
+ },
52
+
53
+ })
@@ -0,0 +1,2 @@
1
+ [
2
+ ]
@@ -111,6 +111,54 @@
111
111
  "increment": true
112
112
  }
113
113
  },
114
+ {
115
+ "context": [
116
+ [
117
+ "style_wp",
118
+ 0
119
+ ],
120
+ [
121
+ "the",
122
+ 0
123
+ ],
124
+ [
125
+ "ordinal",
126
+ 1
127
+ ],
128
+ [
129
+ "word_wp",
130
+ 0
131
+ ],
132
+ [
133
+ "statefulElementInContext_wp",
134
+ 0
135
+ ],
136
+ [
137
+ "the",
138
+ 0
139
+ ],
140
+ [
141
+ "ordinal",
142
+ 0
143
+ ],
144
+ [
145
+ "list",
146
+ 0
147
+ ],
148
+ [
149
+ "ordinal",
150
+ 0
151
+ ],
152
+ [
153
+ "paragraph_wp",
154
+ 0
155
+ ]
156
+ ],
157
+ "choose": {
158
+ "index": 0,
159
+ "increment": true
160
+ }
161
+ },
114
162
  {
115
163
  "context": [
116
164
  [
@@ -207,6 +255,86 @@
207
255
  "increment": true
208
256
  }
209
257
  },
258
+ {
259
+ "context": [
260
+ [
261
+ "style_wp",
262
+ 0
263
+ ],
264
+ [
265
+ "the",
266
+ 0
267
+ ],
268
+ [
269
+ "word_wp",
270
+ 0
271
+ ],
272
+ [
273
+ "statefulElementInContext_wp",
274
+ 0
275
+ ],
276
+ [
277
+ "the",
278
+ 0
279
+ ],
280
+ [
281
+ "ordinal",
282
+ 0
283
+ ],
284
+ [
285
+ "list",
286
+ 0
287
+ ],
288
+ [
289
+ "ordinal",
290
+ 0
291
+ ],
292
+ [
293
+ "paragraph_wp",
294
+ 0
295
+ ]
296
+ ],
297
+ "choose": {
298
+ "index": 0,
299
+ "increment": true
300
+ }
301
+ },
302
+ {
303
+ "context": [
304
+ [
305
+ "style_wp",
306
+ 0
307
+ ],
308
+ [
309
+ "the",
310
+ 0
311
+ ],
312
+ [
313
+ "word_wp",
314
+ 0
315
+ ],
316
+ [
317
+ "statefulElementInContext_wp",
318
+ 0
319
+ ],
320
+ [
321
+ "the",
322
+ 0
323
+ ],
324
+ [
325
+ "ordinal",
326
+ 1
327
+ ],
328
+ [
329
+ "paragraph_wp",
330
+ 0
331
+ ]
332
+ ],
333
+ "choose": {
334
+ "index": 0,
335
+ "increment": true
336
+ }
337
+ },
210
338
  {
211
339
  "context": [
212
340
  [
@@ -375,6 +503,42 @@
375
503
  "increment": true
376
504
  }
377
505
  },
506
+ {
507
+ "context": [
508
+ [
509
+ "style_wp",
510
+ 0
511
+ ],
512
+ [
513
+ "the",
514
+ 0
515
+ ],
516
+ [
517
+ "word_wp",
518
+ 0
519
+ ],
520
+ [
521
+ "statefulElementInContext_wp",
522
+ 0
523
+ ],
524
+ [
525
+ "the",
526
+ 0
527
+ ],
528
+ [
529
+ "ordinal",
530
+ 0
531
+ ],
532
+ [
533
+ "paragraph_wp",
534
+ 0
535
+ ]
536
+ ],
537
+ "choose": {
538
+ "index": 0,
539
+ "increment": true
540
+ }
541
+ },
378
542
  {
379
543
  "context": [
380
544
  [
@@ -24903,20 +25067,6 @@
24903
25067
  0
24904
25068
  ]
24905
25069
  ],
24906
- [
24907
- [
24908
- "is",
24909
- 0
24910
- ],
24911
- [
24912
- "list",
24913
- 1
24914
- ],
24915
- [
24916
- "unknown",
24917
- 0
24918
- ]
24919
- ],
24920
25070
  [
24921
25071
  [
24922
25072
  "is",
@@ -48307,20 +48457,6 @@
48307
48457
  0
48308
48458
  ]
48309
48459
  ],
48310
- [
48311
- [
48312
- "is",
48313
- 0
48314
- ],
48315
- [
48316
- "list",
48317
- 1
48318
- ],
48319
- [
48320
- "unknown",
48321
- 0
48322
- ]
48323
- ],
48324
48460
  [
48325
48461
  [
48326
48462
  "is",
@@ -53613,6 +53749,54 @@
53613
53749
  "increment": true
53614
53750
  }
53615
53751
  },
53752
+ {
53753
+ "context": [
53754
+ [
53755
+ "style_wp",
53756
+ 0
53757
+ ],
53758
+ [
53759
+ "the",
53760
+ 0
53761
+ ],
53762
+ [
53763
+ "ordinal",
53764
+ 1
53765
+ ],
53766
+ [
53767
+ "word_wp",
53768
+ 0
53769
+ ],
53770
+ [
53771
+ "statefulElementInContext_wp",
53772
+ 0
53773
+ ],
53774
+ [
53775
+ "the",
53776
+ 0
53777
+ ],
53778
+ [
53779
+ "ordinal",
53780
+ 0
53781
+ ],
53782
+ [
53783
+ "list",
53784
+ 0
53785
+ ],
53786
+ [
53787
+ "ordinal",
53788
+ 0
53789
+ ],
53790
+ [
53791
+ "paragraph_wp",
53792
+ 0
53793
+ ]
53794
+ ],
53795
+ "choose": {
53796
+ "index": 0,
53797
+ "increment": true
53798
+ }
53799
+ },
53616
53800
  {
53617
53801
  "context": [
53618
53802
  [
@@ -53709,6 +53893,86 @@
53709
53893
  "increment": true
53710
53894
  }
53711
53895
  },
53896
+ {
53897
+ "context": [
53898
+ [
53899
+ "style_wp",
53900
+ 0
53901
+ ],
53902
+ [
53903
+ "the",
53904
+ 0
53905
+ ],
53906
+ [
53907
+ "word_wp",
53908
+ 0
53909
+ ],
53910
+ [
53911
+ "statefulElementInContext_wp",
53912
+ 0
53913
+ ],
53914
+ [
53915
+ "the",
53916
+ 0
53917
+ ],
53918
+ [
53919
+ "ordinal",
53920
+ 0
53921
+ ],
53922
+ [
53923
+ "list",
53924
+ 0
53925
+ ],
53926
+ [
53927
+ "ordinal",
53928
+ 0
53929
+ ],
53930
+ [
53931
+ "paragraph_wp",
53932
+ 0
53933
+ ]
53934
+ ],
53935
+ "choose": {
53936
+ "index": 0,
53937
+ "increment": true
53938
+ }
53939
+ },
53940
+ {
53941
+ "context": [
53942
+ [
53943
+ "style_wp",
53944
+ 0
53945
+ ],
53946
+ [
53947
+ "the",
53948
+ 0
53949
+ ],
53950
+ [
53951
+ "word_wp",
53952
+ 0
53953
+ ],
53954
+ [
53955
+ "statefulElementInContext_wp",
53956
+ 0
53957
+ ],
53958
+ [
53959
+ "the",
53960
+ 0
53961
+ ],
53962
+ [
53963
+ "ordinal",
53964
+ 1
53965
+ ],
53966
+ [
53967
+ "paragraph_wp",
53968
+ 0
53969
+ ]
53970
+ ],
53971
+ "choose": {
53972
+ "index": 0,
53973
+ "increment": true
53974
+ }
53975
+ },
53712
53976
  {
53713
53977
  "context": [
53714
53978
  [
@@ -53877,6 +54141,42 @@
53877
54141
  "increment": true
53878
54142
  }
53879
54143
  },
54144
+ {
54145
+ "context": [
54146
+ [
54147
+ "style_wp",
54148
+ 0
54149
+ ],
54150
+ [
54151
+ "the",
54152
+ 0
54153
+ ],
54154
+ [
54155
+ "word_wp",
54156
+ 0
54157
+ ],
54158
+ [
54159
+ "statefulElementInContext_wp",
54160
+ 0
54161
+ ],
54162
+ [
54163
+ "the",
54164
+ 0
54165
+ ],
54166
+ [
54167
+ "ordinal",
54168
+ 0
54169
+ ],
54170
+ [
54171
+ "paragraph_wp",
54172
+ 0
54173
+ ]
54174
+ ],
54175
+ "choose": {
54176
+ "index": 0,
54177
+ "increment": true
54178
+ }
54179
+ },
53880
54180
  {
53881
54181
  "context": [
53882
54182
  [
@@ -54255,10 +54555,10 @@
54255
54555
  ],
54256
54556
  "semantics": [
54257
54557
  {
54258
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:395"
54558
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:399"
54259
54559
  },
54260
54560
  {
54261
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:404"
54561
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:408"
54262
54562
  }
54263
54563
  ],
54264
54564
  "priorities": [
@@ -55031,34 +55331,6 @@
55031
55331
  0
55032
55332
  ]
55033
55333
  ],
55034
- [
55035
- [
55036
- "is",
55037
- 0
55038
- ],
55039
- [
55040
- "list",
55041
- 1
55042
- ],
55043
- [
55044
- "unknown",
55045
- 0
55046
- ]
55047
- ],
55048
- [
55049
- [
55050
- "is",
55051
- 0
55052
- ],
55053
- [
55054
- "list",
55055
- 1
55056
- ],
55057
- [
55058
- "unknown",
55059
- 0
55060
- ]
55061
- ],
55062
55334
  [
55063
55335
  [
55064
55336
  "is",
package/common/wp.js CHANGED
@@ -246,8 +246,11 @@ template = {
246
246
  { context: [["style_wp", 0], ["the", 0], ["letter_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 1], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
247
247
 
248
248
  { context: [["style_wp", 0], ["the", 0], ["ordinal", 0], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
249
+ { context: [["style_wp", 0], ["the", 0], ["ordinal", 1], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
249
250
  { context: [["style_wp", 1], ["the", 0], ["ordinal", 0], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
250
251
  { context: [["style_wp", 1], ["the", 0], ["ordinal", 1], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
252
+ { context: [["style_wp", 0], ["the", 0], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
253
+ { context: [["style_wp", 0], ["the", 0], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 1], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
251
254
  {
252
255
  context: [
253
256
  ["style_wp", 1], ["the", 0], ["ordinal", 1], ["word_wp", 1], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]
@@ -266,6 +269,7 @@ template = {
266
269
  },
267
270
 
268
271
  { context: [["style_wp", 1], ["the", 0], ["ordinal", 1], ["word_wp", 1], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["list", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
272
+ { context: [["style_wp", 0], ["the", 0], ["word_wp", 0], ["statefulElementInContext_wp", 0], ["the", 0], ["ordinal", 0], ["paragraph_wp", 0]], choose: { index: 0, increment: true } },
269
273
 
270
274
  { context: [["word_wp",1],["thatVerb",0],["wordComparison_wp",0],["unknown",0]], choose: 0 },
271
275
  { context: [["paragraph_wp",1],["thatVerb",0],["paragraphComparisonVerb_wp",0],["unknown",0]], choose: 0 },