tpmkms_4wp 8.9.1 → 9.0.0-beta.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/animals.instance.json +6716 -775
- package/common/articles.js +22 -9
- package/common/articles.test.json +640 -2
- package/common/asking.js +3 -3
- package/common/asking.test.json +1599 -140
- package/common/avatar.js +9 -1
- package/common/avatar.test.json +6008 -2749
- package/common/characters.js +1 -1
- package/common/characters.test.json +1371 -95
- package/common/colors.instance.json +22813 -1432
- package/common/colors.test.json +704 -136
- package/common/comparable.instance.json +1337 -159
- package/common/comparable.js +13 -13
- package/common/comparable.test.json +3239 -558
- package/common/concept.js +11 -3
- package/common/concept.test.json +2853 -694
- package/common/conjunction.js +13 -1
- package/common/conjunction.test.json +229 -1
- package/common/countable.js +3 -9
- package/common/countable.test.json +1310 -638
- package/common/crew.instance.json +19500 -2069
- package/common/crew.js +19 -0
- package/common/crew.test.json +10218 -2145
- package/common/currency.js +2 -3
- package/common/currency.test.json +948 -64
- package/common/dialogues.js +111 -33
- package/common/dialogues.test.json +6611 -1905
- package/common/dimension.instance.json +760 -84
- package/common/dimension.js +18 -4
- package/common/dimension.test.json +23680 -11550
- package/common/edible.instance.json +21870 -2699
- package/common/edible.js +13 -0
- package/common/edible.test.json +1580 -304
- package/common/emotions.instance.json +2278 -247
- package/common/emotions.js +10 -2
- package/common/emotions.test.json +1134 -107
- package/common/errors.js +1 -1
- package/common/errors.test.json +88 -0
- package/common/evaluate.test.json +100 -1
- package/common/events.js +1 -1
- package/common/events.test.json +2197 -242
- package/common/fastfood.instance.json +82907 -10367
- package/common/fastfood.js +99 -12
- package/common/fastfood.test.json +65486 -21430
- package/common/formulas.instance.json +325 -58
- package/common/formulas.js +1 -1
- package/common/formulas.test.json +13202 -6757
- package/common/gdefaults.js +35 -17
- package/common/help.js +4 -4
- package/common/help.test.json +292 -4
- package/common/helpers/concept.js +6 -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 +18 -48
- package/common/helpers.js +17 -1
- package/common/hierarchy.js +12 -3
- package/common/hierarchy.test.json +53813 -17340
- package/common/javascript.js +1 -1
- package/common/javascript.test.json +214 -11
- package/common/kirk.instance.json +322 -7
- package/common/kirk.test.json +1123 -254
- package/common/length.instance.json +9890 -797
- package/common/length.test.json +12055 -8184
- package/common/listener.test.json +39 -1
- package/common/math.instance.json +294 -57
- package/common/math.js +1 -1
- package/common/math.test.json +38557 -17754
- package/common/meta.instance.json +1 -0
- package/common/meta.js +13 -13
- package/common/meta.test.json +2770 -275
- package/common/nameable.js +1 -1
- package/common/nameable.test.json +5150 -1475
- package/common/negation.js +1 -1
- package/common/negation.test.json +146 -8
- package/common/numbers.js +1 -1
- package/common/numbers.test.json +234 -0
- package/common/ordering.instance.json +3861 -508
- package/common/ordering.test.json +2680 -1283
- package/common/ordinals.js +15 -3
- package/common/ordinals.test.json +627 -3
- package/common/people.instance.json +4041 -652
- package/common/people.js +1 -15
- package/common/people.test.json +27157 -13664
- package/common/percentages.js +1 -2
- package/common/percentages.test.json +313 -0
- package/common/pipboy.instance.json +13835 -1684
- package/common/pipboy.js +31 -49
- package/common/pipboy.test.json +19335 -6019
- package/common/pokemon.instance.json +6163 -690
- package/common/pokemon.test.json +1826 -389
- package/common/pos.js +27 -11
- package/common/pressure.instance.json +2635 -291
- package/common/pressure.test.json +2997 -1629
- package/common/properties.instance.json +907 -84
- package/common/properties.js +19 -28
- package/common/properties.test.json +46801 -14612
- package/common/punctuation.js +1 -1
- package/common/punctuation.test.json +327 -0
- package/common/reports.instance.json +997 -118
- package/common/reports.js +16 -9
- package/common/reports.test.json +16653 -2453
- package/common/scorekeeper.instance.json +1 -0
- package/common/scorekeeper.js +22 -12
- package/common/scorekeeper.test.json +42546 -15408
- package/common/sdefaults.js +2 -2
- package/common/sizeable.js +2 -2
- package/common/sizeable.test.json +1170 -215
- package/common/spock.instance.json +322 -7
- package/common/spock.test.json +1123 -254
- package/common/stgame.js +0 -1
- package/common/stgame.test.json +1371 -91
- package/common/stm.js +6 -6
- package/common/stm.test.json +842 -9
- package/common/tell.js +1 -1
- package/common/tell.test.json +224 -1
- package/common/temperature.instance.json +5980 -285
- package/common/temperature.test.json +2610 -1272
- package/common/tester.js +1 -1
- package/common/testing.test.json +84 -1
- package/common/time.test.json +5345 -272
- package/common/tokenize.js +3 -2
- package/common/tokenize.test.json +39 -0
- package/common/ui.instance.json +144 -26
- package/common/ui.js +0 -16
- package/common/ui.test.json +4620 -140
- package/common/weight.instance.json +10025 -771
- package/common/weight.js +10 -0
- package/common/weight.test.json +18658 -12176
- package/common/wp.instance.json +27555 -2630
- package/common/wp.js +240 -41
- package/common/wp.test.json +147553 -2727
- package/common/yesno.js +1 -1
- package/common/yesno.test.json +168 -4
- package/package.json +11 -6
package/common/wp.js
CHANGED
@@ -9,13 +9,68 @@ const wp_tests = require('./wp.test.json')
|
|
9
9
|
const instance = require('./wp.instance.json')
|
10
10
|
|
11
11
|
/*
|
12
|
+
done
|
13
|
+
|
14
|
+
bold the first word
|
15
|
+
bold the first paragraph
|
16
|
+
bold the first letter
|
17
|
+
bold the first word of every paragraph
|
18
|
+
bold the first word of the second and third paragraph
|
19
|
+
bold the paragraph that contains words that start with t
|
20
|
+
underline the paragraph that contains bolded words
|
21
|
+
underline the paragraphs that contain bolded words
|
22
|
+
bold the first letter of every word
|
23
|
+
bold the third letter of the second paragraph
|
24
|
+
bold the first letter of every word that starts with t
|
25
|
+
underline the bolded words in the second paragraph
|
26
|
+
bold the words that start with t in the second paragraph
|
27
|
+
bold the first letter of the words that start with t in the second paragraph
|
28
|
+
in the second paragraph bold the first word
|
29
|
+
in the second paragraph bold the first letter of the words that start with t
|
30
|
+
underline the first bolded word
|
31
|
+
underline the first three words
|
32
|
+
in the first and second paragraph bold the second word
|
33
|
+
underline the first three bolded words
|
34
|
+
capitalize the first letter of the words that start with t
|
35
|
+
|
36
|
+
current
|
37
|
+
|
38
|
+
change is editable to is really editable
|
39
|
+
|
40
|
+
todo
|
41
|
+
|
42
|
+
the first to fifth word
|
43
|
+
underline the last three words
|
44
|
+
for paragraph 1 and 2 bold the first word
|
45
|
+
in the second paragraph for the words that start with t bold the first letter
|
46
|
+
underline the bolded paragraphs
|
47
|
+
bold the first three words after the second bolded letter
|
48
|
+
underline the words that start with t in the paragraph with 3 bolded words
|
49
|
+
underline the paragraph that contains three bolded words
|
50
|
+
underline the first bolded word that start with t
|
51
|
+
bold the first word of the second paragraph and third paragraph
|
52
|
+
the paragraph that contains the word boobies
|
53
|
+
|
54
|
+
after
|
55
|
+
make the words that start with t blue
|
56
|
+
|
57
|
+
the bolded words that start with t
|
58
|
+
|
59
|
+
replace better with worse
|
60
|
+
|
61
|
+
change underlines to bolds
|
62
|
+
|
12
63
|
start inserting text until I say banana
|
13
64
|
...
|
14
65
|
or
|
15
66
|
stop inserting text
|
16
67
|
|
17
68
|
make the text of the 1st to 3rd paragraphs blue
|
69
|
+
|
70
|
+
capitalize the words banana and word
|
71
|
+
capitalize banana and tree
|
18
72
|
|
73
|
+
make the words that start with a bold
|
19
74
|
|
20
75
|
make every word bold and underlines and blue -> weirdly "bold underlined and blue" works
|
21
76
|
|
@@ -23,6 +78,8 @@ const instance = require('./wp.instance.json')
|
|
23
78
|
make the color blue
|
24
79
|
make the color of the first paragraph blue
|
25
80
|
|
81
|
+
undeline the bolded text / the text that is bolded
|
82
|
+
|
26
83
|
words that start with a
|
27
84
|
make all the bold text uppercase
|
28
85
|
underline all the bold text
|
@@ -34,9 +91,17 @@ const instance = require('./wp.instance.json')
|
|
34
91
|
words containing a
|
35
92
|
every 5th word
|
36
93
|
|
94
|
+
the words that are capitalized
|
95
|
+
|
37
96
|
in the first paragraph make the words that start with abc bold
|
38
97
|
bold the first three words that start with t
|
39
98
|
bold much and many
|
99
|
+
make the words that start with t bold and underlined
|
100
|
+
make all the capital letters|punctuation bold
|
101
|
+
|
102
|
+
move this paragraph up 2
|
103
|
+
move the next paragraph up 1
|
104
|
+
move the last paragraph before this one
|
40
105
|
*/
|
41
106
|
|
42
107
|
class API {
|
@@ -62,7 +127,7 @@ const setUpdate = (isA, update, states) => {
|
|
62
127
|
if (!update.styles) {
|
63
128
|
update.styles = []
|
64
129
|
}
|
65
|
-
|
130
|
+
const style = root(state.value)
|
66
131
|
/*
|
67
132
|
if (style == 'underlined') {
|
68
133
|
style = 'underline'
|
@@ -79,26 +144,68 @@ const setUpdate = (isA, update, states) => {
|
|
79
144
|
|
80
145
|
const api = new API()
|
81
146
|
|
82
|
-
|
147
|
+
const config = {
|
83
148
|
name: 'wp',
|
84
149
|
};
|
85
150
|
|
86
151
|
const changeState = ({api, isA, context, toArray, element, state}) => {
|
87
|
-
let unit = root(context.element.marker)
|
88
152
|
let scope
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
153
|
+
|
154
|
+
const getElement = (selector, update) => {
|
155
|
+
const unit = root(selector.marker)
|
156
|
+
const conditions = []
|
157
|
+
let scope;
|
158
|
+
const condition = []
|
159
|
+
if (selector.ordinal) {
|
160
|
+
// TODO think this out better but its just POC so good enough for now
|
161
|
+
const condition = { ordinals: toArray(selector.ordinal).map((context) => context.value) }
|
162
|
+
if (selector.quantity) {
|
163
|
+
condition.count = selector.quantity.value
|
164
|
+
}
|
165
|
+
conditions.push(condition)
|
166
|
+
} else if (isA(selector, 'everything')) {
|
167
|
+
scope = 'all'
|
168
|
+
} else if (selector.quantity) {
|
169
|
+
scope = selector.quantity.quantity
|
170
|
+
} if (selector.distributer) {
|
171
|
+
scope = selector.distributer.value
|
97
172
|
}
|
98
|
-
|
99
|
-
|
173
|
+
|
174
|
+
if (selector.conditions) {
|
175
|
+
for (const condition of selector.conditions) {
|
176
|
+
if (condition.marker == 'wordComparisonWithVerb_wp') {
|
177
|
+
// with or not with that is the question
|
178
|
+
const letters = condition.letters.letters.text
|
179
|
+
conditions.push({ comparison: condition.comparison, letters })
|
180
|
+
} else if (condition.marker == 'wordComparison_wp') {
|
181
|
+
// with or not with that is the question
|
182
|
+
const letters = condition.letters.text
|
183
|
+
conditions.push({ comparison: condition.comparison, letters })
|
184
|
+
} else if (condition.marker == 'paragraphComparisonVerb_wp') {
|
185
|
+
// with or not with that is the question
|
186
|
+
const update = { selectors: [] }
|
187
|
+
const words = getElement(condition.words, update)
|
188
|
+
conditions.push({ comparison: condition.comparison, words: update})
|
189
|
+
} else if (isA(condition, 'styleModifier_wp')) {
|
190
|
+
for (const style of toArray(condition)) {
|
191
|
+
conditions.push({ hasStyle: style.marker })
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
if (selector.context) {
|
198
|
+
for (const context of toArray(selector.context)) {
|
199
|
+
getElement(context, update)
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
update.selectors.push({ unit, scope, conditions })
|
100
204
|
}
|
101
|
-
|
205
|
+
|
206
|
+
const update = { selectors: [] }
|
207
|
+
getElement(context.element, update)
|
208
|
+
|
102
209
|
setUpdate(isA, update, toArray(context.state))
|
103
210
|
api.changeState(update)
|
104
211
|
}
|
@@ -106,54 +213,96 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
106
213
|
template = {
|
107
214
|
configs: [
|
108
215
|
'setidsuffix _wp',
|
109
|
-
'words are countable and statefulElements',
|
110
|
-
'characters are countable',
|
111
|
-
'paragraphs are countable',
|
216
|
+
'words are countable distributable orderable textContainers and statefulElements',
|
217
|
+
'characters are countable distributable orderable and statefulElements',
|
218
|
+
'paragraphs are countable distributable orderable textContainers and statefulElement',
|
219
|
+
'text is a statefulElement',
|
220
|
+
'letters means characters',
|
112
221
|
'bold, italic, code, capitalize, lowercase and underline are styles',
|
113
222
|
'underlined means underline',
|
114
223
|
'capitalized means capitalize',
|
115
224
|
'uppercase means capitalize',
|
116
225
|
'italicize means italic',
|
117
226
|
'italicized means italic',
|
227
|
+
// TODO have a mode where I can stay this is a definition sentence then just say style modifies and it will do it right
|
228
|
+
'uppercased, lowercased, capitalized, bolded, italicized and underlined are styleModifiers',
|
229
|
+
// 'start end and contain are wordComparisonWiths',
|
118
230
|
// 'styles are negatable',
|
119
231
|
"resetIdSuffix",
|
120
232
|
{
|
121
233
|
operators: [
|
122
|
-
|
123
|
-
"(<thatVerb|that> (verb/0))",
|
234
|
+
"([change_wp|change] (context.text !== 'to')* (context.text == 'to'))",
|
124
235
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
125
236
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
126
|
-
"((word_wp/*) [
|
237
|
+
"((word_wp/*) [wordComparisonWithVerb_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
238
|
+
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
239
|
+
// this one is "the bolded/underlined/italized/... word"
|
240
|
+
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
|
241
|
+
// the first letter of each paragraph
|
242
|
+
"((statefulElement_wp/*)? <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
|
243
|
+
// the paragraph that contains words that start with t
|
244
|
+
"((paragraph_wp/*) [paragraphComparisonVerb_wp] (word_wp/*))",
|
127
245
|
],
|
246
|
+
associations: {
|
247
|
+
negative: [
|
248
|
+
],
|
249
|
+
positive: [
|
250
|
+
// TODO remove these after crucible work done and fix the associator rules
|
251
|
+
// [['style_wp', 0], ['statefulElement_wp', 0], ['statefulElementInContext_wp', 0], ['every', 0], ['statefulElement_wp', 0]],
|
252
|
+
{ context: [['style_wp', 0], ['word_wp', 0], ['statefulElementInContext_wp', 0], ['paragraph_wp', 0]], choose: 0 },
|
253
|
+
{ context: [['style_wp', 0], ['letter_wp', 0], ['statefulElementInContext_wp', 0], ['word_wp', 0]], choose: 0 },
|
254
|
+
{ context: [['paragraph_wp', 0], ['thatVerb', 0], ['paragraphComparisonVerb_wp', 0], ['word_wp', 0]], choose: 0 },
|
255
|
+
{ context: [['paragraph_wp', 0], ['thatVerb', 0], ['paragraphComparisonVerb_wp', 0], ['styleModifier_wp', 0], ['word_wp', 0]], choose: 0 },
|
256
|
+
{ context: [['word_wp', 0], ['thatVerb', 0], ['wordComparison_wp', 0]], choose: 0 },
|
257
|
+
|
258
|
+
{ context: [["article",0],["paragraph_wp",1],["thatVerb",0],["paragraphComparisonVerb_wp",0],["styleModifier_wp",0],["statefulElement_wp",0]], choose: 0 },
|
259
|
+
{ context: [["article",0],["paragraph_wp",1],["thatVerb",0],["paragraphComparisonVerb_wp",0],["word_wp",0],["thatVerb",0],["wordComparisonWithVerb_wp",0],["comparisonWith_wp",0],["unknown",0]], choose: 0 },
|
260
|
+
{ context: [["article",0],["paragraph_wp",1],["thatVerb",0],["paragraphComparisonVerb_wp",0],["styleModifier_wp",0],["statefulElement_wp",0]], choose: 0 },
|
261
|
+
|
262
|
+
{ context: [["article",0],["word_wp",0],["thatVerb",0],["wordComparison_wp",0],["unknown",0]], choose: 0 },
|
263
|
+
{ context: [["article",0],["word_wp",1],["thatVerb",0],["wordComparison_wp",0],["unknown",0]], choose: 0 },
|
264
|
+
{ context: [["article",0],["word_wp",1],["thatVerb",0],["wordComparison_wp",0],["unknown",1]], choose: 0 },
|
265
|
+
|
266
|
+
{ context: [["word_wp",1],["thatVerb",0],["wordComparison_wp",0],["unknown",0]], choose: 0 },
|
267
|
+
]
|
268
|
+
},
|
269
|
+
|
128
270
|
bridges: [
|
129
|
-
{
|
130
|
-
id: '
|
131
|
-
|
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
|
-
*/
|
271
|
+
{
|
272
|
+
id: 'change_wp',
|
273
|
+
bridge: "{ ...next(operator), from: after[0][0], generate: [operator, 'from', after[1]] }",
|
138
274
|
},
|
139
275
|
{
|
140
|
-
id: '
|
276
|
+
id: 'paragraphComparisonVerb_wp',
|
141
277
|
parents: ['verb'],
|
142
|
-
words: [
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
278
|
+
words: [
|
279
|
+
{ word: 'contain', comparison: 'include' },
|
280
|
+
{ word: 'contains', comparison: 'include' },
|
281
|
+
{ word: 'include', comparison: 'include' },
|
282
|
+
{ word: 'includes', comparison: 'include' },
|
283
|
+
],
|
284
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], words: after[0], verb: operator, generate: ['element', 'verb', 'words'] }",
|
149
285
|
},
|
150
286
|
{
|
151
|
-
id: '
|
287
|
+
id: 'statefulElementInContext_wp',
|
152
288
|
parents: ['preposition'],
|
153
289
|
optional: {
|
154
|
-
1: "{
|
290
|
+
'-1': "{ ...operator, invisible: true }",
|
291
|
+
},
|
292
|
+
bridge: "{ ...next(before[0]), context: append(before[0].context, [after[0]]), generate: [before[0], operator, after[0]], modifiers: [] }",
|
293
|
+
semantic: (args) => {
|
294
|
+
const { context, contexts } = args
|
295
|
+
for (let i = context.context_index + 1; i < contexts.length; ++i) {
|
296
|
+
if (contexts[i].marker == 'applyStyle_wp') {
|
297
|
+
const element = contexts[i].element
|
298
|
+
if (!element.context) {
|
299
|
+
element.context = []
|
300
|
+
}
|
301
|
+
element.context = element.context.concat(context.context)
|
302
|
+
}
|
303
|
+
}
|
304
|
+
console.log(JSON.stringify(Object.keys(args)))
|
155
305
|
},
|
156
|
-
bridge: "{ ...next(operator), operator: operator, letters: after[1], generate: ['operator', 'letters'] }",
|
157
306
|
},
|
158
307
|
{
|
159
308
|
id: 'applyStyle_wp',
|
@@ -168,6 +317,46 @@ template = {
|
|
168
317
|
changeState({...args, element: args.context.element, state: args.context.state})
|
169
318
|
}
|
170
319
|
},
|
320
|
+
{
|
321
|
+
id: 'modifiedByStyle_wp',
|
322
|
+
// parents: ['verb'],
|
323
|
+
parents: ['adjective'],
|
324
|
+
convolution: true,
|
325
|
+
bridge: "{ ...after[0], style: before[0], target: after[0], generate: ['style', 'target'], conditions: append(after[0].conditions, [before[0]]) }",
|
326
|
+
},
|
327
|
+
{
|
328
|
+
id: 'wordComparisonWithVerb_wp',
|
329
|
+
parents: ['verb'],
|
330
|
+
words: [
|
331
|
+
{ word: 'start', comparison: 'prefix' },
|
332
|
+
{ word: 'starts', comparison: 'prefix', },
|
333
|
+
{ word: 'end', comparison: 'suffix' },
|
334
|
+
{ word: 'ends', comparison: 'suffix' },
|
335
|
+
],
|
336
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
337
|
+
},
|
338
|
+
{
|
339
|
+
id: 'wordComparison_wp',
|
340
|
+
parents: ['verb'],
|
341
|
+
words: [
|
342
|
+
{ word: 'contain', comparison: 'include' },
|
343
|
+
{ word: 'contains', comparison: 'include' },
|
344
|
+
{ word: 'include', comparison: 'include' },
|
345
|
+
{ word: 'includes', comparison: 'include' },
|
346
|
+
],
|
347
|
+
optional: {
|
348
|
+
1: "{ marker: 'a' }",
|
349
|
+
},
|
350
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[1], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
351
|
+
},
|
352
|
+
{
|
353
|
+
id: 'comparisonWith_wp',
|
354
|
+
parents: ['preposition'],
|
355
|
+
optional: {
|
356
|
+
1: "{ marker: 'a' }",
|
357
|
+
},
|
358
|
+
bridge: "{ ...next(operator), operator: operator, letters: after[1], generate: ['operator', 'letters'] }",
|
359
|
+
},
|
171
360
|
{
|
172
361
|
id: 'changeState_wp',
|
173
362
|
parents: ['verb'],
|
@@ -209,7 +398,17 @@ template = {
|
|
209
398
|
},
|
210
399
|
],
|
211
400
|
priorities: [
|
401
|
+
{ "context": [['ordinal', 1], ['list', 0], ['ordinal', 1], ['statefulElement_wp', 0]], ordered: true, choose: [1] },
|
402
|
+
{ "context": [['word_wp', 1], ['wordComparisonWithVerb_wp', 0], ['comparisonWith_wp', 1], ['statefulElementInContext_wp', 0]], ordered: true, choose: [1] },
|
403
|
+
{ "context": [['paragraphComparisonVerb_wp', 0], ['word_wp', 0], ['wordComparisonWithVerb_wp', 0]], ordered: true, choose: [2] },
|
404
|
+
{ "context": [['statefulElementInContext_wp', 0], ['word_wp', 0], ['wordComparisonWithVerb_wp', 0]], ordered: true, choose: [2] },
|
405
|
+
{ "context": [['statefulElementInContext_wp', 0], ['word_wp', 1], ['wordComparisonWithVerb_wp', 0], ['comparisonWith_wp', 1]], ordered: true, choose: [2,3] },
|
406
|
+
{ "context": [['statefulElementInContext_wp', 0], ['comparisonWith_wp', 0]], choose: [1] },
|
407
|
+
{ "context": [['paragraphComparisonVerb_wp', 0], ['wordComparisonWithVerb_wp', 0]], choose: [1] },
|
408
|
+
{ "context": [['ordinal',1], ['list', 0], ['ordinal', 1], ['word_wp', 1]], ordered: true, choose: [1] },
|
409
|
+
{ "context": [['changeState_wp',0], ['every', 0], ['word_wp', 1], ['list', 1]], ordered: true, choose: [1] },
|
212
410
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|
411
|
+
{ "context": [['comparisonWith_wp',0], ['unknown', 0], ['list', 1]], ordered: true, choose: [0] },
|
213
412
|
],
|
214
413
|
},
|
215
414
|
// "([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
@@ -230,7 +429,7 @@ knowledgeModule({
|
|
230
429
|
contents: wp_tests,
|
231
430
|
checks: {
|
232
431
|
context: [
|
233
|
-
...defaultContextCheck(),
|
432
|
+
...defaultContextCheck(['distributer', 'subject', 'element', 'letters', 'target', 'conditions' ]),
|
234
433
|
],
|
235
434
|
objects: [
|
236
435
|
'changeState',
|