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.
- package/common/animals.instance.json +130 -0
- package/common/animals.js +3 -5
- package/common/asking.js +12 -4
- package/common/avatar.test.json +1001 -860
- package/common/can.instance.json +2182 -5
- package/common/can.js +102 -39
- package/common/can.test.json +51307 -0
- package/common/colors.instance.json +142 -30
- package/common/colors.js +3 -6
- package/common/comparable.instance.json +31 -1
- package/common/comparable.js +3 -6
- package/common/concept.js +25 -27
- package/common/concept.test.json +142 -120
- package/common/conjunction.test.json +32 -42
- package/common/crew.instance.json +400 -126
- package/common/crew.js +3 -6
- package/common/dateTimeSelectors.instance.json +2 -2
- package/common/dateTimeSelectors.js +6 -9
- package/common/dateTimeSelectors.test.json +76935 -35739
- package/common/dates.instance.json +50 -84
- package/common/dates.js +3 -6
- package/common/dates.test.json +284 -287
- package/common/dialogues.js +33 -115
- package/common/dialogues.test.json +1248 -1152
- package/common/dimension.instance.json +21498 -566
- package/common/dimension.js +147 -52
- package/common/dimension.test.json +10979 -4625
- package/common/drone.instance.json +24709 -0
- package/common/drone.js +662 -0
- package/common/drone.test.json +30522 -0
- package/common/drone_v1.instance.json +24703 -0
- package/common/drone_v1.js +596 -0
- package/common/drone_v1.test.json +115538 -0
- package/common/edible.instance.json +365 -65
- package/common/edible.js +3 -5
- package/common/emotions.instance.json +57 -70
- package/common/emotions.js +3 -6
- package/common/errors.js +3 -3
- package/common/fastfood.instance.json +1270 -244
- package/common/fastfood.js +10 -12
- package/common/fastfood.test.json +6970 -6829
- package/common/formulas.instance.json +10 -0
- package/common/formulas.js +2 -1
- package/common/gdefaults.js +58 -13
- package/common/help.js +9 -9
- package/common/help.test.json +65 -11
- package/common/helpers/dialogues.js +9 -1
- package/common/helpers/properties.js +37 -18
- package/common/helpers.js +32 -2
- package/common/hierarchy.js +10 -8
- package/common/kirk.instance.json +10 -0
- package/common/kirk.js +4 -6
- package/common/kirk.test.json +600 -424
- package/common/latin.instance.json +10 -10
- package/common/latin.js +8 -10
- package/common/length.instance.json +34659 -3157
- package/common/length.js +11 -6
- package/common/length.test.json +54357 -2557
- package/common/math.instance.json +11 -1
- package/common/math.js +2 -1
- package/common/menus.instance.json +74 -7
- package/common/menus.js +3 -12
- package/common/meta.js +4 -5
- package/common/nameable.js +29 -15
- package/common/nameable.test.json +436 -0
- package/common/numbers.js +1 -1
- package/common/ordering.instance.json +24 -2
- package/common/ordering.js +3 -5
- package/common/ordering.test.json +104 -174
- package/common/people.instance.json +140 -315
- package/common/people.js +3 -5
- package/common/pipboy.instance.json +171 -57
- package/common/pipboy.js +2 -1
- package/common/pokemon.instance.json +135 -5
- package/common/pokemon.js +3 -5
- package/common/pressure.instance.json +3990 -1981
- package/common/pressure.js +3 -5
- package/common/pressure.test.json +433 -477
- package/common/properties.instance.json +15 -16
- package/common/properties.js +10 -9
- package/common/properties.test.json +9565 -6951
- package/common/rates.instance.json +59 -0
- package/common/rates.js +95 -0
- package/common/rates.test.json +27702 -0
- package/common/reminders.js +5 -8
- package/common/reminders.test.json +64635 -25787
- package/common/reports.instance.json +22 -2
- package/common/reports.js +3 -5
- package/common/scorekeeper.js +3 -6
- package/common/spock.instance.json +10 -0
- package/common/spock.js +4 -7
- package/common/spock.test.json +606 -430
- package/common/stm.js +37 -20
- package/common/temperature.instance.json +3162 -1153
- package/common/temperature.js +3 -5
- package/common/temperature.test.json +433 -477
- package/common/time.instance.json +24852 -0
- package/common/time.js +136 -139
- package/common/time.test.json +31876 -3757
- package/common/ui.instance.json +12 -5
- package/common/ui.js +4 -13
- package/common/weight.instance.json +10500 -4098
- package/common/weight.js +3 -5
- package/common/weight.test.json +2601 -2263
- package/common/words.instance.json +9 -0
- package/common/words.js +50 -0
- package/common/words.test.json +2 -0
- package/common/wp.instance.json +470 -58
- package/common/wp.js +6 -4
- package/common/wp.test.json +7385 -6906
- package/main.js +6 -2
- package/package.json +21 -6
- package/common/listener.js +0 -50
- package/common/listener.test.json +0 -142
package/common/dialogues.js
CHANGED
|
@@ -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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
{
|
|
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
|
}
|
|
@@ -775,13 +694,12 @@ const config = {
|
|
|
775
694
|
{
|
|
776
695
|
where: where(),
|
|
777
696
|
notes: 'get variable from stm',
|
|
778
|
-
|
|
779
|
-
match: ({context, kms}) => context.evaluate && kms.stm.api.getVariable(context.value) != context.value,
|
|
697
|
+
match: ({context, kms}) => context.evaluate && kms.stm.api.getVariable(context),
|
|
780
698
|
// match: ({context, kms}) => context.evaluate,
|
|
781
699
|
priority: -1,
|
|
782
700
|
apply: async ({context, kms, e}) => {
|
|
783
701
|
const api = kms.stm.api
|
|
784
|
-
context.value = api.getVariable(context
|
|
702
|
+
context.value = api.getVariable(context)
|
|
785
703
|
if (context.value && context.value.marker) {
|
|
786
704
|
context.evalue = await e(context.value)
|
|
787
705
|
}
|