tpmkms 9.7.1-beta.12 → 9.7.1-beta.13
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/angle.instance.json +27 -0
- package/common/articles.js +38 -4
- package/common/can.instance.json +1 -1
- package/common/conjunction.js +2 -2
- package/common/countable.js +39 -5
- package/common/crew.instance.json +1029 -98
- package/common/crew.js +3 -3
- package/common/dialogues.js +3 -4
- package/common/dimension.instance.json +124 -6
- package/common/dimension.js +3 -4
- package/common/drone.instance.json +33 -42
- package/common/drone.js +3 -3
- package/common/edible.instance.json +72 -0
- package/common/emotions.instance.json +143 -4
- package/common/fastfood.instance.json +304 -197
- package/common/fastfood.js +7 -0
- package/common/gdefaults.js +12 -121
- package/common/hierarchy.js +0 -1
- package/common/length.instance.json +27 -0
- package/common/ordinals.js +9 -3
- package/common/pipboy.instance.json +2 -2
- package/common/pipboy.js +3 -3
- package/common/pressure.instance.json +27 -0
- package/common/properties.instance.json +314 -37
- package/common/properties.js +21 -24
- package/common/reports.instance.json +2 -2
- package/common/stm.js +0 -1
- package/common/temperature.instance.json +27 -0
- package/common/time.instance.json +27 -0
- package/common/weight.instance.json +27 -0
- package/common/wp.instance.json +21 -21
- package/common/wp.js +62 -10
- package/package.json +2 -2
|
@@ -4420,6 +4420,33 @@
|
|
|
4420
4420
|
"unit"
|
|
4421
4421
|
],
|
|
4422
4422
|
"propertyOf": true,
|
|
4423
|
+
"interpolate": [
|
|
4424
|
+
{
|
|
4425
|
+
"property": "property"
|
|
4426
|
+
},
|
|
4427
|
+
{
|
|
4428
|
+
"word": "of"
|
|
4429
|
+
},
|
|
4430
|
+
{
|
|
4431
|
+
"property": "object"
|
|
4432
|
+
}
|
|
4433
|
+
],
|
|
4434
|
+
"property": {
|
|
4435
|
+
"value": "unit",
|
|
4436
|
+
"number": "many",
|
|
4437
|
+
"text": "units",
|
|
4438
|
+
"marker": "unit",
|
|
4439
|
+
"dead": true,
|
|
4440
|
+
"word": "units",
|
|
4441
|
+
"range": {
|
|
4442
|
+
"start": 24,
|
|
4443
|
+
"end": 28
|
|
4444
|
+
},
|
|
4445
|
+
"types": [
|
|
4446
|
+
"unit"
|
|
4447
|
+
],
|
|
4448
|
+
"level": 0
|
|
4449
|
+
},
|
|
4423
4450
|
"object": {
|
|
4424
4451
|
"value": "angle",
|
|
4425
4452
|
"number": "one",
|
package/common/articles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { knowledgeModule, where, stableId, debug } = require('./runtime').theprogrammablemind
|
|
2
2
|
const gdefaults = require('./gdefaults.js')
|
|
3
3
|
const pos = require('./pos.js')
|
|
4
|
-
const { defaultContextCheck } = require('./helpers')
|
|
4
|
+
const { defaultContextCheckProperties, defaultContextCheck } = require('./helpers')
|
|
5
5
|
const tests = require('./articles.test.json')
|
|
6
6
|
|
|
7
7
|
const config = {
|
|
@@ -32,12 +32,34 @@ const config = {
|
|
|
32
32
|
{
|
|
33
33
|
id: 'each',
|
|
34
34
|
isA: ['article'],
|
|
35
|
-
bridge:
|
|
35
|
+
bridge: `{
|
|
36
|
+
...after[0],
|
|
37
|
+
focusableForPhrase: true,
|
|
38
|
+
pullFromContext: true,
|
|
39
|
+
concept: true,
|
|
40
|
+
wantsValue: true,
|
|
41
|
+
distributer: operator,
|
|
42
|
+
eachArgument: after[0],
|
|
43
|
+
flatten_ignore: ['eachArgument'],
|
|
44
|
+
interpolate: [ { property: 'distributer' }, { property: 'eachArgument' } ],
|
|
45
|
+
modifiers: append(["distributer"], after[0].modifiers)
|
|
46
|
+
}`
|
|
36
47
|
},
|
|
37
48
|
{
|
|
38
49
|
id: 'every',
|
|
39
50
|
isA: ['article'],
|
|
40
|
-
bridge:
|
|
51
|
+
bridge: `{
|
|
52
|
+
...after[0],
|
|
53
|
+
focusableForPhrase: true,
|
|
54
|
+
pullFromContext: true,
|
|
55
|
+
concept: true,
|
|
56
|
+
wantsValue: true,
|
|
57
|
+
distributer: operator,
|
|
58
|
+
everyArgument: after[0],
|
|
59
|
+
flatten_ignore: ['everyArgument'],
|
|
60
|
+
interpolate: [ { property: "distributer" }, { property: 'everyArgument' } ],
|
|
61
|
+
modifiers: append(["distributer"], after[0].modifiers)
|
|
62
|
+
}`
|
|
41
63
|
},
|
|
42
64
|
{
|
|
43
65
|
id: 'distributable',
|
|
@@ -46,9 +68,21 @@ const config = {
|
|
|
46
68
|
{
|
|
47
69
|
id: 'the',
|
|
48
70
|
isA: ['article'],
|
|
71
|
+
check: defaultContextCheckProperties(),
|
|
49
72
|
localHierarchy: [['unknown', 'theAble']],
|
|
50
73
|
level: 0,
|
|
51
|
-
bridge:
|
|
74
|
+
bridge: `{
|
|
75
|
+
...after[0],
|
|
76
|
+
focusableForPhrase: true,
|
|
77
|
+
pullFromContext: true,
|
|
78
|
+
concept: true,
|
|
79
|
+
wantsValue: true,
|
|
80
|
+
checks: append(after[0].checks, ['determiner']),
|
|
81
|
+
determiner: operator,
|
|
82
|
+
theable: after[0],
|
|
83
|
+
flatten_ignore: ['theable'],
|
|
84
|
+
interpolate: [{ property: 'determiner' }, { property: 'theable' }]
|
|
85
|
+
}`
|
|
52
86
|
},
|
|
53
87
|
{
|
|
54
88
|
id: "a",
|
package/common/can.instance.json
CHANGED
package/common/conjunction.js
CHANGED
|
@@ -64,7 +64,7 @@ const config = {
|
|
|
64
64
|
{
|
|
65
65
|
where: where(),
|
|
66
66
|
notes: 'handle lists',
|
|
67
|
-
match: ({context, hierarchy}) => context.marker == 'list' && context.value,
|
|
67
|
+
match: ({context, hierarchy}) => context.marker == 'list' && context.value && (!context.interpolate || context.isResponse),
|
|
68
68
|
apply: async ({context, gs}) => {
|
|
69
69
|
if (context.newLinesOnly) {
|
|
70
70
|
return await gs(toFinalValue(context), '\n')
|
|
@@ -76,7 +76,7 @@ const config = {
|
|
|
76
76
|
|
|
77
77
|
{
|
|
78
78
|
where: where(),
|
|
79
|
-
match: ({context, callId}) => context.listable && context.value,
|
|
79
|
+
match: ({context, callId}) => context.listable && context.value && (!context.interpolate || context.isResponse),
|
|
80
80
|
apply: ({context, gs}) => {
|
|
81
81
|
return gs(context.value, ' ', ' ' + context.word + ' ')
|
|
82
82
|
},
|
package/common/countable.js
CHANGED
|
@@ -27,17 +27,39 @@ const config = {
|
|
|
27
27
|
id: "counting",
|
|
28
28
|
convolution: true,
|
|
29
29
|
before: ['verb', 'article'],
|
|
30
|
-
bridge:
|
|
30
|
+
bridge: `{
|
|
31
|
+
...after,
|
|
32
|
+
countable: after[0],
|
|
33
|
+
interpolate: [{ property: 'quantity', isQuantifier: true }, { property: 'countable', isQuantified: true }],
|
|
34
|
+
modifiers: append(['quantity'], after[0].modifiers),
|
|
35
|
+
quantity: before[0],
|
|
36
|
+
number: default(before[0].number, before[0].value),
|
|
37
|
+
instance: true
|
|
38
|
+
}`
|
|
31
39
|
},
|
|
32
40
|
{
|
|
33
41
|
id: "countOfPieces",
|
|
34
42
|
convolution: true,
|
|
35
|
-
bridge:
|
|
43
|
+
bridge: `{
|
|
44
|
+
...next(operator),
|
|
45
|
+
countOfPiecesOperator: after[0],
|
|
46
|
+
interpolate: [{ property: 'count' }, { property: 'countOfPiecesOperator' }],
|
|
47
|
+
modifiers: append(['count'], after[0].modifiers),
|
|
48
|
+
count: before[0],
|
|
49
|
+
word: after.word,
|
|
50
|
+
instance: true }`
|
|
36
51
|
},
|
|
37
52
|
{
|
|
38
53
|
id: "countingPieces",
|
|
39
54
|
convolution: true,
|
|
40
|
-
bridge:
|
|
55
|
+
bridge: `{
|
|
56
|
+
...after[0],
|
|
57
|
+
countingPiecesOperator: after[0],
|
|
58
|
+
interpolate: [ { property: 'pieces' }, { property: 'countingPiecesOperator' }],
|
|
59
|
+
modifiers: append(['pieces'], after[0].modifiers),
|
|
60
|
+
pieces: before[0],
|
|
61
|
+
instance: true
|
|
62
|
+
}`
|
|
41
63
|
},
|
|
42
64
|
{
|
|
43
65
|
id: "hasCountOfPieces",
|
|
@@ -48,11 +70,23 @@ const config = {
|
|
|
48
70
|
},
|
|
49
71
|
{
|
|
50
72
|
id: "more",
|
|
51
|
-
bridge:
|
|
73
|
+
bridge: `{
|
|
74
|
+
...next(after[0]),
|
|
75
|
+
more: operator,
|
|
76
|
+
moreOperator: after[0],
|
|
77
|
+
interpolate: [ { property: 'more' }, { property: 'moreOperator' }],
|
|
78
|
+
modifiers: append(['more'], after[0].modifiers)
|
|
79
|
+
}`,
|
|
52
80
|
},
|
|
53
81
|
{
|
|
54
82
|
id: "less",
|
|
55
|
-
bridge:
|
|
83
|
+
bridge: `{
|
|
84
|
+
...next(after[0]),
|
|
85
|
+
less: operator,
|
|
86
|
+
lessOperator: after[0],
|
|
87
|
+
interpolate: [{ property: 'less' }, { property: 'lessOperator' }],
|
|
88
|
+
modifiers: append(['less'], after[0].modifiers)
|
|
89
|
+
}`,
|
|
56
90
|
},
|
|
57
91
|
{
|
|
58
92
|
id: "quantifier",
|