tpmkms 9.8.0 → 9.9.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/actions.instance.json +10 -8
- package/common/actions.js +13 -11
- package/common/angle.instance.json +25 -17
- package/common/animals.instance.json +54 -28
- package/common/askfor.instance.json +89 -192
- package/common/askfor.js +49 -12
- package/common/asking.js +13 -5
- package/common/avatar.js +3 -3
- package/common/can.instance.json +32 -20
- package/common/can.js +2 -2
- package/common/colors.instance.json +44 -16
- package/common/colors.js +1 -1
- package/common/comparable.instance.json +25 -22
- package/common/compass.instance.json +9 -3
- package/common/concept.instance.json +14 -6
- package/common/concept.js +2 -0
- package/common/conjunction.js +17 -9
- package/common/control.js +10 -18
- package/common/countable.js +4 -3
- package/common/crew.instance.json +95 -27
- package/common/dateTimeSelectors.instance.json +4 -4
- package/common/dateTimeSelectors.js +4 -7
- package/common/dates.instance.json +52 -28
- package/common/dates.js +16 -11
- package/common/debug.instance.json +48 -0
- package/common/debug.js +50 -0
- package/common/debug.test.json +1 -0
- package/common/dialogues.js +126 -70
- package/common/dimension.instance.json +239 -495
- package/common/dimension.js +51 -9
- package/common/drone.instance.json +395 -84
- package/common/drone.js +43 -50
- package/common/drone_v1.instance.json +36 -12
- package/common/drone_v1.js +14 -9
- package/common/edible.instance.json +96 -32
- package/common/emotions.instance.json +15 -1
- package/common/evaluate.js +10 -13
- package/common/fastfood.instance.json +282 -100
- package/common/fastfood.js +30 -15
- package/common/formulas.instance.json +162 -24
- package/common/formulas.js +18 -9
- package/common/gdefaults.js +20 -96
- package/common/helpers/concept.js +2 -9
- package/common/helpers/conjunction.js +11 -1
- package/common/helpers/dialogues.js +48 -24
- package/common/helpers/gdefaults.js +15 -5
- package/common/helpers/properties.js +125 -326
- package/common/helpers.js +28 -58
- package/common/hierarchy.js +71 -41
- package/common/kirk.instance.json +3 -1
- package/common/latin.instance.json +10 -10
- package/common/latin.js +5 -5
- package/common/length.instance.json +247 -61
- package/common/math.instance.json +144 -5
- package/common/math.js +18 -5
- package/common/menus.instance.json +29 -11
- package/common/menus.js +8 -5
- package/common/meta.js +14 -13
- package/common/nameable.js +9 -5
- package/common/numbers.instance.json +5 -3
- package/common/numbers.js +28 -28
- package/common/ordering.instance.json +53 -4
- package/common/ordinals.js +25 -25
- package/common/people.instance.json +66 -12
- package/common/percentages.js +4 -2
- package/common/pipboy.instance.json +89 -44
- package/common/pipboy.js +21 -14
- package/common/pokemon.instance.json +39 -13
- package/common/pressure.instance.json +14 -6
- package/common/properties.instance.json +2370 -511
- package/common/properties.js +496 -78
- package/common/punctuation.js +1 -0
- package/common/rates.instance.json +2 -2
- package/common/rates.js +3 -3
- package/common/reminders.instance.json +16 -0
- package/common/reminders.js +24 -20
- package/common/reports.instance.json +11 -12
- package/common/reports.js +12 -12
- package/common/scorekeeper.js +20 -10
- package/common/sdefaults.js +30 -9
- package/common/spock.instance.json +3 -1
- package/common/stm.js +16 -21
- package/common/temperature.instance.json +19 -11
- package/common/testing.js +2 -2
- package/common/time.instance.json +104 -47
- package/common/time.js +9 -8
- package/common/ui.instance.json +4 -2
- package/common/ui.js +5 -5
- package/common/weight.instance.json +86 -21
- package/common/weight.js +5 -1
- package/common/words.js +113 -2
- package/common/wp.instance.json +125 -18
- package/common/wp.js +6 -2
- package/main.js +2 -0
- package/package.json +7 -3
|
@@ -94,12 +94,12 @@ const template = {
|
|
|
94
94
|
],
|
|
95
95
|
semantics: [
|
|
96
96
|
{
|
|
97
|
-
match: ({context, isA}) =>
|
|
97
|
+
match: ({context, isA}) => onOrIs('dayAfterDate', context),
|
|
98
98
|
apply: async ({context, isProcess, isTest, kms, isA, e}) => {
|
|
99
99
|
try {
|
|
100
100
|
const now = kms.time.api.now()
|
|
101
101
|
const date = afterOrIs('dayAfterDate', context)
|
|
102
|
-
const afterISO = (await e(date.after)).evalue
|
|
102
|
+
const afterISO = (await e(date.after, where())).evalue
|
|
103
103
|
const day_ordinal = date.day.day_ordinal
|
|
104
104
|
const ordinal = date.day.ordinal.value
|
|
105
105
|
context.evalue = dateTimeSelectors_helpers.getNthWeekdayAfterDate(afterISO, day_ordinal, ordinal)
|
|
@@ -109,7 +109,7 @@ const template = {
|
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
match: ({context, isA}) =>
|
|
112
|
+
match: ({context, isA}) => onOrIs('dayOfMonth', context),
|
|
113
113
|
apply: ({context, isProcess, isTest, kms, isA}) => {
|
|
114
114
|
try {
|
|
115
115
|
const now = kms.time.api.now()
|
|
@@ -122,9 +122,6 @@ const template = {
|
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
match: ({context, isA}) => {
|
|
125
|
-
if (!context.evaluate) {
|
|
126
|
-
return false
|
|
127
|
-
}
|
|
128
125
|
if (isA(context.marker, 'onDateValue_dates')) {
|
|
129
126
|
return true
|
|
130
127
|
}
|
|
@@ -156,7 +153,7 @@ knowledgeModule( {
|
|
|
156
153
|
checks: {
|
|
157
154
|
context: [
|
|
158
155
|
// defaultContextCheck({ extra: ['date', 'time', 'response', 'after', 'day', 'month', 'year', 'evalue'] }),
|
|
159
|
-
defaultContextCheck({ extra: ['date', 'time', '
|
|
156
|
+
defaultContextCheck({ extra: ['date', 'time', 'after', 'evalue'] }),
|
|
160
157
|
],
|
|
161
158
|
}
|
|
162
159
|
},
|
|
@@ -184,6 +184,7 @@
|
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"id": "dateEra_dates",
|
|
187
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:129",
|
|
187
188
|
"isA": [
|
|
188
189
|
"date_dates"
|
|
189
190
|
],
|
|
@@ -215,6 +216,7 @@
|
|
|
215
216
|
},
|
|
216
217
|
{
|
|
217
218
|
"id": "monthDayYearWithSlashes_dates",
|
|
219
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:143",
|
|
218
220
|
"isA": [
|
|
219
221
|
"date_dates"
|
|
220
222
|
],
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
],
|
|
224
226
|
"separators": "||||",
|
|
225
227
|
"convolution": true,
|
|
226
|
-
"bridge": "{ ...next(operator), day: after[2],
|
|
228
|
+
"bridge": "{ ...next(operator), day: after[2], isInstance: true, month: after[0], year: after[4], interpolate: '${month}/${day}/${year}' }",
|
|
227
229
|
"generatorr": "({context, gp}) => gp(context)",
|
|
228
230
|
"check": [
|
|
229
231
|
"marker",
|
|
@@ -248,24 +250,25 @@
|
|
|
248
250
|
"isA": [
|
|
249
251
|
"integer"
|
|
250
252
|
],
|
|
251
|
-
"bridge": "{ ...next(operator),
|
|
253
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
252
254
|
},
|
|
253
255
|
{
|
|
254
256
|
"id": "monthNumber_dates",
|
|
255
257
|
"isA": [
|
|
256
258
|
"integer"
|
|
257
259
|
],
|
|
258
|
-
"bridge": "{ ...next(operator),
|
|
260
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
259
261
|
},
|
|
260
262
|
{
|
|
261
263
|
"id": "yearNumber_dates",
|
|
262
264
|
"isA": [
|
|
263
265
|
"integer"
|
|
264
266
|
],
|
|
265
|
-
"bridge": "{ ...next(operator),
|
|
267
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
266
268
|
},
|
|
267
269
|
{
|
|
268
270
|
"id": "monthDay_dates",
|
|
271
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:170",
|
|
269
272
|
"convolution": true,
|
|
270
273
|
"localHierarchy": [
|
|
271
274
|
[
|
|
@@ -279,7 +282,7 @@
|
|
|
279
282
|
"isA": [
|
|
280
283
|
"date_dates"
|
|
281
284
|
],
|
|
282
|
-
"bridge": "{ ...next(operator),
|
|
285
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], day: after[1], interpolate: '${month} ${day}' }",
|
|
283
286
|
"generatorr": "({context, gp}) => gp(context)",
|
|
284
287
|
"check": [
|
|
285
288
|
"marker",
|
|
@@ -300,6 +303,7 @@
|
|
|
300
303
|
},
|
|
301
304
|
{
|
|
302
305
|
"id": "monthYear_dates",
|
|
306
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:181",
|
|
303
307
|
"convolution": true,
|
|
304
308
|
"before": [
|
|
305
309
|
"preposition"
|
|
@@ -307,7 +311,7 @@
|
|
|
307
311
|
"isA": [
|
|
308
312
|
"date_dates"
|
|
309
313
|
],
|
|
310
|
-
"bridge": "{ ...next(operator),
|
|
314
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], year: after[1], interpolate: '${month} ${year}' }",
|
|
311
315
|
"generatorr": "({context, gp}) => gp(context)",
|
|
312
316
|
"check": [
|
|
313
317
|
"marker",
|
|
@@ -328,6 +332,7 @@
|
|
|
328
332
|
},
|
|
329
333
|
{
|
|
330
334
|
"id": "monthDayYear_dates",
|
|
335
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:191",
|
|
331
336
|
"convolution": true,
|
|
332
337
|
"before": [
|
|
333
338
|
"preposition",
|
|
@@ -336,14 +341,14 @@
|
|
|
336
341
|
"isA": [
|
|
337
342
|
"date_dates"
|
|
338
343
|
],
|
|
339
|
-
"
|
|
344
|
+
"semantic": "({context}) => {\n const year = context.year.value\n const day = context.day.value\n const month_ordinal = context.month.month_ordinal\n context.evalue = new Date(year, month_ordinal-1, day).toISOString()\n }",
|
|
340
345
|
"localHierarchy": [
|
|
341
346
|
[
|
|
342
347
|
"ordinal",
|
|
343
348
|
"dayNumber_dates"
|
|
344
349
|
]
|
|
345
350
|
],
|
|
346
|
-
"bridge": "{ ...next(operator),
|
|
351
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], day: after[1], year: after[2], interpolate: '${month} ${day} ${year}' }",
|
|
347
352
|
"generatorr": "({context, gp}) => gp(context)",
|
|
348
353
|
"check": [
|
|
349
354
|
"marker",
|
|
@@ -380,7 +385,7 @@
|
|
|
380
385
|
{
|
|
381
386
|
"id": "dayNumber_dates",
|
|
382
387
|
"uuid": "1",
|
|
383
|
-
"initial": "{ value: int(text),
|
|
388
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
384
389
|
}
|
|
385
390
|
]
|
|
386
391
|
},
|
|
@@ -398,7 +403,7 @@
|
|
|
398
403
|
{
|
|
399
404
|
"id": "monthNumber_dates",
|
|
400
405
|
"uuid": "1",
|
|
401
|
-
"initial": "{ value: int(text),
|
|
406
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
402
407
|
}
|
|
403
408
|
]
|
|
404
409
|
},
|
|
@@ -416,7 +421,7 @@
|
|
|
416
421
|
{
|
|
417
422
|
"id": "yearNumber_dates",
|
|
418
423
|
"uuid": "1",
|
|
419
|
-
"initial": "{ value: int(text),
|
|
424
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
420
425
|
}
|
|
421
426
|
]
|
|
422
427
|
}
|
|
@@ -493,7 +498,6 @@
|
|
|
493
498
|
"level": 1,
|
|
494
499
|
"context_index": 1,
|
|
495
500
|
"topLevel": true,
|
|
496
|
-
"context_id": 2,
|
|
497
501
|
"touchedBy": [
|
|
498
502
|
"dates#call2"
|
|
499
503
|
]
|
|
@@ -584,6 +588,9 @@
|
|
|
584
588
|
}
|
|
585
589
|
],
|
|
586
590
|
"learned_contextual_priorities": [],
|
|
591
|
+
"explain_associations_details": [
|
|
592
|
+
null
|
|
593
|
+
],
|
|
587
594
|
"query": "setidsuffix _dates",
|
|
588
595
|
"key": {
|
|
589
596
|
"query": "setidsuffix _dates"
|
|
@@ -2710,7 +2717,6 @@
|
|
|
2710
2717
|
"level": 2,
|
|
2711
2718
|
"context_index": 1,
|
|
2712
2719
|
"topLevel": true,
|
|
2713
|
-
"context_id": 2,
|
|
2714
2720
|
"touchedBy": [
|
|
2715
2721
|
"dates#call2"
|
|
2716
2722
|
]
|
|
@@ -9171,6 +9177,9 @@
|
|
|
9171
9177
|
}
|
|
9172
9178
|
],
|
|
9173
9179
|
"learned_contextual_priorities": [],
|
|
9180
|
+
"explain_associations_details": [
|
|
9181
|
+
null
|
|
9182
|
+
],
|
|
9174
9183
|
"query": "january, february, march, april, may, june, july, august, september, october, november and december are months",
|
|
9175
9184
|
"key": {
|
|
9176
9185
|
"query": "january, february, march, april, may, june, july, august, september, october, november and december are months"
|
|
@@ -10147,7 +10156,6 @@
|
|
|
10147
10156
|
"level": 2,
|
|
10148
10157
|
"context_index": 1,
|
|
10149
10158
|
"topLevel": true,
|
|
10150
|
-
"context_id": 2,
|
|
10151
10159
|
"touchedBy": [
|
|
10152
10160
|
"dates#call2"
|
|
10153
10161
|
]
|
|
@@ -12533,6 +12541,9 @@
|
|
|
12533
12541
|
}
|
|
12534
12542
|
],
|
|
12535
12543
|
"learned_contextual_priorities": [],
|
|
12544
|
+
"explain_associations_details": [
|
|
12545
|
+
null
|
|
12546
|
+
],
|
|
12536
12547
|
"query": "monday, tuesday, wednesday, thursday, friday, saturday and sunday are days",
|
|
12537
12548
|
"key": {
|
|
12538
12549
|
"query": "monday, tuesday, wednesday, thursday, friday, saturday and sunday are days"
|
|
@@ -13008,7 +13019,6 @@
|
|
|
13008
13019
|
"level": 2,
|
|
13009
13020
|
"context_index": 1,
|
|
13010
13021
|
"topLevel": true,
|
|
13011
|
-
"context_id": 2,
|
|
13012
13022
|
"touchedBy": [
|
|
13013
13023
|
"dates#call2"
|
|
13014
13024
|
]
|
|
@@ -13909,6 +13919,9 @@
|
|
|
13909
13919
|
}
|
|
13910
13920
|
],
|
|
13911
13921
|
"learned_contextual_priorities": [],
|
|
13922
|
+
"explain_associations_details": [
|
|
13923
|
+
null
|
|
13924
|
+
],
|
|
13912
13925
|
"query": "ac, bc, bce and ad are eras",
|
|
13913
13926
|
"key": {
|
|
13914
13927
|
"query": "ac, bc, bce and ad are eras"
|
|
@@ -14180,7 +14193,6 @@
|
|
|
14180
14193
|
"level": 0,
|
|
14181
14194
|
"context_index": 1,
|
|
14182
14195
|
"topLevel": true,
|
|
14183
|
-
"context_id": 2,
|
|
14184
14196
|
"touchedBy": [
|
|
14185
14197
|
"dates#call2"
|
|
14186
14198
|
]
|
|
@@ -14531,6 +14543,9 @@
|
|
|
14531
14543
|
}
|
|
14532
14544
|
],
|
|
14533
14545
|
"learned_contextual_priorities": [],
|
|
14546
|
+
"explain_associations_details": [
|
|
14547
|
+
null
|
|
14548
|
+
],
|
|
14534
14549
|
"query": "birth date is an open compound",
|
|
14535
14550
|
"key": {
|
|
14536
14551
|
"query": "birth date is an open compound"
|
|
@@ -14721,7 +14736,6 @@
|
|
|
14721
14736
|
"level": 2,
|
|
14722
14737
|
"context_index": 1,
|
|
14723
14738
|
"topLevel": true,
|
|
14724
|
-
"context_id": 2,
|
|
14725
14739
|
"touchedBy": [
|
|
14726
14740
|
"dates#call2"
|
|
14727
14741
|
]
|
|
@@ -14957,6 +14971,9 @@
|
|
|
14957
14971
|
}
|
|
14958
14972
|
],
|
|
14959
14973
|
"learned_contextual_priorities": [],
|
|
14974
|
+
"explain_associations_details": [
|
|
14975
|
+
null
|
|
14976
|
+
],
|
|
14960
14977
|
"query": "birth date is a date",
|
|
14961
14978
|
"key": {
|
|
14962
14979
|
"query": "birth date is a date"
|
|
@@ -15135,6 +15152,7 @@
|
|
|
15135
15152
|
},
|
|
15136
15153
|
{
|
|
15137
15154
|
"id": "dateEra_dates",
|
|
15155
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:129",
|
|
15138
15156
|
"isA": [
|
|
15139
15157
|
"date_dates"
|
|
15140
15158
|
],
|
|
@@ -15165,6 +15183,7 @@
|
|
|
15165
15183
|
},
|
|
15166
15184
|
{
|
|
15167
15185
|
"id": "monthDayYearWithSlashes_dates",
|
|
15186
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:143",
|
|
15168
15187
|
"isA": [
|
|
15169
15188
|
"date_dates"
|
|
15170
15189
|
],
|
|
@@ -15173,7 +15192,7 @@
|
|
|
15173
15192
|
],
|
|
15174
15193
|
"separators": "||||",
|
|
15175
15194
|
"convolution": true,
|
|
15176
|
-
"bridge": "{ ...next(operator), day: after[2],
|
|
15195
|
+
"bridge": "{ ...next(operator), day: after[2], isInstance: true, month: after[0], year: after[4], interpolate: '${month}/${day}/${year}' }",
|
|
15177
15196
|
"check": [
|
|
15178
15197
|
"marker",
|
|
15179
15198
|
"text",
|
|
@@ -15197,24 +15216,25 @@
|
|
|
15197
15216
|
"isA": [
|
|
15198
15217
|
"integer"
|
|
15199
15218
|
],
|
|
15200
|
-
"bridge": "{ ...next(operator),
|
|
15219
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
15201
15220
|
},
|
|
15202
15221
|
{
|
|
15203
15222
|
"id": "monthNumber_dates",
|
|
15204
15223
|
"isA": [
|
|
15205
15224
|
"integer"
|
|
15206
15225
|
],
|
|
15207
|
-
"bridge": "{ ...next(operator),
|
|
15226
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
15208
15227
|
},
|
|
15209
15228
|
{
|
|
15210
15229
|
"id": "yearNumber_dates",
|
|
15211
15230
|
"isA": [
|
|
15212
15231
|
"integer"
|
|
15213
15232
|
],
|
|
15214
|
-
"bridge": "{ ...next(operator),
|
|
15233
|
+
"bridge": "{ ...next(operator), isInstance: true }"
|
|
15215
15234
|
},
|
|
15216
15235
|
{
|
|
15217
15236
|
"id": "monthDay_dates",
|
|
15237
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:170",
|
|
15218
15238
|
"convolution": true,
|
|
15219
15239
|
"localHierarchy": [
|
|
15220
15240
|
[
|
|
@@ -15228,7 +15248,7 @@
|
|
|
15228
15248
|
"isA": [
|
|
15229
15249
|
"date_dates"
|
|
15230
15250
|
],
|
|
15231
|
-
"bridge": "{ ...next(operator),
|
|
15251
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], day: after[1], interpolate: '${month} ${day}' }",
|
|
15232
15252
|
"check": [
|
|
15233
15253
|
"marker",
|
|
15234
15254
|
"text",
|
|
@@ -15248,6 +15268,7 @@
|
|
|
15248
15268
|
},
|
|
15249
15269
|
{
|
|
15250
15270
|
"id": "monthYear_dates",
|
|
15271
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:181",
|
|
15251
15272
|
"convolution": true,
|
|
15252
15273
|
"before": [
|
|
15253
15274
|
"preposition"
|
|
@@ -15255,7 +15276,7 @@
|
|
|
15255
15276
|
"isA": [
|
|
15256
15277
|
"date_dates"
|
|
15257
15278
|
],
|
|
15258
|
-
"bridge": "{ ...next(operator),
|
|
15279
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], year: after[1], interpolate: '${month} ${year}' }",
|
|
15259
15280
|
"check": [
|
|
15260
15281
|
"marker",
|
|
15261
15282
|
"text",
|
|
@@ -15275,6 +15296,7 @@
|
|
|
15275
15296
|
},
|
|
15276
15297
|
{
|
|
15277
15298
|
"id": "monthDayYear_dates",
|
|
15299
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/dates.js:191",
|
|
15278
15300
|
"convolution": true,
|
|
15279
15301
|
"before": [
|
|
15280
15302
|
"preposition",
|
|
@@ -15289,7 +15311,7 @@
|
|
|
15289
15311
|
"dayNumber_dates"
|
|
15290
15312
|
]
|
|
15291
15313
|
],
|
|
15292
|
-
"bridge": "{ ...next(operator),
|
|
15314
|
+
"bridge": "{ ...next(operator), isInstance: true, month: after[0], day: after[1], year: after[2], interpolate: '${month} ${day} ${year}' }",
|
|
15293
15315
|
"check": [
|
|
15294
15316
|
"marker",
|
|
15295
15317
|
"text",
|
|
@@ -15325,7 +15347,7 @@
|
|
|
15325
15347
|
{
|
|
15326
15348
|
"id": "dayNumber_dates",
|
|
15327
15349
|
"uuid": "1",
|
|
15328
|
-
"initial": "{ value: int(text),
|
|
15350
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
15329
15351
|
}
|
|
15330
15352
|
]
|
|
15331
15353
|
},
|
|
@@ -15343,7 +15365,7 @@
|
|
|
15343
15365
|
{
|
|
15344
15366
|
"id": "monthNumber_dates",
|
|
15345
15367
|
"uuid": "1",
|
|
15346
|
-
"initial": "{ value: int(text),
|
|
15368
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
15347
15369
|
}
|
|
15348
15370
|
]
|
|
15349
15371
|
},
|
|
@@ -15361,7 +15383,7 @@
|
|
|
15361
15383
|
{
|
|
15362
15384
|
"id": "yearNumber_dates",
|
|
15363
15385
|
"uuid": "1",
|
|
15364
|
-
"initial": "{ value: int(text),
|
|
15386
|
+
"initial": "{ value: int(text), isInstance: true }"
|
|
15365
15387
|
}
|
|
15366
15388
|
]
|
|
15367
15389
|
}
|
|
@@ -15392,7 +15414,6 @@
|
|
|
15392
15414
|
"level": 0,
|
|
15393
15415
|
"context_index": 1,
|
|
15394
15416
|
"topLevel": true,
|
|
15395
|
-
"context_id": 2,
|
|
15396
15417
|
"touchedBy": [
|
|
15397
15418
|
"dates#call2"
|
|
15398
15419
|
]
|
|
@@ -15433,6 +15454,9 @@
|
|
|
15433
15454
|
}
|
|
15434
15455
|
],
|
|
15435
15456
|
"learned_contextual_priorities": [],
|
|
15457
|
+
"explain_associations_details": [
|
|
15458
|
+
null
|
|
15459
|
+
],
|
|
15436
15460
|
"query": "resetIdSuffix",
|
|
15437
15461
|
"key": {
|
|
15438
15462
|
"query": "resetIdSuffix"
|
package/common/dates.js
CHANGED
|
@@ -126,6 +126,7 @@ const template = {
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
id: 'dateEra_dates',
|
|
129
|
+
where: where(),
|
|
129
130
|
isA: ['date_dates'],
|
|
130
131
|
convolution: true,
|
|
131
132
|
bridge: "{ ...next(after[0]), era: after[1], interpolate: concat(after[0].interpolate, ' ${era}') }",
|
|
@@ -139,11 +140,12 @@ const template = {
|
|
|
139
140
|
},
|
|
140
141
|
{
|
|
141
142
|
id: 'monthDayYearWithSlashes_dates',
|
|
143
|
+
where: where(),
|
|
142
144
|
isA: ['date_dates'],
|
|
143
145
|
before: ['preposition'],
|
|
144
146
|
separators: "||||",
|
|
145
147
|
convolution: true,
|
|
146
|
-
bridge: "{ ...next(operator), day: after[2],
|
|
148
|
+
bridge: "{ ...next(operator), day: after[2], isInstance: true, month: after[0], year: after[4], interpolate: '${month}/${day}/${year}' }",
|
|
147
149
|
generatorr: ({context, gp}) => gp(context),
|
|
148
150
|
check: defaultContextCheckProperties(['day', 'month', 'year']),
|
|
149
151
|
},
|
|
@@ -151,43 +153,46 @@ const template = {
|
|
|
151
153
|
id: 'dayNumber_dates',
|
|
152
154
|
isA: ['integer'],
|
|
153
155
|
//associations: ['dates'],
|
|
154
|
-
bridge: "{ ...next(operator),
|
|
156
|
+
bridge: "{ ...next(operator), isInstance: true }"
|
|
155
157
|
},
|
|
156
158
|
{
|
|
157
159
|
id: 'monthNumber_dates',
|
|
158
160
|
isA: ['integer'],
|
|
159
|
-
bridge: "{ ...next(operator),
|
|
161
|
+
bridge: "{ ...next(operator), isInstance: true }"
|
|
160
162
|
},
|
|
161
163
|
{
|
|
162
164
|
id: 'yearNumber_dates',
|
|
163
165
|
isA: ['integer'],
|
|
164
|
-
bridge: "{ ...next(operator),
|
|
166
|
+
bridge: "{ ...next(operator), isInstance: true }"
|
|
165
167
|
},
|
|
166
168
|
{
|
|
167
169
|
id: 'monthDay_dates',
|
|
170
|
+
where: where(),
|
|
168
171
|
convolution: true,
|
|
169
172
|
localHierarchy: [['ordinal', 'dayNumber_dates']],
|
|
170
173
|
before: ['preposition'],
|
|
171
174
|
isA: ['date_dates'],
|
|
172
|
-
bridge: "{ ...next(operator),
|
|
175
|
+
bridge: "{ ...next(operator), isInstance: true, month: after[0], day: after[1], interpolate: '${month} ${day}' }",
|
|
173
176
|
generatorr: ({context, gp}) => gp(context),
|
|
174
177
|
check: defaultContextCheckProperties(['day', 'month']),
|
|
175
178
|
},
|
|
176
179
|
{
|
|
177
180
|
id: 'monthYear_dates',
|
|
181
|
+
where: where(),
|
|
178
182
|
convolution: true,
|
|
179
183
|
before: ['preposition'],
|
|
180
184
|
isA: ['date_dates'],
|
|
181
|
-
bridge: "{ ...next(operator),
|
|
185
|
+
bridge: "{ ...next(operator), isInstance: true, month: after[0], year: after[1], interpolate: '${month} ${year}' }",
|
|
182
186
|
generatorr: ({context, gp}) => gp(context),
|
|
183
187
|
check: defaultContextCheckProperties(['month', 'year']),
|
|
184
188
|
},
|
|
185
189
|
{
|
|
186
190
|
id: 'monthDayYear_dates',
|
|
191
|
+
where: where(),
|
|
187
192
|
convolution: true,
|
|
188
193
|
before: ['preposition', 'monthDay_dates'],
|
|
189
194
|
isA: ['date_dates'],
|
|
190
|
-
|
|
195
|
+
semantic: ({context}) => {
|
|
191
196
|
const year = context.year.value
|
|
192
197
|
const day = context.day.value
|
|
193
198
|
const month_ordinal = context.month.month_ordinal
|
|
@@ -196,7 +201,7 @@ const template = {
|
|
|
196
201
|
localHierarchy: [
|
|
197
202
|
['ordinal', 'dayNumber_dates'],
|
|
198
203
|
],
|
|
199
|
-
bridge: "{ ...next(operator),
|
|
204
|
+
bridge: "{ ...next(operator), isInstance: true, month: after[0], day: after[1], year: after[2], interpolate: '${month} ${day} ${year}' }",
|
|
200
205
|
generatorr: ({context, gp}) => gp(context),
|
|
201
206
|
check: defaultContextCheckProperties(['month', 'day', 'year']),
|
|
202
207
|
},
|
|
@@ -206,17 +211,17 @@ const template = {
|
|
|
206
211
|
{
|
|
207
212
|
pattern: [{ type: 'digit' }, { repeat: true }],
|
|
208
213
|
allow_partial_matches: false,
|
|
209
|
-
defs: [{id: "dayNumber_dates", uuid: '1', initial: "{ value: int(text),
|
|
214
|
+
defs: [{id: "dayNumber_dates", uuid: '1', initial: "{ value: int(text), isInstance: true }" }]
|
|
210
215
|
},
|
|
211
216
|
{
|
|
212
217
|
pattern: [{ type: 'digit' }, { repeat: true }],
|
|
213
218
|
allow_partial_matches: false,
|
|
214
|
-
defs: [{id: "monthNumber_dates", uuid: '1', initial: "{ value: int(text),
|
|
219
|
+
defs: [{id: "monthNumber_dates", uuid: '1', initial: "{ value: int(text), isInstance: true }" }]
|
|
215
220
|
},
|
|
216
221
|
{
|
|
217
222
|
pattern: [{ type: 'digit' }, { repeat: true }],
|
|
218
223
|
allow_partial_matches: false,
|
|
219
|
-
defs: [{id: "yearNumber_dates", uuid: '1', initial: "{ value: int(text),
|
|
224
|
+
defs: [{id: "yearNumber_dates", uuid: '1', initial: "{ value: int(text), isInstance: true }" }]
|
|
220
225
|
},
|
|
221
226
|
],
|
|
222
227
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configs": [
|
|
3
|
+
{
|
|
4
|
+
"operators": [
|
|
5
|
+
"([setdebugbreak] (*))",
|
|
6
|
+
"([debugger] (*))"
|
|
7
|
+
],
|
|
8
|
+
"bridges": [
|
|
9
|
+
{
|
|
10
|
+
"id": "setdebugbreak",
|
|
11
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/debug.js:16",
|
|
12
|
+
"bridge": "{\n ...next(operator),\n tag: after[0]\n }",
|
|
13
|
+
"semantic": "({context, debug}) => {\n debug.hit(context.tag.word)\n }"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "debugger",
|
|
17
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/debug.js:27",
|
|
18
|
+
"semantic": "(args) => {\n debugger // eslint-disable-line no-debugger\n debugger // eslint-disable-line no-debugger\n }"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"resultss": [
|
|
24
|
+
{
|
|
25
|
+
"extraConfig": true,
|
|
26
|
+
"operators": [
|
|
27
|
+
"([setdebugbreak] (*))",
|
|
28
|
+
"([debugger] (*))"
|
|
29
|
+
],
|
|
30
|
+
"bridges": [
|
|
31
|
+
{
|
|
32
|
+
"id": "setdebugbreak",
|
|
33
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/debug.js:16",
|
|
34
|
+
"bridge": "{\n ...next(operator),\n tag: after[0]\n }"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "debugger",
|
|
38
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/debug.js:27"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"fragments": [],
|
|
44
|
+
"semantics": [],
|
|
45
|
+
"associations": [],
|
|
46
|
+
"summaries": [],
|
|
47
|
+
"learned_contextual_priorities": []
|
|
48
|
+
}
|
package/common/debug.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
|
2
|
+
const tests = require('./debug.test.json')
|
|
3
|
+
const instance = require('./debug.instance.json')
|
|
4
|
+
const tokenize = require('./tokenize')
|
|
5
|
+
|
|
6
|
+
const template = {
|
|
7
|
+
configs: [
|
|
8
|
+
{
|
|
9
|
+
operators: [
|
|
10
|
+
"([setdebugbreak] (*))",
|
|
11
|
+
"([debugger] (*))",
|
|
12
|
+
],
|
|
13
|
+
bridges: [
|
|
14
|
+
{
|
|
15
|
+
id: 'setdebugbreak',
|
|
16
|
+
where: where(),
|
|
17
|
+
bridge: `{
|
|
18
|
+
...next(operator),
|
|
19
|
+
tag: after[0]
|
|
20
|
+
}`,
|
|
21
|
+
semantic: ({context, debug}) => {
|
|
22
|
+
debug.hit(context.tag.word)
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'debugger',
|
|
27
|
+
where: where(),
|
|
28
|
+
semantic: (args) => {
|
|
29
|
+
debugger // eslint-disable-line no-debugger
|
|
30
|
+
debugger // eslint-disable-line no-debugger
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
knowledgeModule( {
|
|
39
|
+
config: { name: 'debug' },
|
|
40
|
+
includes: [tokenize],
|
|
41
|
+
|
|
42
|
+
module,
|
|
43
|
+
description: 'sending debug commands',
|
|
44
|
+
test: {
|
|
45
|
+
name: './debug.test.json',
|
|
46
|
+
contents: tests,
|
|
47
|
+
},
|
|
48
|
+
instance,
|
|
49
|
+
template,
|
|
50
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|