tpmkms_4wp 9.5.1-beta.3 → 9.5.1-beta.31

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 (114) hide show
  1. package/common/animals.instance.json +21 -61
  2. package/common/asking.js +112 -102
  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 +3 -3
  8. package/common/colors.instance.json +10 -10
  9. package/common/comparable.instance.json +2 -2
  10. package/common/concept.js +19 -22
  11. package/common/concept.test.json +54 -40
  12. package/common/conjunction.js +13 -5
  13. package/common/conjunction.test.json +32 -42
  14. package/common/crew.instance.json +164 -150
  15. package/common/crew.js +1 -1
  16. package/common/currency.js +1 -1
  17. package/common/dateTimeSelectors.instance.json +2 -2
  18. package/common/dateTimeSelectors.js +3 -3
  19. package/common/dateTimeSelectors.test.json +76935 -35739
  20. package/common/dates.instance.json +3 -3
  21. package/common/dates.test.json +284 -287
  22. package/common/dialogues.js +41 -119
  23. package/common/dialogues.test.json +1171 -996
  24. package/common/dimension.instance.json +21374 -562
  25. package/common/dimension.js +145 -51
  26. package/common/dimension.test.json +8753 -3495
  27. package/common/drone.instance.json +23710 -0
  28. package/common/drone.js +429 -0
  29. package/common/drone.test.json +61113 -0
  30. package/common/edible.instance.json +23 -95
  31. package/common/emotions.instance.json +53 -80
  32. package/common/emotions.js +1 -1
  33. package/common/english_helpers.js +277 -67
  34. package/common/fastfood.instance.json +180 -372
  35. package/common/fastfood.js +4 -4
  36. package/common/fastfood.test.json +6970 -6829
  37. package/common/formulas.instance.json +1 -1
  38. package/common/gdefaults.js +94 -17
  39. package/common/help.js +11 -11
  40. package/common/help.test.json +65 -11
  41. package/common/helpers/concept.js +1 -1
  42. package/common/helpers/conjunction.js +54 -44
  43. package/common/helpers/dateTimeSelectors.js +2 -2
  44. package/common/helpers/dialogues.js +7 -2
  45. package/common/helpers/formulas.js +13 -11
  46. package/common/helpers/menus.js +12 -12
  47. package/common/helpers/meta.js +8 -8
  48. package/common/helpers/properties.js +104 -23
  49. package/common/helpers.js +114 -48
  50. package/common/hierarchy.js +6 -4
  51. package/common/kirk.instance.json +1 -1
  52. package/common/kirk.test.json +600 -424
  53. package/common/latin.instance.json +10 -10
  54. package/common/latin.js +5 -5
  55. package/common/length.instance.json +27612 -2890
  56. package/common/length.js +6 -1
  57. package/common/length.test.json +45315 -3925
  58. package/common/math.instance.json +20 -20
  59. package/common/math.js +45 -44
  60. package/common/menus.instance.json +6 -9
  61. package/common/menus.js +2 -9
  62. package/common/meta.js +50 -33
  63. package/common/nameable.js +13 -6
  64. package/common/nameable.test.json +436 -0
  65. package/common/numbers.js +1 -1
  66. package/common/ordering.instance.json +20 -30
  67. package/common/ordering.js +1 -1
  68. package/common/ordering.test.json +414 -426
  69. package/common/people.instance.json +82 -348
  70. package/common/people.js +1 -1
  71. package/common/people.test.json +952 -681
  72. package/common/pipboy.instance.json +16 -16
  73. package/common/pokemon.instance.json +8 -8
  74. package/common/pokemon.js +1 -1
  75. package/common/pressure.instance.json +3579 -1610
  76. package/common/pressure.test.json +433 -477
  77. package/common/properties.instance.json +6 -17
  78. package/common/properties.js +19 -6
  79. package/common/properties.test.json +8746 -6638
  80. package/common/rates.instance.json +59 -0
  81. package/common/rates.js +97 -0
  82. package/common/rates.test.json +27702 -0
  83. package/common/reminders.js +1 -1
  84. package/common/reminders.test.json +64635 -25787
  85. package/common/reports.instance.json +3 -3
  86. package/common/reports.js +18 -16
  87. package/common/scorekeeper.js +4 -4
  88. package/common/sdefaults.js +22 -2
  89. package/common/spock.instance.json +1 -1
  90. package/common/spock.test.json +606 -430
  91. package/common/stgame.js +1 -1
  92. package/common/stm.js +15 -4
  93. package/common/tell.js +1 -1
  94. package/common/temperature.instance.json +3786 -1705
  95. package/common/temperature.test.json +433 -477
  96. package/common/tester.js +3 -3
  97. package/common/time.instance.json +24762 -0
  98. package/common/time.js +137 -141
  99. package/common/time.test.json +31876 -3757
  100. package/common/tokenize.js +1 -1
  101. package/common/ui.instance.json +2 -5
  102. package/common/ui.js +1 -8
  103. package/common/weight.instance.json +10359 -4077
  104. package/common/weight.test.json +2601 -2263
  105. package/common/words.instance.json +9 -0
  106. package/common/words.js +53 -0
  107. package/common/words.test.json +2 -0
  108. package/common/wp.instance.json +336 -8
  109. package/common/wp.js +8 -4
  110. package/common/wp.test.json +7385 -6906
  111. package/main.js +4 -2
  112. package/package.json +18 -5
  113. package/common/listener.js +0 -50
  114. 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
  [
@@ -6577,7 +6741,7 @@
6577
6741
  "word": "words",
6578
6742
  "range": {
6579
6743
  "start": 0,
6580
- "end": 78
6744
+ "end": 4
6581
6745
  },
6582
6746
  "dead": true,
6583
6747
  "types": [
@@ -10357,7 +10521,7 @@
10357
10521
  "word": "characters",
10358
10522
  "range": {
10359
10523
  "start": 0,
10360
- "end": 68
10524
+ "end": 9
10361
10525
  },
10362
10526
  "dead": true,
10363
10527
  "types": [
@@ -13959,7 +14123,7 @@
13959
14123
  "word": "paragraphs",
13960
14124
  "range": {
13961
14125
  "start": 0,
13962
- "end": 82
14126
+ "end": 9
13963
14127
  },
13964
14128
  "dead": true,
13965
14129
  "types": [
@@ -17728,7 +17892,7 @@
17728
17892
  "word": "text",
17729
17893
  "range": {
17730
17894
  "start": 0,
17731
- "end": 24
17895
+ "end": 3
17732
17896
  },
17733
17897
  "dead": true,
17734
17898
  "types": [
@@ -24660,7 +24824,7 @@
24660
24824
  "text": "bold, italic, code, capitalize, lowercase and underline",
24661
24825
  "range": {
24662
24826
  "start": 0,
24663
- "end": 65
24827
+ "end": 54
24664
24828
  },
24665
24829
  "types": [
24666
24830
  "list",
@@ -48018,7 +48182,7 @@
48018
48182
  "text": "uppercased, lowercased, capitalized, bolded, italicized and underlined",
48019
48183
  "range": {
48020
48184
  "start": 0,
48021
- "end": 88
48185
+ "end": 69
48022
48186
  },
48023
48187
  "types": [
48024
48188
  "capitalized_wp",
@@ -53585,6 +53749,54 @@
53585
53749
  "increment": true
53586
53750
  }
53587
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
+ },
53588
53800
  {
53589
53801
  "context": [
53590
53802
  [
@@ -53681,6 +53893,86 @@
53681
53893
  "increment": true
53682
53894
  }
53683
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
+ },
53684
53976
  {
53685
53977
  "context": [
53686
53978
  [
@@ -53849,6 +54141,42 @@
53849
54141
  "increment": true
53850
54142
  }
53851
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
+ },
53852
54180
  {
53853
54181
  "context": [
53854
54182
  [
@@ -54227,10 +54555,10 @@
54227
54555
  ],
54228
54556
  "semantics": [
54229
54557
  {
54230
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:395"
54558
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:399"
54231
54559
  },
54232
54560
  {
54233
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:404"
54561
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:408"
54234
54562
  }
54235
54563
  ],
54236
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 },