tpmkms_4wp 8.9.1-beta.2 → 8.9.1-beta.20
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 +260 -68
- package/common/articles.js +20 -4
- package/common/articles.test.json +338 -0
- package/common/asking.js +2 -2
- package/common/asking.test.json +41 -0
- package/common/avatar.js +1 -1
- package/common/characters.js +1 -1
- package/common/colors.instance.json +280 -129
- package/common/comparable.instance.json +60 -12
- package/common/comparable.js +2 -2
- package/common/concept.js +1 -1
- package/common/conjunction.js +1 -1
- package/common/countable.js +3 -9
- package/common/countable.test.json +0 -586
- package/common/crew.instance.json +604 -380
- package/common/currency.js +2 -2
- package/common/dialogues.js +28 -11
- package/common/dimension.instance.json +16 -8
- package/common/dimension.js +2 -2
- package/common/edible.instance.json +512 -278
- package/common/emotions.instance.json +20 -4
- package/common/errors.js +3 -1
- package/common/events.js +1 -1
- package/common/fastfood.instance.json +2138 -1357
- package/common/fastfood.js +4 -4
- package/common/formulas.instance.json +16 -5
- package/common/formulas.js +1 -1
- package/common/formulas.test.json +461 -10
- package/common/gdefaults.js +22 -14
- package/common/help.js +4 -4
- package/common/help.test.json +4 -4
- package/common/helpers/concept.js +5 -5
- package/common/helpers/conjunction.js +1 -1
- package/common/helpers/formulas.js +4 -4
- package/common/helpers/frankenhash.js +4 -4
- package/common/helpers/meta.js +4 -4
- package/common/helpers/ordering.js +2 -2
- package/common/helpers/properties.js +17 -17
- package/common/helpers.js +17 -1
- package/common/hierarchy.js +3 -3
- package/common/javascript.js +1 -1
- package/common/kirk.instance.json +20 -4
- package/common/length.instance.json +240 -80
- package/common/math.instance.json +16 -5
- package/common/math.js +1 -1
- package/common/meta.js +5 -5
- package/common/negation.js +1 -1
- package/common/numbers.js +1 -1
- package/common/ordering.instance.json +41 -63
- package/common/ordinals.js +9 -3
- package/common/ordinals.test.json +327 -0
- package/common/people.instance.json +160 -32
- package/common/people.js +1 -1
- package/common/percentages.js +1 -1
- package/common/pipboy.instance.json +282 -252
- package/common/pipboy.js +6 -6
- package/common/pokemon.instance.json +260 -57
- package/common/pos.js +16 -6
- package/common/pressure.instance.json +64 -23
- package/common/properties.instance.json +20 -4
- package/common/properties.js +5 -5
- package/common/punctuation.js +1 -1
- package/common/reports.instance.json +34 -12
- package/common/reports.js +8 -8
- package/common/scorekeeper.js +5 -5
- package/common/sdefaults.js +2 -2
- package/common/sizeable.js +2 -2
- package/common/spock.instance.json +20 -4
- package/common/stm.js +6 -6
- package/common/tell.js +1 -1
- package/common/temperature.instance.json +64 -24
- package/common/tester.js +1 -1
- package/common/ui.instance.json +21 -5
- package/common/weight.instance.json +192 -64
- package/common/wp.instance.json +6378 -463
- package/common/wp.js +188 -41
- package/common/wp.test.json +109609 -3828
- package/common/yesno.js +1 -1
- package/package.json +11 -6
@@ -211,7 +211,7 @@
|
|
211
211
|
"hierarchy": [
|
212
212
|
[
|
213
213
|
"a",
|
214
|
-
"
|
214
|
+
"article",
|
215
215
|
false
|
216
216
|
],
|
217
217
|
[
|
@@ -225,8 +225,8 @@
|
|
225
225
|
false
|
226
226
|
],
|
227
227
|
[
|
228
|
-
"
|
229
|
-
"
|
228
|
+
"article",
|
229
|
+
"article",
|
230
230
|
false
|
231
231
|
],
|
232
232
|
[
|
@@ -344,11 +344,21 @@
|
|
344
344
|
"theAble",
|
345
345
|
false
|
346
346
|
],
|
347
|
+
[
|
348
|
+
"distributable",
|
349
|
+
"queryable",
|
350
|
+
false
|
351
|
+
],
|
347
352
|
[
|
348
353
|
"doubleQuote",
|
349
354
|
"queryable",
|
350
355
|
false
|
351
356
|
],
|
357
|
+
[
|
358
|
+
"each",
|
359
|
+
"article",
|
360
|
+
false
|
361
|
+
],
|
352
362
|
[
|
353
363
|
"evaluate",
|
354
364
|
"verb",
|
@@ -356,7 +366,7 @@
|
|
356
366
|
],
|
357
367
|
[
|
358
368
|
"every",
|
359
|
-
"
|
369
|
+
"article",
|
360
370
|
false
|
361
371
|
],
|
362
372
|
[
|
@@ -701,7 +711,7 @@
|
|
701
711
|
],
|
702
712
|
[
|
703
713
|
"the",
|
704
|
-
"
|
714
|
+
"article",
|
705
715
|
false
|
706
716
|
],
|
707
717
|
[
|
@@ -892,6 +902,7 @@
|
|
892
902
|
"level": 1
|
893
903
|
},
|
894
904
|
"level": 1,
|
905
|
+
"context_index": 1,
|
895
906
|
"topLevel": true,
|
896
907
|
"touchedBy": [
|
897
908
|
"math#call2"
|
package/common/math.js
CHANGED
package/common/meta.js
CHANGED
@@ -17,7 +17,7 @@ const template = {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
// TODO -> if a car's top speed is over 200 mph then the car is fast
|
20
|
-
|
20
|
+
const config = {
|
21
21
|
name: 'meta',
|
22
22
|
operators: [
|
23
23
|
"((phrase) [means] (phrase))",
|
@@ -208,7 +208,7 @@ let config = {
|
|
208
208
|
//const mappings = mappingss[0]
|
209
209
|
let toPrimes = []
|
210
210
|
for (const [TO, mappings] of zip(DEFINITIONs, mappingss)) {
|
211
|
-
for (
|
211
|
+
for (const { from, to } of invertMappings(mappings)) {
|
212
212
|
hashIndexesSet(TO, to, hashIndexesGet(context, from))
|
213
213
|
}
|
214
214
|
// next move add debug arg to s and g
|
@@ -236,7 +236,7 @@ let config = {
|
|
236
236
|
for (const [relations, mappings] of toPrimes) {
|
237
237
|
for (const relation of relations.evalue.value) {
|
238
238
|
valuePrime = _.cloneDeep(DERIVED)
|
239
|
-
for (
|
239
|
+
for (const { from, to } of mappings) {
|
240
240
|
hashIndexesSet(valuePrime, to, hashIndexesGet(relation, from))
|
241
241
|
}
|
242
242
|
valuePrime.paraphrase = true
|
@@ -303,7 +303,7 @@ let config = {
|
|
303
303
|
const matchByValue = (defContext) => ({context}) => context.evalue == defContext.from.value && !context.query && !context.objects
|
304
304
|
const apply = (mappings, TO) => async ({context, s}) => {
|
305
305
|
TO = _.cloneDeep(TO)
|
306
|
-
for (
|
306
|
+
for (const { from, to } of mappings) {
|
307
307
|
hashIndexesSet(TO, to, hashIndexesGet(context, from))
|
308
308
|
}
|
309
309
|
toPrime = await s(TO)
|
@@ -330,7 +330,7 @@ let config = {
|
|
330
330
|
const matchByValue = (defContext) => ({context, uuid}) => context.value == defContext.from.value && (context.query || context.evaluate) && !context[`disable${uuid}`]
|
331
331
|
const apply = (mappings, TO) => async ({uuid, context, s, g, config}) => {
|
332
332
|
TO = _.cloneDeep(TO)
|
333
|
-
for (
|
333
|
+
for (const { from, to } of mappings) {
|
334
334
|
hashIndexesSet(TO, to, hashIndexesGet(context, from))
|
335
335
|
}
|
336
336
|
// next move add debug arg to s and g
|
package/common/negation.js
CHANGED
package/common/numbers.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"hierarchy": [
|
9
9
|
[
|
10
10
|
"a",
|
11
|
-
"
|
11
|
+
"article",
|
12
12
|
false
|
13
13
|
],
|
14
14
|
[
|
@@ -17,8 +17,8 @@
|
|
17
17
|
false
|
18
18
|
],
|
19
19
|
[
|
20
|
-
"
|
21
|
-
"
|
20
|
+
"article",
|
21
|
+
"article",
|
22
22
|
false
|
23
23
|
],
|
24
24
|
[
|
@@ -66,16 +66,31 @@
|
|
66
66
|
"orAble",
|
67
67
|
false
|
68
68
|
],
|
69
|
+
[
|
70
|
+
"distributable",
|
71
|
+
"queryable",
|
72
|
+
false
|
73
|
+
],
|
69
74
|
[
|
70
75
|
"doubleQuote",
|
71
76
|
"queryable",
|
72
77
|
false
|
73
78
|
],
|
79
|
+
[
|
80
|
+
"each",
|
81
|
+
"article",
|
82
|
+
false
|
83
|
+
],
|
74
84
|
[
|
75
85
|
"evaluate",
|
76
86
|
"verb",
|
77
87
|
false
|
78
88
|
],
|
89
|
+
[
|
90
|
+
"every",
|
91
|
+
"article",
|
92
|
+
false
|
93
|
+
],
|
79
94
|
[
|
80
95
|
"hate",
|
81
96
|
"canBeDoQuestion",
|
@@ -293,7 +308,7 @@
|
|
293
308
|
],
|
294
309
|
[
|
295
310
|
"the",
|
296
|
-
"
|
311
|
+
"article",
|
297
312
|
false
|
298
313
|
],
|
299
314
|
[
|
@@ -650,7 +665,7 @@
|
|
650
665
|
},
|
651
666
|
"types": [
|
652
667
|
"list",
|
653
|
-
"
|
668
|
+
"unknown"
|
654
669
|
],
|
655
670
|
"listable": true,
|
656
671
|
"isList": true,
|
@@ -666,7 +681,6 @@
|
|
666
681
|
"end": 26
|
667
682
|
},
|
668
683
|
"types": [
|
669
|
-
"queryable",
|
670
684
|
"unknown"
|
671
685
|
],
|
672
686
|
"dead": true,
|
@@ -683,7 +697,6 @@
|
|
683
697
|
"end": 37
|
684
698
|
},
|
685
699
|
"types": [
|
686
|
-
"queryable",
|
687
700
|
"unknown"
|
688
701
|
],
|
689
702
|
"dead": true,
|
@@ -696,6 +709,7 @@
|
|
696
709
|
},
|
697
710
|
"dead": true,
|
698
711
|
"level": 2,
|
712
|
+
"context_index": 1,
|
699
713
|
"topLevel": true,
|
700
714
|
"touchedBy": [
|
701
715
|
"ordering#call2"
|
@@ -740,32 +754,6 @@
|
|
740
754
|
0
|
741
755
|
]
|
742
756
|
],
|
743
|
-
[
|
744
|
-
[
|
745
|
-
"between",
|
746
|
-
0
|
747
|
-
],
|
748
|
-
[
|
749
|
-
"is",
|
750
|
-
0
|
751
|
-
],
|
752
|
-
[
|
753
|
-
"list",
|
754
|
-
0
|
755
|
-
],
|
756
|
-
[
|
757
|
-
"unknown",
|
758
|
-
0
|
759
|
-
],
|
760
|
-
[
|
761
|
-
"unknown",
|
762
|
-
1
|
763
|
-
],
|
764
|
-
[
|
765
|
-
"xfx",
|
766
|
-
0
|
767
|
-
]
|
768
|
-
],
|
769
757
|
[
|
770
758
|
[
|
771
759
|
"between",
|
@@ -885,7 +873,7 @@
|
|
885
873
|
"hierarchy": [
|
886
874
|
[
|
887
875
|
"a",
|
888
|
-
"
|
876
|
+
"article",
|
889
877
|
false
|
890
878
|
],
|
891
879
|
[
|
@@ -894,8 +882,8 @@
|
|
894
882
|
false
|
895
883
|
],
|
896
884
|
[
|
897
|
-
"
|
898
|
-
"
|
885
|
+
"article",
|
886
|
+
"article",
|
899
887
|
false
|
900
888
|
],
|
901
889
|
[
|
@@ -943,16 +931,31 @@
|
|
943
931
|
"orAble",
|
944
932
|
false
|
945
933
|
],
|
934
|
+
[
|
935
|
+
"distributable",
|
936
|
+
"queryable",
|
937
|
+
false
|
938
|
+
],
|
946
939
|
[
|
947
940
|
"doubleQuote",
|
948
941
|
"queryable",
|
949
942
|
false
|
950
943
|
],
|
944
|
+
[
|
945
|
+
"each",
|
946
|
+
"article",
|
947
|
+
false
|
948
|
+
],
|
951
949
|
[
|
952
950
|
"evaluate",
|
953
951
|
"verb",
|
954
952
|
false
|
955
953
|
],
|
954
|
+
[
|
955
|
+
"every",
|
956
|
+
"article",
|
957
|
+
false
|
958
|
+
],
|
956
959
|
[
|
957
960
|
"hate",
|
958
961
|
"canBeDoQuestion",
|
@@ -1170,7 +1173,7 @@
|
|
1170
1173
|
],
|
1171
1174
|
[
|
1172
1175
|
"the",
|
1173
|
-
"
|
1176
|
+
"article",
|
1174
1177
|
false
|
1175
1178
|
],
|
1176
1179
|
[
|
@@ -2014,6 +2017,7 @@
|
|
2014
2017
|
"level": 1
|
2015
2018
|
},
|
2016
2019
|
"level": 1,
|
2020
|
+
"context_index": 1,
|
2017
2021
|
"topLevel": true,
|
2018
2022
|
"touchedBy": [
|
2019
2023
|
"ordering#call2"
|
@@ -2299,32 +2303,6 @@
|
|
2299
2303
|
0
|
2300
2304
|
]
|
2301
2305
|
],
|
2302
|
-
[
|
2303
|
-
[
|
2304
|
-
"between",
|
2305
|
-
0
|
2306
|
-
],
|
2307
|
-
[
|
2308
|
-
"is",
|
2309
|
-
0
|
2310
|
-
],
|
2311
|
-
[
|
2312
|
-
"list",
|
2313
|
-
0
|
2314
|
-
],
|
2315
|
-
[
|
2316
|
-
"unknown",
|
2317
|
-
0
|
2318
|
-
],
|
2319
|
-
[
|
2320
|
-
"unknown",
|
2321
|
-
1
|
2322
|
-
],
|
2323
|
-
[
|
2324
|
-
"xfx",
|
2325
|
-
0
|
2326
|
-
]
|
2327
|
-
],
|
2328
2306
|
[
|
2329
2307
|
[
|
2330
2308
|
"between",
|
package/common/ordinals.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const ordinals_tests = require('./ordinals.test.json')
|
4
|
+
const articles = require('./articles')
|
4
5
|
const numbers = require('./numbers')
|
5
6
|
const pos = require('./pos')
|
6
7
|
|
7
|
-
|
8
|
+
const config = {
|
8
9
|
name: 'ordinals',
|
9
10
|
operators: [
|
10
11
|
"([ordinal])",
|
@@ -18,12 +19,14 @@ let config = {
|
|
18
19
|
},
|
19
20
|
{
|
20
21
|
id: "orderable",
|
21
|
-
bridge: "{ ...next(operator) }"
|
22
|
+
bridge: "{ ...next(operator) }",
|
23
|
+
isA: ['queryable'],
|
22
24
|
},
|
23
25
|
{
|
24
26
|
id: "ordinalOnOrdered",
|
25
27
|
isA: ['adjective'],
|
26
28
|
convolution: true,
|
29
|
+
// bridge: "{ ...after[0], ordinal: before[0], modifiers: append(['ordinal'], after[0].modifiers), generate: append(['ordinal'], or(after[0].generate, after)) }"
|
27
30
|
bridge: "{ ...after[0], ordinal: before[0], modifiers: append(['ordinal'], after[0].modifiers) }"
|
28
31
|
},
|
29
32
|
],
|
@@ -39,13 +42,16 @@ let config = {
|
|
39
42
|
},
|
40
43
|
patterns: [
|
41
44
|
{ "pattern": [{ type: 'digit' }, { repeat: true }, 'th'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
|
45
|
+
{ "pattern": [{ type: 'digit' }, { repeat: true }, '1st'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
|
46
|
+
{ "pattern": [{ type: 'digit' }, { repeat: true }, '2nd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
|
47
|
+
{ "pattern": [{ type: 'digit' }, { repeat: true }, '3rd'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
|
42
48
|
],
|
43
49
|
},
|
44
50
|
};
|
45
51
|
|
46
52
|
knowledgeModule( {
|
47
53
|
config,
|
48
|
-
includes: [pos, numbers],
|
54
|
+
includes: [pos, numbers, articles],
|
49
55
|
|
50
56
|
module,
|
51
57
|
description: 'talking about ordinals',
|