tpmkms_4wp 9.5.1-beta.9 → 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 (114) hide show
  1. package/common/animals.instance.json +130 -0
  2. package/common/animals.js +3 -5
  3. package/common/asking.js +12 -4
  4. package/common/avatar.test.json +1001 -860
  5. package/common/can.instance.json +2182 -5
  6. package/common/can.js +102 -39
  7. package/common/can.test.json +51307 -0
  8. package/common/colors.instance.json +142 -30
  9. package/common/colors.js +3 -6
  10. package/common/comparable.instance.json +31 -1
  11. package/common/comparable.js +3 -6
  12. package/common/concept.js +25 -27
  13. package/common/concept.test.json +142 -120
  14. package/common/conjunction.test.json +32 -42
  15. package/common/crew.instance.json +400 -126
  16. package/common/crew.js +3 -6
  17. package/common/dateTimeSelectors.instance.json +2 -2
  18. package/common/dateTimeSelectors.js +6 -9
  19. package/common/dateTimeSelectors.test.json +76935 -35739
  20. package/common/dates.instance.json +50 -84
  21. package/common/dates.js +3 -6
  22. package/common/dates.test.json +284 -287
  23. package/common/dialogues.js +33 -115
  24. package/common/dialogues.test.json +1248 -1152
  25. package/common/dimension.instance.json +21498 -566
  26. package/common/dimension.js +147 -52
  27. package/common/dimension.test.json +10979 -4625
  28. package/common/drone.instance.json +24709 -0
  29. package/common/drone.js +662 -0
  30. package/common/drone.test.json +30522 -0
  31. package/common/drone_v1.instance.json +24703 -0
  32. package/common/drone_v1.js +596 -0
  33. package/common/drone_v1.test.json +115538 -0
  34. package/common/edible.instance.json +365 -65
  35. package/common/edible.js +3 -5
  36. package/common/emotions.instance.json +57 -70
  37. package/common/emotions.js +3 -6
  38. package/common/errors.js +3 -3
  39. package/common/fastfood.instance.json +1270 -244
  40. package/common/fastfood.js +10 -12
  41. package/common/fastfood.test.json +6970 -6829
  42. package/common/formulas.instance.json +10 -0
  43. package/common/formulas.js +2 -1
  44. package/common/gdefaults.js +58 -13
  45. package/common/help.js +9 -9
  46. package/common/help.test.json +65 -11
  47. package/common/helpers/dialogues.js +9 -1
  48. package/common/helpers/properties.js +37 -18
  49. package/common/helpers.js +32 -2
  50. package/common/hierarchy.js +10 -8
  51. package/common/kirk.instance.json +10 -0
  52. package/common/kirk.js +4 -6
  53. package/common/kirk.test.json +600 -424
  54. package/common/latin.instance.json +10 -10
  55. package/common/latin.js +8 -10
  56. package/common/length.instance.json +34659 -3157
  57. package/common/length.js +11 -6
  58. package/common/length.test.json +54357 -2557
  59. package/common/math.instance.json +11 -1
  60. package/common/math.js +2 -1
  61. package/common/menus.instance.json +74 -7
  62. package/common/menus.js +3 -12
  63. package/common/meta.js +4 -5
  64. package/common/nameable.js +29 -15
  65. package/common/nameable.test.json +436 -0
  66. package/common/numbers.js +1 -1
  67. package/common/ordering.instance.json +24 -2
  68. package/common/ordering.js +3 -5
  69. package/common/ordering.test.json +104 -174
  70. package/common/people.instance.json +140 -315
  71. package/common/people.js +3 -5
  72. package/common/pipboy.instance.json +171 -57
  73. package/common/pipboy.js +2 -1
  74. package/common/pokemon.instance.json +135 -5
  75. package/common/pokemon.js +3 -5
  76. package/common/pressure.instance.json +3990 -1981
  77. package/common/pressure.js +3 -5
  78. package/common/pressure.test.json +433 -477
  79. package/common/properties.instance.json +15 -16
  80. package/common/properties.js +10 -9
  81. package/common/properties.test.json +9565 -6951
  82. package/common/rates.instance.json +59 -0
  83. package/common/rates.js +95 -0
  84. package/common/rates.test.json +27702 -0
  85. package/common/reminders.js +5 -8
  86. package/common/reminders.test.json +64635 -25787
  87. package/common/reports.instance.json +22 -2
  88. package/common/reports.js +3 -5
  89. package/common/scorekeeper.js +3 -6
  90. package/common/spock.instance.json +10 -0
  91. package/common/spock.js +4 -7
  92. package/common/spock.test.json +606 -430
  93. package/common/stm.js +37 -20
  94. package/common/temperature.instance.json +3162 -1153
  95. package/common/temperature.js +3 -5
  96. package/common/temperature.test.json +433 -477
  97. package/common/time.instance.json +24852 -0
  98. package/common/time.js +136 -139
  99. package/common/time.test.json +31876 -3757
  100. package/common/ui.instance.json +12 -5
  101. package/common/ui.js +4 -13
  102. package/common/weight.instance.json +10500 -4098
  103. package/common/weight.js +3 -5
  104. package/common/weight.test.json +2601 -2263
  105. package/common/words.instance.json +9 -0
  106. package/common/words.js +50 -0
  107. package/common/words.test.json +2 -0
  108. package/common/wp.instance.json +470 -58
  109. package/common/wp.js +6 -4
  110. package/common/wp.test.json +7385 -6906
  111. package/main.js +6 -2
  112. package/package.json +21 -6
  113. package/common/listener.js +0 -50
  114. package/common/listener.test.json +0 -142
