tpmkms_4wp 9.5.1 → 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 (122) hide show
  1. package/common/animals.instance.json +21 -61
  2. package/common/asking.js +116 -106
  3. package/common/avatar.test.json +1001 -860
  4. package/common/can.instance.json +2174 -0
  5. package/common/can.js +254 -0
  6. package/common/can.test.json +51307 -0
  7. package/common/characters.js +5 -5
  8. package/common/colors.instance.json +12 -12
  9. package/common/comparable.instance.json +3 -3
  10. package/common/concept.js +25 -27
  11. package/common/concept.test.json +180 -144
  12. package/common/conjunction.js +13 -5
  13. package/common/conjunction.test.json +32 -42
  14. package/common/crew.instance.json +196 -160
  15. package/common/crew.js +1 -1
  16. package/common/crew.test.json +4148 -3324
  17. package/common/currency.js +1 -1
  18. package/common/dateTimeSelectors.instance.json +2 -2
  19. package/common/dateTimeSelectors.js +3 -3
  20. package/common/dateTimeSelectors.test.json +76935 -35739
  21. package/common/dates.instance.json +3 -3
  22. package/common/dates.test.json +284 -287
  23. package/common/dialogues.js +41 -119
  24. package/common/dialogues.test.json +1171 -996
  25. package/common/dimension.instance.json +21369 -557
  26. package/common/dimension.js +148 -54
  27. package/common/dimension.test.json +8753 -3495
  28. package/common/drone.instance.json +23712 -0
  29. package/common/drone.js +448 -0
  30. package/common/drone.test.json +66665 -0
  31. package/common/edible.instance.json +32 -32
  32. package/common/emotions.instance.json +75 -76
  33. package/common/emotions.js +1 -1
  34. package/common/emotions.test.json +242 -174
  35. package/common/english_helpers.js +336 -0
  36. package/common/errors.js +6 -6
  37. package/common/evaluate.js +2 -2
  38. package/common/events.js +8 -8
  39. package/common/fastfood.instance.json +389 -245
  40. package/common/fastfood.js +11 -11
  41. package/common/fastfood.test.json +6970 -6829
  42. package/common/formulas.instance.json +1 -1
  43. package/common/formulas.js +1 -1
  44. package/common/gdefaults.js +111 -17
  45. package/common/help.js +12 -12
  46. package/common/help.test.json +65 -11
  47. package/common/helpers/concept.js +1 -1
  48. package/common/helpers/conjunction.js +54 -44
  49. package/common/helpers/dateTimeSelectors.js +2 -2
  50. package/common/helpers/dialogues.js +7 -2
  51. package/common/helpers/formulas.js +13 -11
  52. package/common/helpers/menus.js +12 -12
  53. package/common/helpers/meta.js +9 -9
  54. package/common/helpers/properties.js +185 -62
  55. package/common/helpers.js +167 -48
  56. package/common/hierarchy.js +6 -4
  57. package/common/kirk.instance.json +1 -1
  58. package/common/kirk.test.json +600 -424
  59. package/common/latin.instance.json +12 -12
  60. package/common/latin.js +9 -9
  61. package/common/length.instance.json +27612 -2890
  62. package/common/length.js +6 -1
  63. package/common/length.test.json +45315 -3925
  64. package/common/math.instance.json +29 -29
  65. package/common/math.js +47 -46
  66. package/common/menus.instance.json +7 -10
  67. package/common/menus.js +2 -9
  68. package/common/meta.js +77 -60
  69. package/common/nameable.js +20 -13
  70. package/common/nameable.test.json +436 -0
  71. package/common/numbers.js +1 -1
  72. package/common/ordering.instance.json +87 -19
  73. package/common/ordering.js +1 -1
  74. package/common/ordering.test.json +835 -417
  75. package/common/people.instance.json +96 -348
  76. package/common/people.js +6 -4
  77. package/common/people.test.json +4135 -3606
  78. package/common/pipboy.instance.json +17 -17
  79. package/common/pipboy.js +2 -3
  80. package/common/pokemon.instance.json +13 -13
  81. package/common/pokemon.js +1 -1
  82. package/common/pressure.instance.json +3579 -1610
  83. package/common/pressure.test.json +433 -477
  84. package/common/properties.instance.json +6 -17
  85. package/common/properties.js +25 -7
  86. package/common/properties.test.json +9565 -6951
  87. package/common/rates.instance.json +59 -0
  88. package/common/rates.js +97 -0
  89. package/common/rates.test.json +27702 -0
  90. package/common/reminders.instance.json +4 -4
  91. package/common/reminders.js +5 -5
  92. package/common/reminders.test.json +64635 -25787
  93. package/common/reports.instance.json +3 -3
  94. package/common/reports.js +18 -16
  95. package/common/scorekeeper.js +6 -6
  96. package/common/sdefaults.js +22 -2
  97. package/common/spock.instance.json +1 -1
  98. package/common/spock.test.json +606 -430
  99. package/common/stgame.js +1 -1
  100. package/common/stm.js +17 -6
  101. package/common/tell.js +1 -1
  102. package/common/temperature.instance.json +3659 -1690
  103. package/common/temperature.test.json +433 -477
  104. package/common/tester.js +3 -3
  105. package/common/time.instance.json +24762 -0
  106. package/common/time.js +137 -141
  107. package/common/time.test.json +31876 -3757
  108. package/common/tokenize.js +5 -2
  109. package/common/ui.instance.json +2 -5
  110. package/common/ui.js +1 -8
  111. package/common/weight.instance.json +10360 -4078
  112. package/common/weight.test.json +2601 -2263
  113. package/common/words.instance.json +9 -0
  114. package/common/words.js +53 -0
  115. package/common/words.test.json +2 -0
  116. package/common/wp.instance.json +408 -8
  117. package/common/wp.js +8 -4
  118. package/common/wp.test.json +7385 -6906
  119. package/main.js +4 -2
  120. package/package.json +20 -5
  121. package/common/listener.js +0 -50
  122. 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
