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
@@ -16,8 +16,6 @@ const dialogues_tests = require('./dialogues.test.json')
16
16
  const { defaultObjectCheck, defaultContextCheck, indent, focus } = require('./helpers')
17
17
  const pluralize = require('pluralize')
18
18
 
19
- const api = new API()
20
-
21
19
  function warningIsANotImplemented(log, context) {
22
20
  const description = 'WARNING from Dialogues KM: For semantics in order to handle sentences of type "x is y?", set the response to what you like.'
23
21
  const match = `({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && context.query && <other conditions as you like>`
@@ -56,38 +54,23 @@ const config = {
56
54
 
57
55
  "(([queryable]) [is|] ([queryable|]))",
58
56
  "([isQuery|] ([queryable]) ([queryable]))",
59
- // "(([queryable]) [is:isEdBridge|is,are] ([isEdAble|]))",
60
57
  // who is the car owned by
61
58
  "(([queryable]) [(<isEd|> ([isEdAble|]))])",
62
59
 
63
- /* TODO investigate this:
64
- {"pattern":"(([ownee])^ <owned|owned> ([by] ([owner])?))","uuid":"people1"}
65
- {"pattern":"(([isEdee])^ <isEdAble|> ([by] ([isEder])?))","uuid":"dialogues2"}
66
- */
67
60
  "(([isEdee])^ <isEdAble|> ([by] ([isEder])?))",
68
61
  "([isEdee|])",
69
62
  "([isEder|])",
70
63
 
71
- // "([nevermind])",
72
- // { pattern: "([nevermindTestSetup] (allowed))", scope: "testing" },
73
64
  "([why])",
74
65
  "([reason])",
75
- // "([thisitthat|])",
76
- // "([it])",
77
- // "([this])",
78
- // "([that])",
79
66
 
80
67
  "(<what> ([whatAble|]))",
81
68
  "([what:optional])",
82
- // "(<the|> ([theAble|]))",
83
- // "(<a|a,an> ([theAble|]))",
84
- // "([unknown])",
85
69
 
86
70
  "([be] ([briefOrWordy|]))",
87
71
 
88
72
  "([([canBeQuestion])])",
89
73
  "(([canBeQuestion/1,2]) <questionMark|>)",
90
- // "(([is/2]) <questionMark|>)",
91
74
 
92
75
  "(([what]) [(<does|> ([doesAble|]))])",
93
76
  "([canBeDoQuestion])",
@@ -101,46 +84,29 @@ const config = {
101
84
 
102
85
  "([to] ([toAble|]))",
103
86
  ],
104
- associations: {
105
- positive: [
106
- { context: [['unknown', 0], ['isEdAble', 0]], choose: 1 },
107
- { context: [['isQuery', 0], ['a', 0], ['unknown', 0], ['a', 0], ['unknown', 0]], choose: { index: 0, increment: true } },
108
-
109
- { context: [["unknown",0],["isEd",0],["isEdAble",0],["by",0],["unknown",0]], choose: { index: 0, increment: true } },
110
- { context: [["unknown",0],["isEd",0],["isEdAble",0],["by",1]], choose: { index: 0, increment: true } },
111
- { context: [["unknown",0],["isEd",0],["isEdAble",0]], choose: { index: 0, increment: true } },
112
-
113
-
114
- // ...listorama('unknown'),
115
- // ...listorama('queryable'),
116
- { context: [['unknown', 0], ['list', 0], ['unknown', 0]], choose: 0 },
117
- { context: [['unknown', 0], ['list', 0], ['unknown', 1]], choose: 0 },
118
- { context: [['unknown', 1], ['list', 0], ['unknown', 0]], choose: 0 },
119
- { context: [['unknown', 1], ['list', 0], ['unknown', 1]], choose: 0 },
120
-
121
- { context: [['queryable', 0], ['list', 0], ['unknown', 0]], choose: 1 },
122
- { context: [['queryable', 0], ['list', 0], ['unknown', 1]], choose: 1 },
123
- { context: [['queryable', 1], ['list', 0], ['unknown', 0]], choose: 1 },
124
- { context: [['queryable', 1], ['list', 0], ['unknown', 1]], choose: 1 },
125
-
126
- { context: [['unknown', 0], ['list', 0], ['queryable', 0]], choose: 2 },
127
- { context: [['unknown', 0], ['list', 0], ['queryable', 1]], choose: 2 },
128
- { context: [['unknown', 1], ['list', 0], ['queryable', 0]], choose: 2 },
129
- { context: [['unknown', 1], ['list', 0], ['queryable', 1]], choose: 2 },
130
-
131
- { context: [['queryable', 0], ['list', 0], ['queryable', 0]], choose: 0 },
132
- { context: [['queryable', 0], ['list', 0], ['queryable', 1]], choose: 0 },
133
- { context: [['queryable', 1], ['list', 0], ['queryable', 0]], choose: 0 },
134
- { context: [['queryable', 1], ['list', 0], ['queryable', 1]], choose: 0 },
135
- ]
136
- },
137
87
  bridges: [
138
88
  {
139
89
  id: 'thatVerb',
140
90
  before: ['verb'],
141
- // bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], generate: append(before[0].generate, concatm(\"thatClause.\", operator.generate)), thatClause: bridge, conditions: append(after[0].conditions, [bridge]) }' } }",
142
- // bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], generate: concatm(\"thatClause.\", bridge.generate), thatClause: bridge, conditions: append(bridge.subject.conditions, [bridge]) }' } }",
143
- bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { actLike: [\"subordinatedVerb\", 0] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], modifiers: [], generate: concatm(\"thatClause.\", bridge.generate), thatClause: bridge, conditions: append(bridge.subject.conditions, [bridge]) }' } }",
91
+ bridge: `
92
+ {
93
+ ...after[0],
94
+ verb: after[0],
95
+ that: operator,
96
+ generate: ['that', 'verb'],
97
+ localPriorities: { actLike: ["subordinatedVerb", 0] },
98
+ bridge_override: {
99
+ operator: after[0].marker,
100
+ bridge: '{
101
+ ...bridge.subject,
102
+ postModifiers: ["conditions"],
103
+ modifiers: [],
104
+ generate: concatm("thatClause.", bridge.generate),
105
+ thatClause: bridge,
106
+ conditions: append(bridge.subject.conditions, [bridge])
107
+ }'
108
+ }
109
+ }`,
144
110
  },
145
111
 
146
112
  {
@@ -203,7 +169,16 @@ const config = {
203
169
  },
204
170
  { id: "toAble" },
205
171
 
206
- { id: "be", level: 0, bridge: "{ ...next(operator), type: after[0] }" },
172
+ {
173
+ id: "be",
174
+ level: 0,
175
+ bridge: `{
176
+ ...next(operator),
177
+ form: 'infinitive',
178
+ type: after[0]
179
+ }`
180
+ },
181
+
207
182
  { id: "briefOrWordy" },
208
183
 
209
184
  { id: "yesno" },
@@ -245,40 +220,7 @@ const config = {
245
220
  { id: "canBeDoQuestion", level: 2, bridge: "{ ...next(operator) }" },
246
221
  { id: "doesAble", level: 0, bridge: "{ ...next(operator) }" },
247
222
  { id: "doesAble", level: 1, bridge: "{ ...next(operator), before: before[0] }" },
248
- // { id: "does", level: 0, bridge: "{ query: true, wantsTruthValue: true, what: operator.marker, ...context, number: operator.number, object.number: operator.number }*" },
249
223
  { id: "does", level: 0, bridge: "{ query: true, what: operator.marker, ...context, number: operator.number, object.number: operator.number }*" },
250
-
251
- /*
252
- {
253
- id: 'the',
254
- level: 0,
255
- bridge: '{ ...after[0], focusableForPhrase: true, pullFromContext: true, concept: true, wantsValue: true, determiner: "the", modifiers: append(["determiner"], after[0].modifiers)}'
256
- },
257
- {
258
- id: "a",
259
- level: 0,
260
- // bridge: "{ ...after[0], pullFromContext: false, instance: true, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
261
- bridge: "{ ...after[0], pullFromContext: false, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
262
- },
263
- */
264
- /*
265
- {
266
- id: "theAble",
267
- children: ['noun'],
268
- bridge: "{ ...next(operator) }"
269
- },
270
- */
271
-
272
- // TODO make this hierarchy thing work
273
- /*
274
- {
275
- id: "thisitthat",
276
- level: 0,
277
- isA: ['queryable'],
278
- before: ['verby'],
279
- bridge: "{ ...next(operator) }"
280
- },
281
- */
282
224
  {
283
225
  id: "why",
284
226
  level: 0,
@@ -288,31 +230,10 @@ const config = {
288
230
  id: "reason",
289
231
  isA: ['theAble', 'queryable'],
290
232
  },
291
- /*
292
- {
293
- id: "it",
294
- level: 0,
295
- isA: ['thisitthat'],
296
- bridge: "{ ...next(operator), pullFromContext: true, unknown: true, determined: true }"
297
- },
298
- {
299
- id: "this",
300
- level: 0,
301
- isA: ['thisitthat'],
302
- bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
303
- },
304
- {
305
- id: "that",
306
- level: 0,
307
- isA: ['thisitthat'],
308
- bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
309
- },
310
- */
311
233
  ],
312
234
  words: {
313
235
  "literals": {
314
236
  "?": [{"id": "questionMark", "initial": "{}" }],
315
- // "the": [{"id": "the", "initial": "{ modifiers: [] }" }],
316
237
  "who": [{"id": "what", "initial": "{ modifiers: [], query: true }" }],
317
238
  "yes": [{"id": "yesno", "initial": "{ value: true }" }],
318
239
  "no": [{"id": "yesno", "initial": "{ value: false }" }],
@@ -321,6 +242,7 @@ const config = {
321
242
  "does": [{"id": "does", "initial": "{ number: 'one' }" }],
322
243
  "do": [{"id": "does", "initial": "{ number: 'many' }" }],
323
244
  "is": [
245
+ {"id": "be", "initial": "{ form: 'infinitive' }" },
324
246
  {"id": "is", "initial": "{ number: 'one' }" },
325
247
  {"id": "isQuery", "initial": "{ number: 'one' }" },
326
248
  {"id": "isEd", "initial": "{ number: 'one' }" }
@@ -348,12 +270,9 @@ const config = {
348
270
  ['it', 'pronoun'],
349
271
  ['this', 'pronoun'],
350
272
  ['questionMark', 'punctuation'],
351
- // ['questionMark', 'isEd'],
352
273
  ['a', 'article'],
353
274
  ['the', 'article'],
354
- // ['unknown', 'theAble'],
355
275
  ['theAble', 'queryable'],
356
- // ['unknown', 'queryable'],
357
276
  ['it', 'queryable'],
358
277
  ['what', 'queryable'],
359
278
  ['whatAble', 'queryable'],
@@ -557,7 +476,7 @@ const config = {
557
476
  } else {
558
477
  // TODO fix this using the assumed and that whole mess. change isResponse to useValue
559
478
  if (context.isResponse) {
560
- return `${await gp(context.one, { responding: true })} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${await g(context.two)}`
479
+ return `${await gp(context.one, { assumed: { responding: true } })} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${await g(context.two)}`
561
480
  } else {
562
481
  return `${await gp(context.one)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${await gr(context.two)}`
563
482
  }