@@ -6862,5 +6862,441 @@
6862
6862
  ]
6863
6863
  }
6864
6864
  ]
6865
+ },
6866
+ {
6867
+ "associations": [
6868
+ [
6869
+ [
6870
+ "call",
6871
+ 0
6872
+ ],
6873
+ [
6874
+ "nameable",
6875
+ 0
6876
+ ],
6877
+ [
6878
+ "unknown",
6879
+ 0
6880
+ ]
6881
+ ]
6882
+ ],
6883
+ "config": {
6884
+ "words": {
6885
+ "hierarchy": [
6886
+ ],
6887
+ "literals": {
6888
+ "\"": [
6889
+ {
6890
+ "id": "doubleQuote",
6891
+ "initial": "{\"word\":\"\\\"\",\"depth\":\"+\"}",
6892
+ "word": "\""
6893
+ }
6894
+ ],
6895
+ "(": [
6896
+ {
6897
+ "id": "leftParenthesis",
6898
+ "initial": "{\"word\":\"(\",\"value\":\"(\",\"depth\":\"+\"}",
6899
+ "word": "("
6900
+ }
6901
+ ],
6902
+ ")": [
6903
+ {
6904
+ "id": "rightParenthesis",
6905
+ "initial": "{\"word\":\")\",\"value\":\")\",\"depth\":\"-\"}",
6906
+ "word": ")"
6907
+ }
6908
+ ],
6909
+ ",": [
6910
+ {
6911
+ "id": "comma",
6912
+ "initial": "{\"word\":\",\",\"value\":\",\",\"depth\":\"+\"}",
6913
+ "word": ","
6914
+ }
6915
+ ],
6916
+ ".": [
6917
+ {
6918
+ "id": "endOfSentence",
6919
+ "initial": "{ value: \"endOfSentence\"}"
6920
+ }
6921
+ ],
6922
+ ":": [
6923
+ {
6924
+ "id": "colon",
6925
+ "initial": "{ value: \"colon\"}"
6926
+ }
6927
+ ],
6928
+ "memorable": [
6929
+ {
6930
+ "id": "memorable",
6931
+ "initial": "{\"word\":\"memorable\",\"number\":\"one\"}",
6932
+ "word": "memorable"
6933
+ }
6934
+ ],
6935
+ "memorables": [
6936
+ {
6937
+ "id": "memorable",
6938
+ "initial": "{\"word\":\"memorables\",\"number\":\"many\"}",
6939
+ "word": "memorables"
6940
+ }
6941
+ ],
6942
+ "nameable": [
6943
+ {
6944
+ "id": "nameable",
6945
+ "initial": "{\"word\":\"nameable\",\"number\":\"one\"}",
6946
+ "word": "nameable"
6947
+ }
6948
+ ],
6949
+ "nameables": [
6950
+ {
6951
+ "id": "nameable",
6952
+ "initial": "{\"word\":\"nameables\",\"number\":\"many\"}",
6953
+ "word": "nameables"
6954
+ }
6955
+ ],
6956
+ "the": [
6957
+ {
6958
+ "id": "the",
6959
+ "initial": "{ modifiers: [] }"
6960
+ }
6961
+ ]
6962
+ },
6963
+ "patterns": [
6964
+ ]
6965
+ }
6966
+ },
6967
+ "contexts": [
6968
+ {
6969
+ "context_id": 2,
6970
+ "context_index": 1,
6971
+ "dead": true,
6972
+ "default": true,
6973
+ "level": 1,
6974
+ "marker": "call",
6975
+ "name": [
6976
+ {
6977
+ "dead": true,
6978
+ "level": 0,
6979
+ "marker": "unknown",
6980
+ "range": {
6981
+ "end": 17,
6982
+ "start": 14
6983
+ },
6984
+ "text": "fred",
6985
+ "unknown": true,
6986
+ "value": "fred",
6987
+ "word": "fred"
6988
+ }
6989
+ ],
6990
+ "nameable": {
6991
+ "dead": true,
6992
+ "level": 0,
6993
+ "marker": "nameable",
6994
+ "number": "one",
6995
+ "range": {
6996
+ "end": 12,
6997
+ "start": 5
6998
+ },
6999
+ "text": "nameable",
7000
+ "types": [
7001
+ "nameable"
7002
+ ],
7003
+ "word": "nameable"
7004
+ },
7005
+ "range": {
7006
+ "end": 17,
7007
+ "start": 0
7008
+ },
7009
+ "text": "call nameable fred",
7010
+ "topLevel": true,
7011
+ "touchedBy": [
7012
+ "nameable#call2"
7013
+ ],
7014
+ "value": "call",
7015
+ "word": "call"
7016
+ },
7017
+ {
7018
+ "context_id": 3,
7019
+ "isResponse": true,
7020
+ "marker": "verbatim",
7021
+ "topLevel": true,
7022
+ "verbatim": "nameable is not known"
7023
+ }
7024
+ ],
7025
+ "developerTest": false,
7026
+ "generatedParenthesized": [
7027
+ "",
7028
+ "(nameable is not known)"
7029
+ ],
7030
+ "metadata": {
7031
+ "opChoices": [
7032
+ {
7033
+ "counter": 1,
7034
+ "op": [
7035
+ "unknown",
7036
+ 0
7037
+ ],
7038
+ "ops": [
7039
+ [
7040
+ "call",
7041
+ 0
7042
+ ],
7043
+ [
7044
+ "unknown",
7045
+ 0
7046
+ ]
7047
+ ]
7048
+ },
7049
+ {
7050
+ "counter": 2,
7051
+ "op": [
7052
+ "call",
7053
+ 0
7054
+ ],
7055
+ "ops": [
7056
+ [
7057
+ "call",
7058
+ 0
7059
+ ]
7060
+ ]
7061
+ }
7062
+ ]
7063
+ },
7064
+ "objects": {
7065
+ "nameToUUID": {
7066
+ "articles": "articles2",
7067
+ "evaluate": "evaluate2",
7068
+ "gdefaults": "gdefaults2",
7069
+ "nameable": "nameable1",
7070
+ "pos": "pos2",
7071
+ "punctuation": "punctuation2",
7072
+ "stm": "stm2",
7073
+ "tokenize": "tokenize2",
7074
+ "words": "words2"
7075
+ },
7076
+ "namespaced": {
7077
+ "articles2": {
7078
+ "km": "articles2"
7079
+ },
7080
+ "evaluate2": {
7081
+ "km": "evaluate2"
7082
+ },
7083
+ "gdefaults2": {
7084
+ "km": "gdefaults2"
7085
+ },
7086
+ "nameable1": {
7087
+ "km": "nameable1",
7088
+ "named": {
7089
+ }
7090
+ },
7091
+ "pos2": {
7092
+ "km": "pos2"
7093
+ },
7094
+ "punctuation2": {
7095
+ "km": "punctuation2"
7096
+ },
7097
+ "stm2": {
7098
+ "km": "stm2",
7099
+ "mentioned": [
7100
+ ],
7101
+ "variables": {
7102
+ }
7103
+ },
7104
+ "tokenize2": {
7105
+ "km": "tokenize2"
7106
+ },
7107
+ "words2": {
7108
+ "km": "words2",
7109
+ "words": [
7110
+ ]
7111
+ }
7112
+ },
7113
+ "processed": [
7114
+ {
7115
+ "context": {
7116
+ "context_id": 3,
7117
+ "isResponse": true,
7118
+ "marker": "verbatim",
7119
+ "topLevel": true,
7120
+ "verbatim": "nameable is not known"
7121
+ },
7122
+ "generatedParenthesized": [
7123
+ ],
7124
+ "paraphrases": [
7125
+ ],
7126
+ "paraphrasesParenthesized": [
7127
+ ],
7128
+ "responses": [
7129
+ "",
7130
+ "nameable is not known"
7131
+ ]
7132
+ },
7133
+ {
7134
+ "context": {
7135
+ "context_id": 2,
7136
+ "context_index": 1,
7137
+ "dead": true,
7138
+ "default": true,
7139
+ "level": 1,
7140
+ "marker": "call",
7141
+ "name": [
7142
+ {
7143
+ "dead": true,
7144
+ "level": 0,
7145
+ "marker": "unknown",
7146
+ "range": {
7147
+ "end": 17,
7148
+ "start": 14
7149
+ },
7150
+ "text": "fred",
7151
+ "unknown": true,
7152
+ "value": "fred",
7153
+ "word": "fred"
7154
+ }
7155
+ ],
7156
+ "nameable": {
7157
+ "dead": true,
7158
+ "level": 0,
7159
+ "marker": "nameable",
7160
+ "number": "one",
7161
+ "range": {
7162
+ "end": 12,
7163
+ "start": 5
7164
+ },
7165
+ "text": "nameable",
7166
+ "types": [
7167
+ "nameable"
7168
+ ],
7169
+ "word": "nameable"
7170
+ },
7171
+ "range": {
7172
+ "end": 17,
7173
+ "start": 0
7174
+ },
7175
+ "text": "call nameable fred",
7176
+ "topLevel": true,
7177
+ "touchedBy": [
7178
+ "nameable#call2"
7179
+ ],
7180
+ "value": "call",
7181
+ "word": "call"
7182
+ },
7183
+ "generatedParenthesized": [
7184
+ ],
7185
+ "paraphrases": [
7186
+ ],
7187
+ "paraphrasesParenthesized": [
7188
+ ],
7189
+ "responses": [
7190
+ "",
7191
+ "nameable is not known"
7192
+ ]
7193
+ }
7194
+ ]
7195
+ },
7196
+ "paraphrases": [
7197
+ "call nameable fred",
7198
+ "nameable is not known"
7199
+ ],
7200
+ "paraphrasesParenthesized": [
7201
+ "(call (nameable) (fred))",
7202
+ "(nameable is not known)"
7203
+ ],
7204
+ "query": "call nameable fred",
7205
+ "responses": [
7206
+ "",
7207
+ "nameable is not known"
7208
+ ],
7209
+ "summaries": [
7210
+ {
7211
+ "length": 1,
7212
+ "summaries": [
7213
+ {
7214
+ "counter": 1,
7215
+ "operators": [
7216
+ {
7217
+ "marker": [
7218
+ "call",
7219
+ 0
7220
+ ],
7221
+ "range": {
7222
+ "end": 3,
7223
+ "start": 0
7224
+ }
7225
+ },
7226
+ {
7227
+ "marker": [
7228
+ "nameable",
7229
+ 0
7230
+ ],
7231
+ "range": {
7232
+ "end": 12,
7233
+ "start": 5
7234
+ }
7235
+ },
7236
+ {
7237
+ "marker": [
7238
+ "unknown",
7239
+ 0
7240
+ ],
7241
+ "range": {
7242
+ "end": 17,
7243
+ "start": 14
7244
+ }
7245
+ }
7246
+ ]
7247
+ },
7248
+ {
7249
+ "counter": 2,
7250
+ "operators": [
7251
+ {
7252
+ "marker": [
7253
+ "call",
7254
+ 0
7255
+ ],
7256
+ "range": {
7257
+ "end": 3,
7258
+ "start": 0
7259
+ }
7260
+ },
7261
+ {
7262
+ "marker": [
7263
+ "nameable",
7264
+ 0
7265
+ ],
7266
+ "range": {
7267
+ "end": 12,
7268
+ "start": 5
7269
+ }
7270
+ },
7271
+ {
7272
+ "marker": [
7273
+ "unknown",
7274
+ 0
7275
+ ],
7276
+ "range": {
7277
+ "end": 17,
7278
+ "start": 14
7279
+ }
7280
+ }
7281
+ ]
7282
+ },
7283
+ {
7284
+ "counter": 3,
7285
+ "operators": [
7286
+ {
7287
+ "marker": [
7288
+ "call",
7289
+ 1
7290
+ ],
7291
+ "range": {
7292
+ "end": 17,
7293
+ "start": 0
7294
+ }
7295
+ }
7296
+ ]
7297
+ }
7298
+ ]
7299
+ }
7300
+ ]
6865
7301
  }