+ ]
@@ -37,10 +37,94 @@
37
37
  "the",
38
38
  0
39
39
  ],
40
+ [
41
+ "letter_wp",
42
+ 0
43
+ ],
44
+ [
45
+ "statefulElementInContext_wp",
46
+ 0
47
+ ],
48
+ [
49
+ "the",
50
+ 0
51
+ ],
52
+ [
53
+ "ordinal",
54
+ 1
55
+ ],
56
+ [
57
+ "paragraph_wp",
58
+ 0
59
+ ]
60
+ ],
61
+ "choose": {
62
+ "index": 0,
63
+ "increment": true
64
+ }
65
+ },
66
+ {
67
+ "context": [
68
+ [
69
+ "style_wp",
70
+ 0
71
+ ],
72
+ [
73
+ "the",
74
+ 0
75
+ ],
76
+ [
77
+ "ordinal",
78
+ 0
79
+ ],
80
+ [
81
+ "word_wp",
82
+ 0
83
+ ],
84
+ [
85
+ "statefulElementInContext_wp",
86
+ 0
87
+ ],
88
+ [
89
+ "the",
90
+ 0
91
+ ],
40
92
  [
41
93
  "ordinal",
42
94
  0
43
95
  ],
96
+ [
97
+ "list",
98
+ 0
99
+ ],
100
+ [
101
+ "ordinal",
102
+ 0
103
+ ],
104
+ [
105
+ "paragraph_wp",
106
+ 0
107
+ ]
108
+ ],
109
+ "choose": {
110
+ "index": 0,
111
+ "increment": true
112
+ }
113
+ },
114
+ {
115
+ "context": [
116
+ [
117
+ "style_wp",
118
+ 0
119
+ ],
120
+ [
121
+ "the",
122
+ 0
123
+ ],
124
+ [
125
+ "ordinal",
126
+ 1
127
+ ],
44
128
  [
45
129
  "word_wp",
46
130
  0
@@ -171,6 +255,86 @@
171
255
  "increment": true
172
256
  }
173
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
+ },
174
338
  {
175
339
  "context": [
176
340
  [
@@ -339,6 +503,42 @@
339
503
  "increment": true
340
504
  }
341
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
+ },
342
542
  {
343
543
  "context": [
344
544
  [
@@ -6541,7 +6741,7 @@
6541
6741
  "word": "words",
6542
6742
  "range": {
6543
6743
  "start": 0,
6544
- "end": 78
6744
+ "end": 4
6545
6745
  },
6546
6746
  "dead": true,
6547
6747
  "types": [
@@ -10321,7 +10521,7 @@
10321
10521
  "word": "characters",
10322
10522
  "range": {
10323
10523
  "start": 0,
10324
- "end": 68
10524
+ "end": 9
10325
10525
  },
10326
10526
  "dead": true,
10327
10527
  "types": [
@@ -13923,7 +14123,7 @@
13923
14123
  "word": "paragraphs",
13924
14124
  "range": {
13925
14125
  "start": 0,
13926
- "end": 82
14126
+ "end": 9
13927
14127
  },
13928
14128
  "dead": true,
13929
14129
  "types": [
@@ -17692,7 +17892,7 @@
17692
17892
  "word": "text",
17693
17893
  "range": {
17694
17894
  "start": 0,
17695
- "end": 24
17895
+ "end": 3
17696
17896
  },
17697
17897
  "dead": true,
17698
17898
  "types": [
@@ -24624,7 +24824,7 @@
24624
24824
  "text": "bold, italic, code, capitalize, lowercase and underline",
24625
24825
  "range": {
24626
24826
  "start": 0,
24627
- "end": 65
24827
+ "end": 54
24628
24828
  },
24629
24829
  "types": [
24630
24830
  "list",
@@ -47982,7 +48182,7 @@
47982
48182
  "text": "uppercased, lowercased, capitalized, bolded, italicized and underlined",
47983
48183
  "range": {
47984
48184
  "start": 0,
47985
- "end": 88
48185
+ "end": 69
47986
48186
  },
47987
48187
  "types": [
47988
48188
  "capitalized_wp",
@@ -53475,10 +53675,94 @@
53475
53675
  "the",
53476
53676
  0
53477
53677
  ],
53678
+ [
53679
+ "letter_wp",
53680
+ 0
53681
+ ],
53682
+ [
53683
+ "statefulElementInContext_wp",
53684
+ 0
53685
+ ],
53686
+ [
53687
+ "the",
53688
+ 0
53689
+ ],
53690
+ [
53691
+ "ordinal",
53692
+ 1
53693
+ ],
53694
+ [
53695
+ "paragraph_wp",
53696
+ 0
53697
+ ]
53698
+ ],
53699
+ "choose": {
53700
+ "index": 0,
53701
+ "increment": true
53702
+ }
53703
+ },
53704
+ {
53705
+ "context": [
53706
+ [
53707
+ "style_wp",
53708
+ 0
53709
+ ],
53710
+ [
53711
+ "the",
53712
+ 0
53713
+ ],
53714
+ [
53715
+ "ordinal",
53716
+ 0
53717
+ ],
53718
+ [
53719
+ "word_wp",
53720
+ 0
53721
+ ],
53722
+ [
53723
+ "statefulElementInContext_wp",
53724
+ 0
53725
+ ],
53726
+ [
53727
+ "the",
53728
+ 0
53729
+ ],
53478
53730
  [
53479
53731
  "ordinal",
53480
53732
  0
53481
53733
  ],
53734
+ [
53735
+ "list",
53736
+ 0
53737
+ ],
53738
+ [
53739
+ "ordinal",
53740
+ 0
53741
+ ],
53742
+ [
53743
+ "paragraph_wp",
53744
+ 0
53745
+ ]
53746
+ ],
53747
+ "choose": {
53748
+ "index": 0,
53749
+ "increment": true
53750
+ }
53751
+ },
53752
+ {
53753
+ "context": [
53754
+ [
53755
+ "style_wp",
53756
+ 0
53757
+ ],
53758
+ [
53759
+ "the",
53760
+ 0
53761
+ ],
53762
+ [
53763
+ "ordinal",
53764
+ 1
53765
+ ],
53482
53766
  [
53483
53767
  "word_wp",
53484
53768
  0
@@ -53609,6 +53893,86 @@
53609
53893
  "increment": true
53610
53894
  }
53611
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
+ },
53612
53976
  {
53613
53977
  "context": [
53614
53978
  [
@@ -53777,6 +54141,42 @@
53777
54141
  "increment": true
53778
54142
  }
53779
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
+ },
53780
54180
  {
53781
54181
  "context": [
53782
54182
  [
@@ -54155,10 +54555,10 @@
54155
54555
  ],
54156
54556
  "semantics": [
54157
54557
  {
54158
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:393"
54558
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:399"
54159
54559
  },
54160
54560
  {
54161
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:402"
54561
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:408"
54162
54562
  }
54163
54563
  ],
54164
54564
  "priorities": [
package/common/wp.js CHANGED
@@ -115,11 +115,11 @@ class API {
115
115
  }
116
116
  }
117
117
 
118
- const root = (id) => {
118
+ function root(id) {
119
119
  return id.split('_')[0]
120
120
  }
121
121
 
122
- const setUpdate = (isA, update, states) => {
122
+ function setUpdate(isA, update, states) {
123
123
  let color;
124
124
  const styles = []
125
125
  for (const state of states) {
@@ -146,10 +146,10 @@ const config = {
146
146
  name: 'wp',
147
147
  };
148
148
 
149
- const changeState = ({api, isA, context, toArray, element, state}) => {
149
+ function changeState({api, isA, context, toArray, element, state}) {
150
150
  let scope
151
151
 
152
- const getElement = (selector, update) => {
152
+ function getElement(selector, update) {
153
153
  const unit = root(selector.marker)
154
154
  const conditions = []
155
155
  let scope;
@@ -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 },