tpmkms_4wp 8.9.1-beta.9 → 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 +6516 -754
- package/common/articles.js +6 -9
- package/common/articles.test.json +304 -4
- package/common/asking.js +1 -1
- package/common/asking.test.json +1599 -140
- package/common/avatar.js +8 -0
- package/common/avatar.test.json +6008 -2749
- package/common/characters.test.json +1371 -95
- package/common/colors.instance.json +22685 -1441
- package/common/colors.test.json +704 -136
- package/common/comparable.instance.json +1302 -169
- package/common/comparable.js +12 -12
- package/common/comparable.test.json +3239 -558
- package/common/concept.js +10 -2
- package/common/concept.test.json +2853 -694
- package/common/conjunction.js +12 -0
- package/common/conjunction.test.json +229 -1
- package/common/countable.js +1 -1
- package/common/countable.test.json +1306 -48
- package/common/crew.instance.json +18984 -1943
- package/common/crew.js +19 -0
- package/common/crew.test.json +10218 -2145
- package/common/currency.js +0 -1
- package/common/currency.test.json +948 -64
- package/common/dialogues.js +100 -32
- package/common/dialogues.test.json +6611 -1905
- package/common/dimension.instance.json +751 -82
- package/common/dimension.js +16 -2
- package/common/dimension.test.json +23680 -11550
- package/common/edible.instance.json +21654 -2721
- package/common/edible.js +13 -0
- package/common/edible.test.json +1580 -304
- package/common/emotions.instance.json +2275 -259
- package/common/emotions.js +10 -2
- package/common/emotions.test.json +1134 -107
- package/common/errors.js +0 -2
- package/common/errors.test.json +88 -0
- package/common/evaluate.test.json +100 -1
- package/common/events.test.json +2197 -242
- package/common/fastfood.instance.json +82297 -10535
- package/common/fastfood.js +96 -9
- package/common/fastfood.test.json +65486 -21430
- package/common/formulas.instance.json +316 -59
- package/common/formulas.test.json +13202 -6757
- package/common/gdefaults.js +9 -2
- package/common/help.test.json +288 -0
- package/common/helpers/concept.js +3 -2
- package/common/helpers/properties.js +2 -32
- package/common/hierarchy.js +9 -0
- package/common/hierarchy.test.json +53813 -17340
- package/common/javascript.test.json +214 -11
- package/common/kirk.instance.json +309 -9
- package/common/kirk.test.json +1123 -254
- package/common/length.instance.json +9722 -774
- package/common/length.test.json +12055 -8184
- package/common/listener.test.json +39 -1
- package/common/math.instance.json +285 -58
- package/common/math.test.json +38557 -17754
- package/common/meta.instance.json +1 -0
- package/common/meta.js +8 -8
- package/common/meta.test.json +2770 -275
- package/common/nameable.js +1 -1
- package/common/nameable.test.json +5150 -1475
- package/common/negation.test.json +146 -8
- package/common/numbers.test.json +234 -0
- package/common/ordering.instance.json +3870 -493
- package/common/ordering.test.json +2680 -1283
- package/common/ordinals.js +11 -1
- package/common/ordinals.test.json +627 -3
- package/common/people.instance.json +3844 -575
- package/common/people.js +0 -14
- package/common/people.test.json +27157 -13664
- package/common/percentages.js +0 -1
- package/common/percentages.test.json +313 -0
- package/common/pipboy.instance.json +13577 -1511
- package/common/pipboy.js +30 -48
- package/common/pipboy.test.json +19335 -6019
- package/common/pokemon.instance.json +6014 -731
- package/common/pokemon.test.json +1826 -389
- package/common/pos.js +15 -5
- package/common/pressure.instance.json +2615 -308
- package/common/pressure.test.json +2997 -1629
- package/common/properties.instance.json +894 -86
- package/common/properties.js +17 -26
- package/common/properties.test.json +46801 -14612
- package/common/punctuation.test.json +327 -0
- package/common/reports.instance.json +979 -120
- package/common/reports.js +9 -2
- package/common/reports.test.json +16653 -2453
- package/common/scorekeeper.instance.json +1 -0
- package/common/scorekeeper.js +17 -7
- package/common/scorekeeper.test.json +42546 -15408
- package/common/sizeable.js +1 -1
- package/common/sizeable.test.json +1170 -215
- package/common/spock.instance.json +309 -9
- package/common/spock.test.json +1123 -254
- package/common/stgame.js +0 -1
- package/common/stgame.test.json +1371 -91
- package/common/stm.test.json +842 -9
- package/common/tell.test.json +224 -1
- package/common/temperature.instance.json +5967 -308
- package/common/temperature.test.json +2610 -1272
- 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 +130 -27
- package/common/ui.js +0 -16
- package/common/ui.test.json +4620 -140
- package/common/weight.instance.json +9915 -777
- package/common/weight.js +10 -0
- package/common/weight.test.json +18658 -12176
- package/common/wp.instance.json +14141 -1542
- package/common/wp.js +105 -38
- package/common/wp.test.json +61801 -1662
- package/common/yesno.test.json +168 -4
- package/package.json +2 -2
package/common/wp.js
CHANGED
@@ -9,26 +9,47 @@ const wp_tests = require('./wp.test.json')
|
|
9
9
|
const instance = require('./wp.instance.json')
|
10
10
|
|
11
11
|
/*
|
12
|
-
|
12
|
+
done
|
13
|
+
|
13
14
|
bold the first word
|
14
15
|
bold the first paragraph
|
15
16
|
bold the first letter
|
16
|
-
|
17
|
-
current
|
18
|
-
|
19
|
-
underline the bolded paragraphs
|
20
|
-
underline the paragraphs that contain bolded words
|
21
|
-
|
22
|
-
after
|
23
17
|
bold the first word of every paragraph
|
24
18
|
bold the first word of the second and third paragraph
|
25
|
-
bold the first word of the second paragraph and third paragraph
|
26
|
-
bold the first letter of every word
|
27
|
-
bold the first letter of every word that starts with t
|
28
|
-
bold the first letter of the words that start with t in the third paragraph
|
29
19
|
bold the paragraph that contains words that start with t
|
30
20
|
underline the paragraph that contains bolded words
|
31
|
-
|
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
|
32
53
|
|
33
54
|
after
|
34
55
|
make the words that start with t blue
|
@@ -136,7 +157,12 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
136
157
|
let scope;
|
137
158
|
const condition = []
|
138
159
|
if (selector.ordinal) {
|
139
|
-
|
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)
|
140
166
|
} else if (isA(selector, 'everything')) {
|
141
167
|
scope = 'all'
|
142
168
|
} else if (selector.quantity) {
|
@@ -147,7 +173,7 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
147
173
|
|
148
174
|
if (selector.conditions) {
|
149
175
|
for (const condition of selector.conditions) {
|
150
|
-
if (condition.marker == '
|
176
|
+
if (condition.marker == 'wordComparisonWithVerb_wp') {
|
151
177
|
// with or not with that is the question
|
152
178
|
const letters = condition.letters.letters.text
|
153
179
|
conditions.push({ comparison: condition.comparison, letters })
|
@@ -155,7 +181,7 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
155
181
|
// with or not with that is the question
|
156
182
|
const letters = condition.letters.text
|
157
183
|
conditions.push({ comparison: condition.comparison, letters })
|
158
|
-
} else if (condition.marker == '
|
184
|
+
} else if (condition.marker == 'paragraphComparisonVerb_wp') {
|
159
185
|
// with or not with that is the question
|
160
186
|
const update = { selectors: [] }
|
161
187
|
const words = getElement(condition.words, update)
|
@@ -205,31 +231,49 @@ template = {
|
|
205
231
|
"resetIdSuffix",
|
206
232
|
{
|
207
233
|
operators: [
|
234
|
+
"([change_wp|change] (context.text !== 'to')* (context.text == 'to'))",
|
208
235
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
209
236
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
210
|
-
"((word_wp/*) [
|
237
|
+
"((word_wp/*) [wordComparisonWithVerb_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
211
238
|
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
212
239
|
// this one is "the bolded/underlined/italized/... word"
|
213
240
|
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
|
214
241
|
// the first letter of each paragraph
|
215
|
-
"((statefulElement_wp/*) <statefulElementInContext_wp|of> (statefulElement_wp/*))",
|
242
|
+
"((statefulElement_wp/*)? <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
|
216
243
|
// the paragraph that contains words that start with t
|
217
|
-
"((paragraph_wp/*) [
|
244
|
+
"((paragraph_wp/*) [paragraphComparisonVerb_wp] (word_wp/*))",
|
218
245
|
],
|
219
246
|
associations: {
|
220
247
|
negative: [
|
221
248
|
],
|
222
249
|
positive: [
|
223
250
|
// TODO remove these after crucible work done and fix the associator rules
|
224
|
-
[['
|
225
|
-
[['
|
226
|
-
[['
|
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 },
|
227
267
|
]
|
228
268
|
},
|
229
269
|
|
230
270
|
bridges: [
|
271
|
+
{
|
272
|
+
id: 'change_wp',
|
273
|
+
bridge: "{ ...next(operator), from: after[0][0], generate: [operator, 'from', after[1]] }",
|
274
|
+
},
|
231
275
|
{
|
232
|
-
id: '
|
276
|
+
id: 'paragraphComparisonVerb_wp',
|
233
277
|
parents: ['verb'],
|
234
278
|
words: [
|
235
279
|
{ word: 'contain', comparison: 'include' },
|
@@ -242,7 +286,36 @@ template = {
|
|
242
286
|
{
|
243
287
|
id: 'statefulElementInContext_wp',
|
244
288
|
parents: ['preposition'],
|
245
|
-
|
289
|
+
optional: {
|
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)))
|
305
|
+
},
|
306
|
+
},
|
307
|
+
{
|
308
|
+
id: 'applyStyle_wp',
|
309
|
+
parents: ['verb'],
|
310
|
+
convolution: true,
|
311
|
+
bridge: "{ ...next(operator), element: after[0], state: before[0], operator: operator, generate: ['state', 'element'] }",
|
312
|
+
localHierarchy: [
|
313
|
+
['thisitthat', 'statefulElement_wp'],
|
314
|
+
['everything', 'statefulElement_wp'],
|
315
|
+
],
|
316
|
+
semantic: (args) => {
|
317
|
+
changeState({...args, element: args.context.element, state: args.context.state})
|
318
|
+
}
|
246
319
|
},
|
247
320
|
{
|
248
321
|
id: 'modifiedByStyle_wp',
|
@@ -252,7 +325,7 @@ template = {
|
|
252
325
|
bridge: "{ ...after[0], style: before[0], target: after[0], generate: ['style', 'target'], conditions: append(after[0].conditions, [before[0]]) }",
|
253
326
|
},
|
254
327
|
{
|
255
|
-
id: '
|
328
|
+
id: 'wordComparisonWithVerb_wp',
|
256
329
|
parents: ['verb'],
|
257
330
|
words: [
|
258
331
|
{ word: 'start', comparison: 'prefix' },
|
@@ -284,19 +357,6 @@ template = {
|
|
284
357
|
},
|
285
358
|
bridge: "{ ...next(operator), operator: operator, letters: after[1], generate: ['operator', 'letters'] }",
|
286
359
|
},
|
287
|
-
{
|
288
|
-
id: 'applyStyle_wp',
|
289
|
-
parents: ['verb'],
|
290
|
-
convolution: true,
|
291
|
-
bridge: "{ ...next(operator), element: after[0], state: before[0], operator: operator, generate: ['state', 'element'] }",
|
292
|
-
localHierarchy: [
|
293
|
-
['thisitthat', 'statefulElement_wp'],
|
294
|
-
['everything', 'statefulElement_wp'],
|
295
|
-
],
|
296
|
-
semantic: (args) => {
|
297
|
-
changeState({...args, element: args.context.element, state: args.context.state})
|
298
|
-
}
|
299
|
-
},
|
300
360
|
{
|
301
361
|
id: 'changeState_wp',
|
302
362
|
parents: ['verb'],
|
@@ -338,6 +398,13 @@ template = {
|
|
338
398
|
},
|
339
399
|
],
|
340
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] },
|
341
408
|
{ "context": [['ordinal',1], ['list', 0], ['ordinal', 1], ['word_wp', 1]], ordered: true, choose: [1] },
|
342
409
|
{ "context": [['changeState_wp',0], ['every', 0], ['word_wp', 1], ['list', 1]], ordered: true, choose: [1] },
|
343
410
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|