6866
7302
  ]
package/common/numbers.js CHANGED
@@ -114,7 +114,7 @@ knowledgeModule( {
114
114
  checks: {
115
115
  context: [
116
116
  defaultContextCheck({ marker: 'number', exported: true, extra: ['instance'] }),
117
- defaultContextCheck({ marker: 'integer', exported: true, extra: ['instance'] }),
117
+ defaultContextCheck({ match: ({isA, context}) => isA(context.marker, 'integer'), exported: true, extra: ['instance'] }),
118
118
  defaultContextCheck()
119
119
  ],
120
120
  }
@@ -311,6 +311,16 @@
311
311
  "adjective",
312
312
  false
313
313
  ],
314
+ [
315
+ "stm_current",
316
+ "adjective",
317
+ false
318
+ ],
319
+ [
320
+ "stm_previous",
321
+ "adjective",
322
+ false
323
+ ],
314
324
  [
315
325
  "that",
316
326
  "thisitthat",
@@ -1555,6 +1565,16 @@
1555
1565
  "adjective",
1556
1566
  false
1557
1567
  ],
1568
+ [
1569
+ "stm_current",
1570
+ "adjective",
1571
+ false
1572
+ ],
1573
+ [
1574
+ "stm_previous",
1575
+ "adjective",
1576
+ false
1577
+ ],
1558
1578
  [
1559
1579
  "that",
1560
1580
  "thisitthat",
@@ -2197,6 +2217,7 @@
2197
2217
  "value": [
2198
2218
  {
2199
2219
  "value": "like",
2220
+ "isVerb": true,
2200
2221
  "number": "one",
2201
2222
  "text": "x likes y",
2202
2223
  "marker": "like",
@@ -2243,6 +2264,7 @@
2243
2264
  },
2244
2265
  "operator": {
2245
2266
  "value": "like",
2267
+ "isVerb": true,
2246
2268
  "number": "one",
2247
2269
  "text": "likes",
2248
2270
  "marker": "like",
@@ -2253,7 +2275,6 @@
2253
2275
  },
2254
2276
  "evaluateWord": true,
2255
2277
  "imperative": false,
2256
- "isVerb": true,
2257
2278
  "level": 0
2258
2279
  },
2259
2280
  "unflatten": [
@@ -2284,6 +2305,7 @@
2284
2305
  },
2285
2306
  {
2286
2307
  "value": "love",
2308
+ "isVerb": true,
2287
2309
  "number": "one",
2288
2310
  "text": "x loves y",
2289
2311
  "marker": "love",
@@ -2330,6 +2352,7 @@
2330
2352
  },
2331
2353
  "operator": {
2332
2354
  "value": "love",
2355
+ "isVerb": true,
2333
2356
  "number": "one",
2334
2357
  "text": "loves",
2335
2358
  "marker": "love",
@@ -2340,7 +2363,6 @@
2340
2363
  },
2341
2364
  "evaluateWord": true,
2342
2365
  "imperative": false,
2343
- "isVerb": true,
2344
2366
  "level": 0
2345
2367
  },
2346
2368
  "unflatten": [
@@ -2,7 +2,7 @@ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const hierarchy = require('./hierarchy')
4
4
  const ordering_tests = require('./ordering.test.json')
5
- const ordering_instance = require('./ordering.instance.json')
5
+ const instance = require('./ordering.instance.json')
6
6
  const { API } = require('./helpers/ordering')
7
7
 
8
8
  const template ={
@@ -124,8 +124,6 @@ knowledgeModule( {
124
124
  context: [defaultContextCheck()],
125
125
  }
126
126
  },
127
- template: {
128
- template,
129
- instance: ordering_instance
130
- }
127
+ instance,
128
+ template,
131
129
  })