tpmkms_4wp 9.5.1-beta.0 → 9.5.1-beta.11
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 +21 -61
- package/common/asking.js +102 -100
- package/common/can.instance.json +17 -0
- package/common/can.js +190 -0
- package/common/characters.js +3 -3
- package/common/colors.instance.json +10 -10
- package/common/comparable.instance.json +2 -2
- package/common/concept.test.json +54 -40
- package/common/conjunction.js +13 -5
- package/common/crew.instance.json +26 -26
- package/common/crew.js +1 -1
- package/common/currency.js +1 -1
- package/common/dates.instance.json +3 -3
- package/common/dialogues.js +29 -110
- package/common/dimension.instance.json +1 -1
- package/common/edible.instance.json +23 -95
- package/common/emotions.instance.json +6 -10
- package/common/emotions.js +1 -1
- package/common/english_helpers.js +277 -67
- package/common/fastfood.instance.json +160 -796
- package/common/fastfood.js +4 -4
- package/common/formulas.instance.json +1 -1
- package/common/gdefaults.js +41 -9
- package/common/help.js +2 -2
- package/common/helpers/concept.js +1 -1
- package/common/helpers/conjunction.js +54 -44
- package/common/helpers/dateTimeSelectors.js +2 -2
- package/common/helpers/dialogues.js +1 -1
- package/common/helpers/formulas.js +13 -11
- package/common/helpers/menus.js +12 -12
- package/common/helpers/meta.js +8 -8
- package/common/helpers/properties.js +76 -15
- package/common/helpers.js +82 -46
- package/common/hierarchy.js +3 -3
- package/common/kirk.instance.json +1 -1
- package/common/length.instance.json +2 -2
- package/common/math.instance.json +20 -20
- package/common/math.js +45 -44
- package/common/menus.instance.json +3 -3
- package/common/menus.js +1 -1
- package/common/meta.js +49 -33
- package/common/ordering.instance.json +16 -28
- package/common/ordering.js +1 -1
- package/common/ordering.test.json +354 -296
- package/common/people.instance.json +43 -298
- package/common/people.js +1 -1
- package/common/people.test.json +952 -681
- package/common/pipboy.instance.json +16 -16
- package/common/pokemon.instance.json +8 -8
- package/common/pokemon.js +1 -1
- package/common/pressure.instance.json +2 -2
- package/common/properties.instance.json +1 -1
- package/common/properties.js +16 -3
- package/common/reminders.js +1 -1
- package/common/reports.instance.json +3 -3
- package/common/reports.js +18 -16
- package/common/scorekeeper.js +4 -4
- package/common/sdefaults.js +22 -2
- package/common/spock.instance.json +1 -1
- package/common/stgame.js +1 -1
- package/common/stm.js +2 -2
- package/common/tell.js +1 -1
- package/common/temperature.instance.json +2 -2
- package/common/tester.js +3 -3
- package/common/time.js +3 -3
- package/common/tokenize.js +1 -1
- package/common/weight.instance.json +2 -2
- package/common/wp.instance.json +6 -6
- package/common/wp.js +4 -4
- package/package.json +4 -2
|
@@ -2400,7 +2400,7 @@
|
|
|
2400
2400
|
"word": "name",
|
|
2401
2401
|
"range": {
|
|
2402
2402
|
"start": 0,
|
|
2403
|
-
"end":
|
|
2403
|
+
"end": 10
|
|
2404
2404
|
},
|
|
2405
2405
|
"dead": true,
|
|
2406
2406
|
"types": [
|
|
@@ -4157,7 +4157,7 @@
|
|
|
4157
4157
|
"word": "rank",
|
|
4158
4158
|
"range": {
|
|
4159
4159
|
"start": 0,
|
|
4160
|
-
"end":
|
|
4160
|
+
"end": 10
|
|
4161
4161
|
},
|
|
4162
4162
|
"dead": true,
|
|
4163
4163
|
"types": [
|
|
@@ -5953,7 +5953,7 @@
|
|
|
5953
5953
|
"word": "eyes",
|
|
5954
5954
|
"range": {
|
|
5955
5955
|
"start": 0,
|
|
5956
|
-
"end":
|
|
5956
|
+
"end": 10
|
|
5957
5957
|
},
|
|
5958
5958
|
"dead": true,
|
|
5959
5959
|
"types": [
|
|
@@ -7737,7 +7737,7 @@
|
|
|
7737
7737
|
"word": "kirk",
|
|
7738
7738
|
"range": {
|
|
7739
7739
|
"start": 0,
|
|
7740
|
-
"end":
|
|
7740
|
+
"end": 3
|
|
7741
7741
|
},
|
|
7742
7742
|
"dead": true,
|
|
7743
7743
|
"types": [
|
|
@@ -9400,7 +9400,7 @@
|
|
|
9400
9400
|
"word": "kirk",
|
|
9401
9401
|
"range": {
|
|
9402
9402
|
"start": 0,
|
|
9403
|
-
"end":
|
|
9403
|
+
"end": 3
|
|
9404
9404
|
},
|
|
9405
9405
|
"dead": true,
|
|
9406
9406
|
"types": [
|
|
@@ -11157,7 +11157,7 @@
|
|
|
11157
11157
|
"word": "rank",
|
|
11158
11158
|
"range": {
|
|
11159
11159
|
"start": 0,
|
|
11160
|
-
"end":
|
|
11160
|
+
"end": 11
|
|
11161
11161
|
},
|
|
11162
11162
|
"dead": true,
|
|
11163
11163
|
"types": [
|
|
@@ -13072,7 +13072,7 @@
|
|
|
13072
13072
|
"word": "name",
|
|
13073
13073
|
"range": {
|
|
13074
13074
|
"start": 0,
|
|
13075
|
-
"end":
|
|
13075
|
+
"end": 11
|
|
13076
13076
|
},
|
|
13077
13077
|
"dead": true,
|
|
13078
13078
|
"types": [
|
|
@@ -14992,7 +14992,7 @@
|
|
|
14992
14992
|
"word": "eyes",
|
|
14993
14993
|
"range": {
|
|
14994
14994
|
"start": 0,
|
|
14995
|
-
"end":
|
|
14995
|
+
"end": 11
|
|
14996
14996
|
},
|
|
14997
14997
|
"dead": true,
|
|
14998
14998
|
"types": [
|
|
@@ -16870,7 +16870,7 @@
|
|
|
16870
16870
|
"word": "spock",
|
|
16871
16871
|
"range": {
|
|
16872
16872
|
"start": 0,
|
|
16873
|
-
"end":
|
|
16873
|
+
"end": 4
|
|
16874
16874
|
},
|
|
16875
16875
|
"dead": true,
|
|
16876
16876
|
"types": [
|
|
@@ -18618,7 +18618,7 @@
|
|
|
18618
18618
|
"word": "spock",
|
|
18619
18619
|
"range": {
|
|
18620
18620
|
"start": 0,
|
|
18621
|
-
"end":
|
|
18621
|
+
"end": 4
|
|
18622
18622
|
},
|
|
18623
18623
|
"dead": true,
|
|
18624
18624
|
"types": [
|
|
@@ -20460,7 +20460,7 @@
|
|
|
20460
20460
|
"word": "rank",
|
|
20461
20461
|
"range": {
|
|
20462
20462
|
"start": 0,
|
|
20463
|
-
"end":
|
|
20463
|
+
"end": 11
|
|
20464
20464
|
},
|
|
20465
20465
|
"dead": true,
|
|
20466
20466
|
"types": [
|
|
@@ -22469,7 +22469,7 @@
|
|
|
22469
22469
|
"word": "name",
|
|
22470
22470
|
"range": {
|
|
22471
22471
|
"start": 0,
|
|
22472
|
-
"end":
|
|
22472
|
+
"end": 11
|
|
22473
22473
|
},
|
|
22474
22474
|
"dead": true,
|
|
22475
22475
|
"types": [
|
|
@@ -24479,7 +24479,7 @@
|
|
|
24479
24479
|
"word": "eyes",
|
|
24480
24480
|
"range": {
|
|
24481
24481
|
"start": 0,
|
|
24482
|
-
"end":
|
|
24482
|
+
"end": 11
|
|
24483
24483
|
},
|
|
24484
24484
|
"dead": true,
|
|
24485
24485
|
"types": [
|
|
@@ -26463,7 +26463,7 @@
|
|
|
26463
26463
|
"word": "mccoy",
|
|
26464
26464
|
"range": {
|
|
26465
26465
|
"start": 0,
|
|
26466
|
-
"end":
|
|
26466
|
+
"end": 4
|
|
26467
26467
|
},
|
|
26468
26468
|
"dead": true,
|
|
26469
26469
|
"types": [
|
|
@@ -28309,7 +28309,7 @@
|
|
|
28309
28309
|
"word": "mccoy",
|
|
28310
28310
|
"range": {
|
|
28311
28311
|
"start": 0,
|
|
28312
|
-
"end":
|
|
28312
|
+
"end": 4
|
|
28313
28313
|
},
|
|
28314
28314
|
"dead": true,
|
|
28315
28315
|
"types": [
|
|
@@ -30217,7 +30217,7 @@
|
|
|
30217
30217
|
"word": "status",
|
|
30218
30218
|
"range": {
|
|
30219
30219
|
"start": 0,
|
|
30220
|
-
"end":
|
|
30220
|
+
"end": 24
|
|
30221
30221
|
},
|
|
30222
30222
|
"dead": true,
|
|
30223
30223
|
"types": [
|
|
@@ -34476,7 +34476,7 @@
|
|
|
34476
34476
|
"word": "status",
|
|
34477
34477
|
"range": {
|
|
34478
34478
|
"start": 0,
|
|
34479
|
-
"end":
|
|
34479
|
+
"end": 33
|
|
34480
34480
|
},
|
|
34481
34481
|
"dead": true,
|
|
34482
34482
|
"types": [
|
|
@@ -36986,7 +36986,7 @@
|
|
|
36986
36986
|
"word": "phasers",
|
|
36987
36987
|
"range": {
|
|
36988
36988
|
"start": 0,
|
|
36989
|
-
"end":
|
|
36989
|
+
"end": 6
|
|
36990
36990
|
},
|
|
36991
36991
|
"dead": true,
|
|
36992
36992
|
"types": [
|
|
@@ -38867,7 +38867,7 @@
|
|
|
38867
38867
|
"word": "torpedoes",
|
|
38868
38868
|
"range": {
|
|
38869
38869
|
"start": 0,
|
|
38870
|
-
"end":
|
|
38870
|
+
"end": 8
|
|
38871
38871
|
},
|
|
38872
38872
|
"dead": true,
|
|
38873
38873
|
"types": [
|
|
@@ -40742,7 +40742,7 @@
|
|
|
40742
40742
|
"word": "kirk",
|
|
40743
40743
|
"range": {
|
|
40744
40744
|
"start": 0,
|
|
40745
|
-
"end":
|
|
40745
|
+
"end": 3
|
|
40746
40746
|
},
|
|
40747
40747
|
"dead": true,
|
|
40748
40748
|
"types": [
|
|
@@ -42572,7 +42572,7 @@
|
|
|
42572
42572
|
"word": "spock",
|
|
42573
42573
|
"range": {
|
|
42574
42574
|
"start": 0,
|
|
42575
|
-
"end":
|
|
42575
|
+
"end": 4
|
|
42576
42576
|
},
|
|
42577
42577
|
"dead": true,
|
|
42578
42578
|
"types": [
|
|
@@ -44402,7 +44402,7 @@
|
|
|
44402
44402
|
"word": "mccoy",
|
|
44403
44403
|
"range": {
|
|
44404
44404
|
"start": 0,
|
|
44405
|
-
"end":
|
|
44405
|
+
"end": 4
|
|
44406
44406
|
},
|
|
44407
44407
|
"dead": true,
|
|
44408
44408
|
"types": [
|
|
@@ -46615,7 +46615,7 @@
|
|
|
46615
46615
|
"word": "arm",
|
|
46616
46616
|
"range": {
|
|
46617
46617
|
"start": 0,
|
|
46618
|
-
"end":
|
|
46618
|
+
"end": 2
|
|
46619
46619
|
},
|
|
46620
46620
|
"evaluateWord": true,
|
|
46621
46621
|
"imperative": true,
|
|
@@ -46655,7 +46655,7 @@
|
|
|
46655
46655
|
"word": "status",
|
|
46656
46656
|
"range": {
|
|
46657
46657
|
"start": 21,
|
|
46658
|
-
"end":
|
|
46658
|
+
"end": 44
|
|
46659
46659
|
},
|
|
46660
46660
|
"dead": true,
|
|
46661
46661
|
"types": [
|
|
@@ -50129,7 +50129,7 @@
|
|
|
50129
50129
|
"word": "disarm",
|
|
50130
50130
|
"range": {
|
|
50131
50131
|
"start": 0,
|
|
50132
|
-
"end":
|
|
50132
|
+
"end": 5
|
|
50133
50133
|
},
|
|
50134
50134
|
"evaluateWord": true,
|
|
50135
50135
|
"imperative": true,
|
|
@@ -50169,7 +50169,7 @@
|
|
|
50169
50169
|
"word": "status",
|
|
50170
50170
|
"range": {
|
|
50171
50171
|
"start": 24,
|
|
50172
|
-
"end":
|
|
50172
|
+
"end": 47
|
|
50173
50173
|
},
|
|
50174
50174
|
"dead": true,
|
|
50175
50175
|
"types": [
|
package/common/crew.js
CHANGED
|
@@ -37,7 +37,7 @@ const template = {
|
|
|
37
37
|
],
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
function initializer({config, apis}) {
|
|
41
41
|
const api = apis('properties')
|
|
42
42
|
const conceptApi = apis('concept')
|
|
43
43
|
// conceptApi.kindOfConcept({ config, modifiers: ['photon'], object: 'torpedo' })
|
package/common/currency.js
CHANGED
|
@@ -89,7 +89,7 @@ const config = {
|
|
|
89
89
|
],
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
function initializer({config, objects, apis, addWord, addGenerator, baseConfig, uuid}) {
|
|
93
93
|
const api = apis('currency')
|
|
94
94
|
units = api.getUnits()
|
|
95
95
|
for (word in units) {
|
|
@@ -2972,7 +2972,7 @@
|
|
|
2972
2972
|
"text": "january, february, march, april, may, june, july, august, september, october, november and december",
|
|
2973
2973
|
"range": {
|
|
2974
2974
|
"start": 0,
|
|
2975
|
-
"end":
|
|
2975
|
+
"end": 98
|
|
2976
2976
|
},
|
|
2977
2977
|
"types": [
|
|
2978
2978
|
"list",
|
|
@@ -11477,7 +11477,7 @@
|
|
|
11477
11477
|
"text": "monday, tuesday, wednesday, thursday, friday, saturday and sunday",
|
|
11478
11478
|
"range": {
|
|
11479
11479
|
"start": 0,
|
|
11480
|
-
"end":
|
|
11480
|
+
"end": 64
|
|
11481
11481
|
},
|
|
11482
11482
|
"types": [
|
|
11483
11483
|
"list",
|
|
@@ -15659,7 +15659,7 @@
|
|
|
15659
15659
|
"text": "ac, bc, bce and ad",
|
|
15660
15660
|
"range": {
|
|
15661
15661
|
"start": 0,
|
|
15662
|
-
"end":
|
|
15662
|
+
"end": 17
|
|
15663
15663
|
},
|
|
15664
15664
|
"types": [
|
|
15665
15665
|
"list",
|
package/common/dialogues.js
CHANGED
|
@@ -18,7 +18,7 @@ const pluralize = require('pluralize')
|
|
|
18
18
|
|
|
19
19
|
const api = new API()
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
function warningIsANotImplemented(log, context) {
|
|
22
22
|
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
23
|
const match = `({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && context.query && <other conditions as you like>`
|
|
24
24
|
const apply = `({context}) => <do stuff...>; context.evalue = <value>`
|
|
@@ -27,7 +27,7 @@ const warningIsANotImplemented = (log, context) => {
|
|
|
27
27
|
log(indent(message, 4))
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
function warningSameNotEvaluated(log, one) {
|
|
31
31
|
const description = 'WARNING from Dialogues KM: For the "X is Y" type phrase implement a same handler.'
|
|
32
32
|
const match = `({context}) => context.marker == '${one.marker}' && context.same && <other conditions as you like>`
|
|
33
33
|
const apply = '({context}) => <do stuff... context.same is the other value>; context.sameWasProcessed = true'
|
|
@@ -36,7 +36,7 @@ const warningSameNotEvaluated = (log, one) => {
|
|
|
36
36
|
log(indent(message, 4))
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
function listorama(type) {
|
|
40
40
|
return [
|
|
41
41
|
{ context: [[type, 0], ['list', 0], [type, 0]], choose: 0 },
|
|
42
42
|
{ context: [[type, 1], ['list', 0], [type, 0]], choose: 0 },
|
|
@@ -56,7 +56,6 @@ const config = {
|
|
|
56
56
|
|
|
57
57
|
"(([queryable]) [is|] ([queryable|]))",
|
|
58
58
|
"([isQuery|] ([queryable]) ([queryable]))",
|
|
59
|
-
// "(([queryable]) [is:isEdBridge|is,are] ([isEdAble|]))",
|
|
60
59
|
// who is the car owned by
|
|
61
60
|
"(([queryable]) [(<isEd|> ([isEdAble|]))])",
|
|
62
61
|
|
|
@@ -68,26 +67,16 @@ const config = {
|
|
|
68
67
|
"([isEdee|])",
|
|
69
68
|
"([isEder|])",
|
|
70
69
|
|
|
71
|
-
// "([nevermind])",
|
|
72
|
-
// { pattern: "([nevermindTestSetup] (allowed))", scope: "testing" },
|
|
73
70
|
"([why])",
|
|
74
71
|
"([reason])",
|
|
75
|
-
// "([thisitthat|])",
|
|
76
|
-
// "([it])",
|
|
77
|
-
// "([this])",
|
|
78
|
-
// "([that])",
|
|
79
72
|
|
|
80
73
|
"(<what> ([whatAble|]))",
|
|
81
74
|
"([what:optional])",
|
|
82
|
-
// "(<the|> ([theAble|]))",
|
|
83
|
-
// "(<a|a,an> ([theAble|]))",
|
|
84
|
-
// "([unknown])",
|
|
85
75
|
|
|
86
76
|
"([be] ([briefOrWordy|]))",
|
|
87
77
|
|
|
88
78
|
"([([canBeQuestion])])",
|
|
89
79
|
"(([canBeQuestion/1,2]) <questionMark|>)",
|
|
90
|
-
// "(([is/2]) <questionMark|>)",
|
|
91
80
|
|
|
92
81
|
"(([what]) [(<does|> ([doesAble|]))])",
|
|
93
82
|
"([canBeDoQuestion])",
|
|
@@ -101,46 +90,29 @@ const config = {
|
|
|
101
90
|
|
|
102
91
|
"([to] ([toAble|]))",
|
|
103
92
|
],
|
|
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
93
|
bridges: [
|
|
138
94
|
{
|
|
139
95
|
id: 'thatVerb',
|
|
140
96
|
before: ['verb'],
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
97
|
+
bridge: `
|
|
98
|
+
{
|
|
99
|
+
...after[0],
|
|
100
|
+
verb: after[0],
|
|
101
|
+
that: operator,
|
|
102
|
+
generate: ['that', 'verb'],
|
|
103
|
+
localPriorities: { actLike: ["subordinatedVerb", 0] },
|
|
104
|
+
bridge_override: {
|
|
105
|
+
operator: after[0].marker,
|
|
106
|
+
bridge: '{
|
|
107
|
+
...bridge.subject,
|
|
108
|
+
postModifiers: ["conditions"],
|
|
109
|
+
modifiers: [],
|
|
110
|
+
generate: concatm("thatClause.", bridge.generate),
|
|
111
|
+
thatClause: bridge,
|
|
112
|
+
conditions: append(bridge.subject.conditions, [bridge])
|
|
113
|
+
}'
|
|
114
|
+
}
|
|
115
|
+
}`,
|
|
144
116
|
},
|
|
145
117
|
|
|
146
118
|
{
|
|
@@ -246,38 +218,6 @@ const config = {
|
|
|
246
218
|
{ id: "doesAble", level: 0, bridge: "{ ...next(operator) }" },
|
|
247
219
|
{ id: "doesAble", level: 1, bridge: "{ ...next(operator), before: before[0] }" },
|
|
248
220
|
{ id: "does", level: 0, bridge: "{ query: true, what: operator.marker, ...context, number: operator.number, object.number: operator.number }*" },
|
|
249
|
-
|
|
250
|
-
/*
|
|
251
|
-
{
|
|
252
|
-
id: 'the',
|
|
253
|
-
level: 0,
|
|
254
|
-
bridge: '{ ...after[0], focusableForPhrase: true, pullFromContext: true, concept: true, wantsValue: true, determiner: "the", modifiers: append(["determiner"], after[0].modifiers)}'
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
id: "a",
|
|
258
|
-
level: 0,
|
|
259
|
-
// bridge: "{ ...after[0], pullFromContext: false, instance: true, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
|
|
260
|
-
bridge: "{ ...after[0], pullFromContext: false, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
|
|
261
|
-
},
|
|
262
|
-
*/
|
|
263
|
-
/*
|
|
264
|
-
{
|
|
265
|
-
id: "theAble",
|
|
266
|
-
children: ['noun'],
|
|
267
|
-
bridge: "{ ...next(operator) }"
|
|
268
|
-
},
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
|
-
// TODO make this hierarchy thing work
|
|
272
|
-
/*
|
|
273
|
-
{
|
|
274
|
-
id: "thisitthat",
|
|
275
|
-
level: 0,
|
|
276
|
-
isA: ['queryable'],
|
|
277
|
-
before: ['verby'],
|
|
278
|
-
bridge: "{ ...next(operator) }"
|
|
279
|
-
},
|
|
280
|
-
*/
|
|
281
221
|
{
|
|
282
222
|
id: "why",
|
|
283
223
|
level: 0,
|
|
@@ -287,26 +227,6 @@ const config = {
|
|
|
287
227
|
id: "reason",
|
|
288
228
|
isA: ['theAble', 'queryable'],
|
|
289
229
|
},
|
|
290
|
-
/*
|
|
291
|
-
{
|
|
292
|
-
id: "it",
|
|
293
|
-
level: 0,
|
|
294
|
-
isA: ['thisitthat'],
|
|
295
|
-
bridge: "{ ...next(operator), pullFromContext: true, unknown: true, determined: true }"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
id: "this",
|
|
299
|
-
level: 0,
|
|
300
|
-
isA: ['thisitthat'],
|
|
301
|
-
bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
id: "that",
|
|
305
|
-
level: 0,
|
|
306
|
-
isA: ['thisitthat'],
|
|
307
|
-
bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
|
|
308
|
-
},
|
|
309
|
-
*/
|
|
310
230
|
],
|
|
311
231
|
words: {
|
|
312
232
|
"literals": {
|
|
@@ -347,12 +267,9 @@ const config = {
|
|
|
347
267
|
['it', 'pronoun'],
|
|
348
268
|
['this', 'pronoun'],
|
|
349
269
|
['questionMark', 'punctuation'],
|
|
350
|
-
// ['questionMark', 'isEd'],
|
|
351
270
|
['a', 'article'],
|
|
352
271
|
['the', 'article'],
|
|
353
|
-
// ['unknown', 'theAble'],
|
|
354
272
|
['theAble', 'queryable'],
|
|
355
|
-
// ['unknown', 'queryable'],
|
|
356
273
|
['it', 'queryable'],
|
|
357
274
|
['what', 'queryable'],
|
|
358
275
|
['whatAble', 'queryable'],
|
|
@@ -369,11 +286,13 @@ const config = {
|
|
|
369
286
|
{
|
|
370
287
|
where: where(),
|
|
371
288
|
notes: "handle making responses brief",
|
|
372
|
-
match: ({context, objects}) => (context.topLevel || context.isResponse) && objects.brief && !context.briefWasRun,
|
|
289
|
+
match: ({context, objects, callId}) => (context.topLevel || context.isResponse) && objects.brief && !context.briefWasRun,
|
|
373
290
|
apply: async ({context, g}) => {
|
|
374
291
|
const focussed = focus(context)
|
|
375
292
|
context.briefWasRun = true
|
|
376
|
-
|
|
293
|
+
const result = await g(focussed)
|
|
294
|
+
context.briefWasRun = false
|
|
295
|
+
return result
|
|
377
296
|
},
|
|
378
297
|
priority: -2,
|
|
379
298
|
},
|
|
@@ -393,7 +312,7 @@ const config = {
|
|
|
393
312
|
where: where(),
|
|
394
313
|
notes: "be brief or wordy",
|
|
395
314
|
match: ({context}) => context.marker == 'be',
|
|
396
|
-
apply: ({context}) => `be ${context.type
|
|
315
|
+
apply: ({context}) => `be ${context.type?.word}`,
|
|
397
316
|
},
|
|
398
317
|
/*
|
|
399
318
|
{
|
|
@@ -528,7 +447,7 @@ const config = {
|
|
|
528
447
|
return `${await gp(context.one)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${await g(context.two)}`
|
|
529
448
|
}
|
|
530
449
|
|
|
531
|
-
|
|
450
|
+
function hasFocus(property) {
|
|
532
451
|
if (context.focusableForPhrase) {
|
|
533
452
|
return true
|
|
534
453
|
}
|
|
@@ -788,7 +707,7 @@ const config = {
|
|
|
788
707
|
],
|
|
789
708
|
};
|
|
790
709
|
|
|
791
|
-
|
|
710
|
+
function initializer({objects, config, isModule}) {
|
|
792
711
|
/* TODO add this beck in. some stuff from config needs to be here
|
|
793
712
|
config.addArgs((args) => ({
|
|
794
713
|
e: (context) => config.api.getEvaluator(args.s, args.log, context),
|