tpmkms_4wp 8.9.1-beta.2 → 8.9.1-beta.3
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 +36 -0
- package/common/colors.instance.json +26 -18
- package/common/crew.instance.json +88 -272
- package/common/dialogues.js +2 -1
- package/common/dimension.instance.json +36 -0
- package/common/edible.instance.json +23 -43
- package/common/emotions.instance.json +60 -0
- package/common/fastfood.instance.json +509 -357
- package/common/gdefaults.js +13 -11
- package/common/helpers.js +16 -0
- package/common/pipboy.instance.json +23 -43
- package/common/properties.instance.json +44 -0
- package/common/reports.instance.json +1 -1
- package/common/wp.instance.json +4 -60
- package/common/wp.js +20 -10
- package/common/wp.test.json +31165 -3067
- package/package.json +2 -2
package/common/gdefaults.js
CHANGED
@@ -3,7 +3,7 @@ const { defaultContextCheck } = require('./helpers')
|
|
3
3
|
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
4
4
|
const tokenize = require('./tokenize.js')
|
5
5
|
const gdefaults_tests = require('./gdefaults.test.json')
|
6
|
-
const { isMany } = require('./helpers.js')
|
6
|
+
const { getValue, isMany } = require('./helpers.js')
|
7
7
|
|
8
8
|
let config = {
|
9
9
|
name: 'gdefaults',
|
@@ -33,20 +33,22 @@ let config = {
|
|
33
33
|
where: where(),
|
34
34
|
match: ({context}) => context.generate,
|
35
35
|
apply: async ({context, gs}) => {
|
36
|
-
const
|
37
|
-
const
|
38
|
-
|
39
|
-
|
36
|
+
const contexts = []
|
37
|
+
for (const key of context.generate) {
|
38
|
+
const value = getValue(key, context)
|
39
|
+
if (!(value !== undefined || key == 'this')) {
|
40
|
+
continue
|
41
|
+
}
|
42
|
+
if (value.skipDefault) {
|
43
|
+
continue
|
40
44
|
}
|
41
|
-
return true
|
42
|
-
})
|
43
|
-
return gs(filtered.map((key) => {
|
44
45
|
if (key == 'this') {
|
45
|
-
|
46
|
+
contexts.push({...context, generate: null})
|
46
47
|
} else {
|
47
|
-
|
48
|
+
contexts.push(value)
|
48
49
|
}
|
49
|
-
}
|
50
|
+
}
|
51
|
+
return gs(contexts)
|
50
52
|
}
|
51
53
|
},
|
52
54
|
|
package/common/helpers.js
CHANGED
@@ -191,7 +191,23 @@ const isA = (hierarchy) => (child, parent, { strict=false } = {}) => {
|
|
191
191
|
}
|
192
192
|
}
|
193
193
|
|
194
|
+
const getValue = (propertyPath, object) => {
|
195
|
+
if (!propertyPath) {
|
196
|
+
return
|
197
|
+
}
|
198
|
+
const path = propertyPath.split('.')
|
199
|
+
let value = object
|
200
|
+
for (const name of path) {
|
201
|
+
if (!value) {
|
202
|
+
break
|
203
|
+
}
|
204
|
+
value = value[name]
|
205
|
+
}
|
206
|
+
return value
|
207
|
+
}
|
208
|
+
|
194
209
|
module.exports = {
|
210
|
+
getValue,
|
195
211
|
defaultContextCheck,
|
196
212
|
defaultContextCheckProperties,
|
197
213
|
toEValue,
|
@@ -1782,20 +1782,6 @@
|
|
1782
1782
|
1
|
1783
1783
|
]
|
1784
1784
|
],
|
1785
|
-
[
|
1786
|
-
[
|
1787
|
-
"is",
|
1788
|
-
0
|
1789
|
-
],
|
1790
|
-
[
|
1791
|
-
"list",
|
1792
|
-
1
|
1793
|
-
],
|
1794
|
-
[
|
1795
|
-
"unknown",
|
1796
|
-
1
|
1797
|
-
]
|
1798
|
-
],
|
1799
1785
|
[
|
1800
1786
|
[
|
1801
1787
|
"is",
|
@@ -8544,20 +8530,6 @@
|
|
8544
8530
|
1
|
8545
8531
|
]
|
8546
8532
|
],
|
8547
|
-
[
|
8548
|
-
[
|
8549
|
-
"is",
|
8550
|
-
0
|
8551
|
-
],
|
8552
|
-
[
|
8553
|
-
"list",
|
8554
|
-
1
|
8555
|
-
],
|
8556
|
-
[
|
8557
|
-
"unknown",
|
8558
|
-
1
|
8559
|
-
]
|
8560
|
-
],
|
8561
8533
|
[
|
8562
8534
|
[
|
8563
8535
|
"is",
|
@@ -23858,6 +23830,24 @@
|
|
23858
23830
|
1
|
23859
23831
|
]
|
23860
23832
|
],
|
23833
|
+
[
|
23834
|
+
[
|
23835
|
+
"is",
|
23836
|
+
0
|
23837
|
+
],
|
23838
|
+
[
|
23839
|
+
"list",
|
23840
|
+
0
|
23841
|
+
],
|
23842
|
+
[
|
23843
|
+
"unknown",
|
23844
|
+
0
|
23845
|
+
],
|
23846
|
+
[
|
23847
|
+
"unknown",
|
23848
|
+
1
|
23849
|
+
]
|
23850
|
+
],
|
23861
23851
|
[
|
23862
23852
|
[
|
23863
23853
|
"is",
|
@@ -30137,6 +30127,10 @@
|
|
30137
30127
|
"list",
|
30138
30128
|
0
|
30139
30129
|
],
|
30130
|
+
[
|
30131
|
+
"unknown",
|
30132
|
+
0
|
30133
|
+
],
|
30140
30134
|
[
|
30141
30135
|
"unknown",
|
30142
30136
|
1
|
@@ -30177,16 +30171,10 @@
|
|
30177
30171
|
],
|
30178
30172
|
[
|
30179
30173
|
"list",
|
30180
|
-
1
|
30181
|
-
]
|
30182
|
-
],
|
30183
|
-
[
|
30184
|
-
[
|
30185
|
-
"is",
|
30186
30174
|
0
|
30187
30175
|
],
|
30188
30176
|
[
|
30189
|
-
"
|
30177
|
+
"unknown",
|
30190
30178
|
1
|
30191
30179
|
]
|
30192
30180
|
],
|
@@ -30208,10 +30196,6 @@
|
|
30208
30196
|
[
|
30209
30197
|
"list",
|
30210
30198
|
1
|
30211
|
-
],
|
30212
|
-
[
|
30213
|
-
"unknown",
|
30214
|
-
1
|
30215
30199
|
]
|
30216
30200
|
],
|
30217
30201
|
[
|
@@ -30222,10 +30206,6 @@
|
|
30222
30206
|
[
|
30223
30207
|
"list",
|
30224
30208
|
1
|
30225
|
-
],
|
30226
|
-
[
|
30227
|
-
"unknown",
|
30228
|
-
1
|
30229
30209
|
]
|
30230
30210
|
],
|
30231
30211
|
[
|
@@ -639,6 +639,28 @@
|
|
639
639
|
1
|
640
640
|
]
|
641
641
|
],
|
642
|
+
[
|
643
|
+
[
|
644
|
+
"is",
|
645
|
+
0
|
646
|
+
],
|
647
|
+
[
|
648
|
+
"propertyOf",
|
649
|
+
0
|
650
|
+
],
|
651
|
+
[
|
652
|
+
"the",
|
653
|
+
0
|
654
|
+
],
|
655
|
+
[
|
656
|
+
"unknown",
|
657
|
+
0
|
658
|
+
],
|
659
|
+
[
|
660
|
+
"unknown",
|
661
|
+
1
|
662
|
+
]
|
663
|
+
],
|
642
664
|
[
|
643
665
|
[
|
644
666
|
"is",
|
@@ -746,6 +768,28 @@
|
|
746
768
|
1
|
747
769
|
]
|
748
770
|
],
|
771
|
+
[
|
772
|
+
[
|
773
|
+
"is",
|
774
|
+
0
|
775
|
+
],
|
776
|
+
[
|
777
|
+
"propertyOf",
|
778
|
+
0
|
779
|
+
],
|
780
|
+
[
|
781
|
+
"the",
|
782
|
+
0
|
783
|
+
],
|
784
|
+
[
|
785
|
+
"unknown",
|
786
|
+
0
|
787
|
+
],
|
788
|
+
[
|
789
|
+
"unknown",
|
790
|
+
1
|
791
|
+
]
|
792
|
+
],
|
749
793
|
[
|
750
794
|
[
|
751
795
|
"is",
|
@@ -1063,7 +1063,7 @@
|
|
1063
1063
|
}
|
1064
1064
|
]
|
1065
1065
|
},
|
1066
|
-
"trace": "\n\n>>>>>>>>>>>>> Counter 1\n 0. price/0 (1, 1) - \"price\"\n {\n default: true\n marker: Operator(price/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n 1. list/0 (1, 5) - \"and\"\n {\n default: true\n marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({}) bridge(bridge))\n range: {'start': 6, 'end': 8}\n text: \"and\"\n word: \"and\"\n }\n 2. quantity/0 (1, 9) - \"quantity\"\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n 3. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 4. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=0) is Context({default: True, marker: Operator(price/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 0, 'end': 4}, text: price, value: price, word: price})\n\n>>>>>>>>>>>>> Counter 2\n *0. price/1 (dead) (2, 0) - \"price\"\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n 1. list/0 (1, 5) - \"and\"\n {\n default: true\n marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge))\n range: {'start': 6, 'end': 8}\n text: \"and\"\n types: [\n ]\n word: \"and\"\n }\n 2. quantity/0 (1, 9) - \"quantity\"\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n 3. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 4. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=1) is Context({default: True, marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge)), range: {'start': 6, 'end': 8}, text: and, types: [], word: and})\n\n>>>>>>>>>>>>> Counter 3\n *0. list/1 (3, 0) - \"price and quantity\"\n {\n prioritized_by: [('list', 0)]\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge))\n range: {'start': 0, 'end': 17}\n text: \"price and quantity\"\n types: [\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n 1. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 2. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=2) is Context({marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 23, 'end': 32}, text: properties, value: property, word: properties})\n\n>>>>>>>>>>>>> Counter 4\n 0. list/1 (3, 0) - \"price and quantity\"\n {\n prioritized_by: [('list', 0)]\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge))\n range: {'start': 0, 'end': 17}\n text: \"price and quantity\"\n types: [\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n 1. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n *2. property/1 (dead) (2, 1) - \"properties\"\n {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=1) is Context({marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge)), number: many, range: {'start': 19, 'end': 21}, text: are, word: are})\n\n>>>>>>>>>>>>> Counter 5\n *0. is/1 (4, 0) - \"price and quantity are properties\"\n {\n prioritized_by: [('is', 0)]\n marker: Operator(is/1, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n number: \"many\"\n one: {\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge))\n number: \"many\"\n range: {'start': 0, 'end': 32}\n text: \"price and quantity\"\n types: [\n 'price'\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n\n range: {'start': 0, 'end': 32}\n text: \"price and quantity are properties\"\n two: {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n types: [\n 'property'\n ]\n value: \"property\"\n word: \"properties\"\n }\n\n word: \"are\"\n }\n<<<<<<<<<<<<<\nNext Op (index=0) is Context({marker: Operator(is/1, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), number: many, one: Context({default: True, isList: True, listable: True, marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge)), number: many, range: {'start': 0, 'end': 32}, text: price and quantity, types: ['price'], value: [Context({dead: True, default: True, marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge)), range: {'start': 0, 'end': 4}, text: price, value: price, word: price}), Context({default: True, marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 10, 'end': 17}, text: quantity, value: quantity, word: quantity})], word: and}), range: {'start': 0, 'end': 32}, text: price and quantity are properties, two: Context({dead: True, marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge)), range: {'start': 23, 'end': 32}, text: properties, types: ['property'], value: property, word: properties}), word: are})\n\n>>>>>>>>>>>>> Counter 6\n *0. is/2 (dead) (5, 0) - \"price and quantity are properties\"\n {\n prioritized_by: [('is', 1)]\n dead: true\n marker: Operator(is/2, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n number: \"many\"\n one: {\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['queryable', 'quantifier', 'comparable', 'theAble', 'number', 'property', 'quantity']}) bridge(bridge))\n number: \"many\"\n range: {'start': 0, 'end': 32}\n text: \"price and quantity\"\n types: [\n 'price'\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n\n range: {'start': 0, 'end': 32}\n text: \"price and quantity are properties\"\n two: {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n types: [\n 'property'\n ]\n value: \"property\"\n word: \"properties\"\n }\n\n word: \"are\"\n }\n<<<<<<<<<<<<<\n",
|
1066
|
+
"trace": "\n\n>>>>>>>>>>>>> Counter 1\n 0. price/0 (1, 1) - \"price\"\n {\n default: true\n marker: Operator(price/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n 1. list/0 (1, 5) - \"and\"\n {\n default: true\n marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({}) bridge(bridge))\n range: {'start': 6, 'end': 8}\n text: \"and\"\n word: \"and\"\n }\n 2. quantity/0 (1, 9) - \"quantity\"\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n 3. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 4. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=0) is Context({default: True, marker: Operator(price/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 0, 'end': 4}, text: price, value: price, word: price})\n\n>>>>>>>>>>>>> Counter 2\n *0. price/1 (dead) (2, 0) - \"price\"\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n 1. list/0 (1, 5) - \"and\"\n {\n default: true\n marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge))\n range: {'start': 6, 'end': 8}\n text: \"and\"\n types: [\n ]\n word: \"and\"\n }\n 2. quantity/0 (1, 9) - \"quantity\"\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n 3. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 4. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=1) is Context({default: True, marker: Operator(list/0, PASS, ['Selector(Bridge(\\'{ ...next(operator), listable: true, isList: true, value: append(before, after) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])], bridge(bridge))'], evaluator(Bridge('{ ...next(operator), listable: true, isList: true, value: append(before, after) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge)), range: {'start': 6, 'end': 8}, text: and, types: [], word: and})\n\n>>>>>>>>>>>>> Counter 3\n *0. list/1 (3, 0) - \"price and quantity\"\n {\n prioritized_by: [('list', 0)]\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge))\n range: {'start': 0, 'end': 17}\n text: \"price and quantity\"\n types: [\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n 1. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n 2. property/0 (1, 18) - \"properties\"\n {\n marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=2) is Context({marker: Operator(property/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 23, 'end': 32}, text: properties, value: property, word: properties})\n\n>>>>>>>>>>>>> Counter 4\n 0. list/1 (3, 0) - \"price and quantity\"\n {\n prioritized_by: [('list', 0)]\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge))\n range: {'start': 0, 'end': 17}\n text: \"price and quantity\"\n types: [\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n 1. is/0 (1, 12) - \"are\"\n {\n marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge))\n number: \"many\"\n range: {'start': 19, 'end': 21}\n text: \"are\"\n word: \"are\"\n }\n *2. property/1 (dead) (2, 1) - \"properties\"\n {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n value: \"property\"\n word: \"properties\"\n }\n<<<<<<<<<<<<<\nNext Op (index=1) is Context({marker: Operator(is/0, [\"Selector(Bridge('{ ...next(operator), one: after[0], two: after[1], query: true }'), , []<==>[Type('queryable'), Type('queryable')], bridge(queryBridge))\", \"Selector(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }'), , [Type('queryable')]<==>[Type('queryable')], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator), one: { number: operator.number, ...before[0] }, two: after[0] }')), variables({}) bridge(bridge)), number: many, range: {'start': 19, 'end': 21}, text: are, word: are})\n\n>>>>>>>>>>>>> Counter 5\n *0. is/1 (4, 0) - \"price and quantity are properties\"\n {\n prioritized_by: [('is', 0)]\n marker: Operator(is/1, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n number: \"many\"\n one: {\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge))\n number: \"many\"\n range: {'start': 0, 'end': 32}\n text: \"price and quantity\"\n types: [\n 'price'\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n\n range: {'start': 0, 'end': 32}\n text: \"price and quantity are properties\"\n two: {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n types: [\n 'property'\n ]\n value: \"property\"\n word: \"properties\"\n }\n\n word: \"are\"\n }\n<<<<<<<<<<<<<\nNext Op (index=0) is Context({marker: Operator(is/1, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), number: many, one: Context({default: True, isList: True, listable: True, marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge)), number: many, range: {'start': 0, 'end': 32}, text: price and quantity, types: ['price'], value: [Context({dead: True, default: True, marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge)), range: {'start': 0, 'end': 4}, text: price, value: price, word: price}), Context({default: True, marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge)), range: {'start': 10, 'end': 17}, text: quantity, value: quantity, word: quantity})], word: and}), range: {'start': 0, 'end': 32}, text: price and quantity are properties, two: Context({dead: True, marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge)), range: {'start': 23, 'end': 32}, text: properties, types: ['property'], value: property, word: properties}), word: are})\n\n>>>>>>>>>>>>> Counter 6\n *0. is/2 (dead) (5, 0) - \"price and quantity are properties\"\n {\n prioritized_by: [('is', 1)]\n dead: true\n marker: Operator(is/2, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n number: \"many\"\n one: {\n default: true\n isList: true\n listable: true\n marker: Operator(list/1, PASS, ['Selector(Bridge(\\'{ ...operator, value: append(before, operator.value) }\\'), , same/(), [And([\"Type(variable: \\'type\\')\", \"Listable(Unify(Property((\\'context\\', \\'instance\\')), Property((\\'variables\\', \\'instance\\'))))\"])]<==>[], bridge(bridge), passthrough)'], evaluator(Bridge('{ ...operator, value: append(before, operator.value) }')), variables({'type': ['comparable', 'theAble', 'quantifier', 'number', 'quantity', 'queryable', 'property']}) bridge(bridge))\n number: \"many\"\n range: {'start': 0, 'end': 32}\n text: \"price and quantity\"\n types: [\n 'price'\n ]\n value: [\n {\n prioritized_by: [('price', 0)]\n dead: true\n default: true\n marker: Operator(price/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 0, 'end': 4}\n text: \"price\"\n value: \"price\"\n word: \"price\"\n }\n\n {\n default: true\n marker: Operator(quantity/0, [\"Selector(Bridge('{ ...next(operator) }'), , []<==>[], bridge(bridge))\"], evaluator(Bridge('{ ...next(operator) }')), variables({}) bridge(bridge))\n range: {'start': 10, 'end': 17}\n text: \"quantity\"\n value: \"quantity\"\n word: \"quantity\"\n }\n ]\n word: \"and\"\n }\n\n range: {'start': 0, 'end': 32}\n text: \"price and quantity are properties\"\n two: {\n prioritized_by: [('property', 0)]\n dead: true\n marker: Operator(property/1, ['Selector(None, , []<==>[], bridge(bridge))'], evaluator(None), variables({}) bridge(bridge))\n range: {'start': 23, 'end': 32}\n text: \"properties\"\n types: [\n 'property'\n ]\n value: \"property\"\n word: \"properties\"\n }\n\n word: \"are\"\n }\n<<<<<<<<<<<<<\n",
|
1067
1067
|
"contexts": [
|
1068
1068
|
{
|
1069
1069
|
"number": "many",
|
package/common/wp.instance.json
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
20
20
|
"((word_wp/*) [wordComparisonWith_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
21
21
|
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
22
|
-
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/*))"
|
22
|
+
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))"
|
23
23
|
],
|
24
24
|
"bridges": [
|
25
25
|
{
|
@@ -15532,20 +15532,6 @@
|
|
15532
15532
|
1
|
15533
15533
|
]
|
15534
15534
|
],
|
15535
|
-
[
|
15536
|
-
[
|
15537
|
-
"is",
|
15538
|
-
0
|
15539
|
-
],
|
15540
|
-
[
|
15541
|
-
"list",
|
15542
|
-
1
|
15543
|
-
],
|
15544
|
-
[
|
15545
|
-
"unknown",
|
15546
|
-
1
|
15547
|
-
]
|
15548
|
-
],
|
15549
15535
|
[
|
15550
15536
|
[
|
15551
15537
|
"is",
|
@@ -32985,20 +32971,6 @@
|
|
32985
32971
|
1
|
32986
32972
|
]
|
32987
32973
|
],
|
32988
|
-
[
|
32989
|
-
[
|
32990
|
-
"is",
|
32991
|
-
0
|
32992
|
-
],
|
32993
|
-
[
|
32994
|
-
"list",
|
32995
|
-
1
|
32996
|
-
],
|
32997
|
-
[
|
32998
|
-
"unknown",
|
32999
|
-
1
|
33000
|
-
]
|
33001
|
-
],
|
33002
32974
|
[
|
33003
32975
|
[
|
33004
32976
|
"is",
|
@@ -35906,7 +35878,7 @@
|
|
35906
35878
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
35907
35879
|
"((word_wp/*) [wordComparisonWith_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
35908
35880
|
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
35909
|
-
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/*))"
|
35881
|
+
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))"
|
35910
35882
|
],
|
35911
35883
|
"bridges": [
|
35912
35884
|
{
|
@@ -36025,10 +35997,10 @@
|
|
36025
35997
|
],
|
36026
35998
|
"semantics": [
|
36027
35999
|
{
|
36028
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:
|
36000
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:230"
|
36029
36001
|
},
|
36030
36002
|
{
|
36031
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:
|
36003
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:239"
|
36032
36004
|
}
|
36033
36005
|
],
|
36034
36006
|
"priorities": [
|
@@ -36638,34 +36610,6 @@
|
|
36638
36610
|
1
|
36639
36611
|
]
|
36640
36612
|
],
|
36641
|
-
[
|
36642
|
-
[
|
36643
|
-
"is",
|
36644
|
-
0
|
36645
|
-
],
|
36646
|
-
[
|
36647
|
-
"list",
|
36648
|
-
1
|
36649
|
-
],
|
36650
|
-
[
|
36651
|
-
"unknown",
|
36652
|
-
1
|
36653
|
-
]
|
36654
|
-
],
|
36655
|
-
[
|
36656
|
-
[
|
36657
|
-
"is",
|
36658
|
-
0
|
36659
|
-
],
|
36660
|
-
[
|
36661
|
-
"list",
|
36662
|
-
1
|
36663
|
-
],
|
36664
|
-
[
|
36665
|
-
"unknown",
|
36666
|
-
1
|
36667
|
-
]
|
36668
|
-
],
|
36669
36613
|
[
|
36670
36614
|
[
|
36671
36615
|
"is",
|
package/common/wp.js
CHANGED
@@ -40,6 +40,8 @@ const instance = require('./wp.instance.json')
|
|
40
40
|
words containing a
|
41
41
|
every 5th word
|
42
42
|
|
43
|
+
the words that are capitalized
|
44
|
+
|
43
45
|
in the first paragraph make the words that start with abc bold
|
44
46
|
bold the first three words that start with t
|
45
47
|
bold much and many
|
@@ -102,15 +104,20 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
102
104
|
if (isA(context.element, 'everything')) {
|
103
105
|
scope = 'all'
|
104
106
|
} else if (context.element.conditions) {
|
105
|
-
const condition
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
107
|
+
for (const condition of context.element.conditions) {
|
108
|
+
if (condition.marker == 'wordComparisonWith_wp') {
|
109
|
+
// with or not with that is the question
|
110
|
+
const letters = condition.letters.letters.text
|
111
|
+
conditions.push({ comparison: condition.comparison, letters })
|
112
|
+
} else if (condition.marker == 'wordComparison_wp') {
|
113
|
+
// with or not with that is the question
|
114
|
+
const letters = condition.letters.text
|
115
|
+
conditions.push({ comparison: condition.comparison, letters })
|
116
|
+
} else if (isA(condition, 'styleModifier_wp')) {
|
117
|
+
for (const style of toArray(condition)) {
|
118
|
+
conditions.push({ hasStyle: style.marker })
|
119
|
+
}
|
120
|
+
}
|
114
121
|
}
|
115
122
|
} else {
|
116
123
|
scope = context.element.quantity.quantity
|
@@ -144,11 +151,13 @@ template = {
|
|
144
151
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
145
152
|
"((word_wp/*) [wordComparisonWith_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
146
153
|
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
147
|
-
"
|
154
|
+
// this one is "the bolded/underlined/italized/... word"
|
155
|
+
"((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
|
148
156
|
],
|
149
157
|
bridges: [
|
150
158
|
{
|
151
159
|
id: 'modifiedByStyle_wp',
|
160
|
+
// parents: ['verb'],
|
152
161
|
parents: ['adjective'],
|
153
162
|
convolution: true,
|
154
163
|
bridge: "{ ...after[0], style: before[0], target: after[0], generate: ['style', 'target'], conditions: append(after[0].conditions, [before[0]]) }",
|
@@ -240,6 +249,7 @@ template = {
|
|
240
249
|
},
|
241
250
|
],
|
242
251
|
priorities: [
|
252
|
+
// { "context": [['underline_wp',0], ['statefulElement_wp', 1], ['thatVerb', 0]], ordered: true, choose: [2] },
|
243
253
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|
244
254
|
{ "context": [['comparisonWith_wp',0], ['unknown', 0], ['list', 1]], ordered: true, choose: [0] },
|
245
255
|
],
|