tpmkms_4wp 8.9.1-beta.1 → 8.9.1
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/colors.instance.json +28 -0
- package/common/dialogues.js +0 -9
- package/common/edible.instance.json +56 -0
- package/common/fastfood.instance.json +593 -900
- package/common/ordering.instance.json +47 -63
- package/common/pipboy.instance.json +56 -0
- package/common/pos.js +6 -12
- package/common/reports.instance.json +1 -1
- package/common/wp.instance.json +48 -110
- package/common/wp.js +22 -33
- package/common/wp.test.json +0 -10374
- package/package.json +2 -2
package/common/wp.instance.json
CHANGED
@@ -13,49 +13,24 @@
|
|
13
13
|
"resetIdSuffix",
|
14
14
|
{
|
15
15
|
"operators": [
|
16
|
+
"(<thatVerb|that> (verb/0))",
|
16
17
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
17
18
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
18
|
-
"((word_wp/*) [
|
19
|
+
"((word_wp/*) [start_wp] ([startsWith_wp|with] (a/0)? (letters)))"
|
19
20
|
],
|
20
21
|
"bridges": [
|
21
22
|
{
|
22
|
-
"id": "
|
23
|
+
"id": "thatVerb",
|
24
|
+
"bridge": "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"condition\"], condition: bridge }' } }"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"id": "start_wp",
|
23
28
|
"parents": [
|
24
29
|
"verb"
|
25
30
|
],
|
26
31
|
"words": [
|
27
|
-
|
28
|
-
|
29
|
-
"comparison": "prefix"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"word": "starts",
|
33
|
-
"comparison": "prefix"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"word": "end",
|
37
|
-
"comparison": "suffix"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"word": "ends",
|
41
|
-
"comparison": "suffix"
|
42
|
-
},
|
43
|
-
{
|
44
|
-
"word": "contain",
|
45
|
-
"comparison": "include"
|
46
|
-
},
|
47
|
-
{
|
48
|
-
"word": "contains",
|
49
|
-
"comparison": "include"
|
50
|
-
},
|
51
|
-
{
|
52
|
-
"word": "include",
|
53
|
-
"comparison": "include"
|
54
|
-
},
|
55
|
-
{
|
56
|
-
"word": "includes",
|
57
|
-
"comparison": "include"
|
58
|
-
}
|
32
|
+
"start",
|
33
|
+
"starts"
|
59
34
|
],
|
60
35
|
"bridge": "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }"
|
61
36
|
},
|
@@ -144,26 +119,6 @@
|
|
144
119
|
"choose": [
|
145
120
|
0
|
146
121
|
]
|
147
|
-
},
|
148
|
-
{
|
149
|
-
"context": [
|
150
|
-
[
|
151
|
-
"startsWith_wp",
|
152
|
-
0
|
153
|
-
],
|
154
|
-
[
|
155
|
-
"unknown",
|
156
|
-
0
|
157
|
-
],
|
158
|
-
[
|
159
|
-
"list",
|
160
|
-
1
|
161
|
-
]
|
162
|
-
],
|
163
|
-
"ordered": true,
|
164
|
-
"choose": [
|
165
|
-
0
|
166
|
-
]
|
167
122
|
}
|
168
123
|
]
|
169
124
|
}
|
@@ -12823,6 +12778,20 @@
|
|
12823
12778
|
1
|
12824
12779
|
]
|
12825
12780
|
],
|
12781
|
+
[
|
12782
|
+
[
|
12783
|
+
"is",
|
12784
|
+
0
|
12785
|
+
],
|
12786
|
+
[
|
12787
|
+
"list",
|
12788
|
+
1
|
12789
|
+
],
|
12790
|
+
[
|
12791
|
+
"unknown",
|
12792
|
+
1
|
12793
|
+
]
|
12794
|
+
],
|
12826
12795
|
[
|
12827
12796
|
[
|
12828
12797
|
"is",
|
@@ -29446,49 +29415,24 @@
|
|
29446
29415
|
{
|
29447
29416
|
"extraConfig": true,
|
29448
29417
|
"operators": [
|
29418
|
+
"(<thatVerb|that> (verb/0))",
|
29449
29419
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
29450
29420
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
29451
|
-
"((word_wp/*) [
|
29421
|
+
"((word_wp/*) [start_wp] ([startsWith_wp|with] (a/0)? (letters)))"
|
29452
29422
|
],
|
29453
29423
|
"bridges": [
|
29454
29424
|
{
|
29455
|
-
"id": "
|
29425
|
+
"id": "thatVerb",
|
29426
|
+
"bridge": "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"condition\"], condition: bridge }' } }"
|
29427
|
+
},
|
29428
|
+
{
|
29429
|
+
"id": "start_wp",
|
29456
29430
|
"parents": [
|
29457
29431
|
"verb"
|
29458
29432
|
],
|
29459
29433
|
"words": [
|
29460
|
-
|
29461
|
-
|
29462
|
-
"comparison": "prefix"
|
29463
|
-
},
|
29464
|
-
{
|
29465
|
-
"word": "starts",
|
29466
|
-
"comparison": "prefix"
|
29467
|
-
},
|
29468
|
-
{
|
29469
|
-
"word": "end",
|
29470
|
-
"comparison": "suffix"
|
29471
|
-
},
|
29472
|
-
{
|
29473
|
-
"word": "ends",
|
29474
|
-
"comparison": "suffix"
|
29475
|
-
},
|
29476
|
-
{
|
29477
|
-
"word": "contain",
|
29478
|
-
"comparison": "include"
|
29479
|
-
},
|
29480
|
-
{
|
29481
|
-
"word": "contains",
|
29482
|
-
"comparison": "include"
|
29483
|
-
},
|
29484
|
-
{
|
29485
|
-
"word": "include",
|
29486
|
-
"comparison": "include"
|
29487
|
-
},
|
29488
|
-
{
|
29489
|
-
"word": "includes",
|
29490
|
-
"comparison": "include"
|
29491
|
-
}
|
29434
|
+
"start",
|
29435
|
+
"starts"
|
29492
29436
|
],
|
29493
29437
|
"bridge": "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }"
|
29494
29438
|
},
|
@@ -29547,10 +29491,10 @@
|
|
29547
29491
|
],
|
29548
29492
|
"semantics": [
|
29549
29493
|
{
|
29550
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:
|
29494
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:179"
|
29551
29495
|
},
|
29552
29496
|
{
|
29553
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:
|
29497
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:188"
|
29554
29498
|
}
|
29555
29499
|
],
|
29556
29500
|
"priorities": [
|
@@ -29573,26 +29517,6 @@
|
|
29573
29517
|
"choose": [
|
29574
29518
|
0
|
29575
29519
|
]
|
29576
|
-
},
|
29577
|
-
{
|
29578
|
-
"context": [
|
29579
|
-
[
|
29580
|
-
"startsWith_wp",
|
29581
|
-
0
|
29582
|
-
],
|
29583
|
-
[
|
29584
|
-
"unknown",
|
29585
|
-
0
|
29586
|
-
],
|
29587
|
-
[
|
29588
|
-
"list",
|
29589
|
-
1
|
29590
|
-
]
|
29591
|
-
],
|
29592
|
-
"ordered": true,
|
29593
|
-
"choose": [
|
29594
|
-
0
|
29595
|
-
]
|
29596
29520
|
}
|
29597
29521
|
]
|
29598
29522
|
}
|
@@ -29888,6 +29812,20 @@
|
|
29888
29812
|
1
|
29889
29813
|
]
|
29890
29814
|
],
|
29815
|
+
[
|
29816
|
+
[
|
29817
|
+
"is",
|
29818
|
+
0
|
29819
|
+
],
|
29820
|
+
[
|
29821
|
+
"list",
|
29822
|
+
1
|
29823
|
+
],
|
29824
|
+
[
|
29825
|
+
"unknown",
|
29826
|
+
1
|
29827
|
+
]
|
29828
|
+
],
|
29891
29829
|
[
|
29892
29830
|
[
|
29893
29831
|
"is",
|
package/common/wp.js
CHANGED
@@ -37,7 +37,6 @@ const instance = require('./wp.instance.json')
|
|
37
37
|
in the first paragraph make the words that start with abc bold
|
38
38
|
bold the first three words that start with t
|
39
39
|
bold much and many
|
40
|
-
make the words that start with t bold and underlined
|
41
40
|
*/
|
42
41
|
|
43
42
|
class API {
|
@@ -92,14 +91,9 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
92
91
|
scope = 'all'
|
93
92
|
} else if (context.element.condition) {
|
94
93
|
const condition = context.element.condition
|
95
|
-
if (condition.marker == '
|
96
|
-
// with or not with that is the question
|
94
|
+
if (condition.marker == 'start_wp') {
|
97
95
|
const letters = condition.letters.letters.text
|
98
|
-
conditions.push({ comparison:
|
99
|
-
} else if (condition.marker == 'wordComparison_wp') {
|
100
|
-
// with or not with that is the question
|
101
|
-
const letters = condition.letters.text
|
102
|
-
conditions.push({ comparison: condition.comparison, letters })
|
96
|
+
conditions.push({ comparison: 'prefix', letters })
|
103
97
|
}
|
104
98
|
} else {
|
105
99
|
scope = context.element.quantity.quantity
|
@@ -121,44 +115,40 @@ template = {
|
|
121
115
|
'uppercase means capitalize',
|
122
116
|
'italicize means italic',
|
123
117
|
'italicized means italic',
|
124
|
-
// 'start end and contain are wordComparisonWiths',
|
125
118
|
// 'styles are negatable',
|
126
119
|
"resetIdSuffix",
|
127
120
|
{
|
128
121
|
operators: [
|
122
|
+
// TODO write a parser for this so I can use statefulElement as the id
|
123
|
+
"(<thatVerb|that> (verb/0))",
|
129
124
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
130
125
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
131
|
-
"((word_wp/*) [
|
132
|
-
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
126
|
+
"((word_wp/*) [start_wp] ([startsWith_wp|with] (a/0)? (letters)))",
|
133
127
|
],
|
134
128
|
bridges: [
|
135
129
|
{
|
136
|
-
id: '
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
{
|
142
|
-
|
143
|
-
|
144
|
-
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
130
|
+
id: 'thatVerb',
|
131
|
+
// before: ['verb'],
|
132
|
+
bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"condition\"], condition: bridge }' } }",
|
133
|
+
/*
|
134
|
+
semantic: (args) => {
|
135
|
+
changeState({...args, element: args.context.element, state: args.context.state})
|
136
|
+
}
|
137
|
+
*/
|
145
138
|
},
|
146
139
|
{
|
147
|
-
id: '
|
140
|
+
id: 'start_wp',
|
148
141
|
parents: ['verb'],
|
149
|
-
words: [
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
{
|
154
|
-
|
155
|
-
|
156
|
-
1: "{ marker: 'a' }",
|
157
|
-
},
|
158
|
-
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[1], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
142
|
+
words: ['start', 'starts'],
|
143
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
144
|
+
/*
|
145
|
+
semantic: (args) => {
|
146
|
+
changeState({...args, element: args.context.element, state: args.context.state})
|
147
|
+
}
|
148
|
+
*/
|
159
149
|
},
|
160
150
|
{
|
161
|
-
id: '
|
151
|
+
id: 'startsWith_wp',
|
162
152
|
parents: ['preposition'],
|
163
153
|
optional: {
|
164
154
|
1: "{ marker: 'a' }",
|
@@ -220,7 +210,6 @@ template = {
|
|
220
210
|
],
|
221
211
|
priorities: [
|
222
212
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|
223
|
-
{ "context": [['comparisonWith_wp',0], ['unknown', 0], ['list', 1]], ordered: true, choose: [0] },
|
224
213
|
],
|
225
214
|
},
|
226
215
|
// "([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|