ekms 9.7.1-beta.12 → 9.7.1-beta.13
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/angle.instance.json +27 -0
- package/common/articles.js +38 -4
- package/common/can.instance.json +1 -1
- package/common/conjunction.js +2 -2
- package/common/countable.js +39 -5
- package/common/crew.instance.json +1029 -98
- package/common/crew.js +3 -3
- package/common/dialogues.js +3 -4
- package/common/dimension.instance.json +124 -6
- package/common/dimension.js +3 -4
- package/common/drone.instance.json +33 -42
- package/common/drone.js +3 -3
- package/common/edible.instance.json +72 -0
- package/common/emotions.instance.json +143 -4
- package/common/fastfood.instance.json +304 -197
- package/common/fastfood.js +7 -0
- package/common/gdefaults.js +12 -121
- package/common/hierarchy.js +0 -1
- package/common/length.instance.json +27 -0
- package/common/ordinals.js +9 -3
- package/common/pipboy.instance.json +2 -2
- package/common/pipboy.js +3 -3
- package/common/pressure.instance.json +27 -0
- package/common/properties.instance.json +314 -37
- package/common/properties.js +21 -24
- package/common/reports.instance.json +2 -2
- package/common/stm.js +0 -1
- package/common/temperature.instance.json +27 -0
- package/common/time.instance.json +27 -0
- package/common/weight.instance.json +27 -0
- package/common/wp.instance.json +21 -21
- package/common/wp.js +62 -10
- package/package.json +2 -2
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
"unknown"
|
|
292
292
|
]
|
|
293
293
|
],
|
|
294
|
-
"bridge": "{ ...next(operator), object: after[0], objects: after }"
|
|
294
|
+
"bridge": "{ \n ...next(operator), \n ofWord: operator,\n object: after[0], \n objects: after \n }"
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
"id": "propertyOf",
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
"unknown"
|
|
311
311
|
]
|
|
312
312
|
],
|
|
313
|
-
"bridge": "{ ...before[0], propertyOf: true, object: operator.object, objects: append(default(before[0].objects, before), operator.objects) }"
|
|
313
|
+
"bridge": "{ \n ...before[0], \n propertyOf: true, \n interpolate: [ { property: 'property' }, { word: 'of' }, { property: 'object' } ],\n property: before[0],\n object: operator.object, \n objects: append(default(before[0].objects, before), operator.objects) \n }"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"id": "whose",
|
|
@@ -882,11 +882,11 @@
|
|
|
882
882
|
},
|
|
883
883
|
{
|
|
884
884
|
"match": "({context, hierarchy, uuid}) => hierarchy.isA(context.marker, 'property') && context.same && context.objects && !context[`disable${uuid}`]",
|
|
885
|
-
"apply": "async (args) => {\n const {context, fragments, objects, km, api, log, s, uuid} = args\n const objectContext = context.object;\n const propertyContext = context;\n const objectId = context.object.value\n\n await api.makeObject({ ...args, context: objectContext })\n await api.makeObject({ ...args, context: propertyContext })\n // const propertyId = context.value\n /*\n const propertyId = context.marker\n if (context.marker != context.value) {\n }\n */\n // const propertyId = context.marker\n /*\n // greg HERE\n */\n propertyContext[`disable${uuid}`] = true\n const propertyId = (await km(\"dialogues\").api.evaluateToConcept(propertyContext, context, log, s)).evalue;\n try{\n // greg\n // api.makeObject({config, context: objectContext, doPluralize: false})\n // api.addWord(propertyContext)\n // api.addWord(objectContext)\n // propertyContext.objects = null;\n api.setProperty(pluralize.singular(objectId), pluralize.singular(propertyId), context.same, true)\n context.sameWasProcessed = true\n } catch (e) {\n log(`Error processing set property of an object: ${e}`)\n const config = km('properties')\n const
|
|
885
|
+
"apply": "async (args) => {\n const {context, fragments, objects, km, api, log, s, uuid} = args\n const objectContext = context.object;\n const propertyContext = context;\n const objectId = context.object.value\n\n await api.makeObject({ ...args, context: objectContext })\n await api.makeObject({ ...args, context: propertyContext })\n // const propertyId = context.value\n /*\n const propertyId = context.marker\n if (context.marker != context.value) {\n }\n */\n // const propertyId = context.marker\n /*\n // greg HERE\n */\n propertyContext[`disable${uuid}`] = true\n const propertyId = (await km(\"dialogues\").api.evaluateToConcept(propertyContext, context, log, s)).evalue;\n try{\n // greg\n // api.makeObject({config, context: objectContext, doPluralize: false})\n // api.addWord(propertyContext)\n // api.addWord(objectContext)\n // propertyContext.objects = null;\n api.setProperty(pluralize.singular(objectId), pluralize.singular(propertyId), context.same, true)\n context.sameWasProcessed = true\n } catch (e) {\n log(`Error processing set property of an object: ${e}`)\n const config = km('properties')\n const value = await api.getProperty(objectId, propertyId)\n if (value.value == context.same.value) {\n context.evalue = [\n { marker: 'yesno', value: true, paraphrase: true },\n ]\n context.isResponse = true\n context.sameWasProcessed = true\n } else {\n const mappings = {\n property1: { word: propertyContext.word, value: propertyContext.value, paraphrase: true },\n object1: { word: objectContext.word, value: objectContext.value, paraphrase: true },\n value1: value,\n }\n // run the query 'the property of object' then copy that here and template it\n context.evalue = [\n { marker: 'yesno', value: false, paraphrase: true },\n ]\n context.evalue = context.evalue.concat(await fragments(\"the property1 of object1 is value1\", mappings))\n context.evalue.forEach( (r) => r.paraphrase = true )\n context.isResponse = true\n context.sameWasProcessed = true\n }\n }\n }"
|
|
886
886
|
},
|
|
887
887
|
{
|
|
888
888
|
"match": "({context, hierarchy}) => \n (hierarchy.isA(context.marker, 'property') || (hierarchy.isA(context.marker, 'list') && context.possession)) && \n context.evaluate && \n context.objects &&\n !context.evaluate.toConcept",
|
|
889
|
-
"apply": "async ({callId, flatten, asList, context, api, kms, objects, g, s, log, recall}) => {\n async function toValue(objectContext) {\n if (!objectContext.value) {\n return objectContext;\n }\n let objectValue = kms.stm.api.getVariable(objectContext);\n if (!objectValue) {\n objectValue = objectContext.value\n }\n if (!await api.knownObject(objectValue)) {\n objectContext.verbatim = `There is no object named \"${await g({...objectContext, paraphrase: true})}\"`\n return\n }\n return objectValue\n }\n\n async function processOne(toDo) {\n let currentContext = toDo.pop()\n let currentValue = await toValue(currentContext)\n while (toDo.length > 0) {\n const nextContext = toDo.pop()\n const nextValue = await toValue(nextContext)\n if (!nextValue) {\n // TODO maybe this I aware so it can say \"I don't know about blah...\" and below\n // if (currentContext.unknown || !currentContext.value) {\n if (!api.conceptExists(currentContext.value)) {\n // api.conceptExists(currentContext)\n const objectPhrase = await g({...currentContext, paraphrase: true})\n context.verbatim = `What \"${objectPhrase}\" means is unknown`\n return\n }\n\n const propertyPhrase = await g({...nextContext, paraphrase: true})\n const objectPhrase = await g({...currentContext, paraphrase: true})\n context.verbatim = `There is no interpretation for \"${propertyPhrase} of ${objectPhrase}\"`\n return\n }\n\n let fromMentions\n if (!await api.knownProperty(currentContext, nextContext)) {\n fromMentions = await recall({ context: nextContext, all: nextContext.number == 'many', frameOfReference: currentContext })\n if (!fromMentions) {\n context.verbatim = `There is no property ${await g({...nextContext, paraphrase: true})} of ${await g({...currentContext, paraphrase: true})}`\n return\n }\n }\n if (fromMentions) {\n currentContext = fromMentions\n currentValue = fromMentions // TODO not sure what is right here so just do something and fix when actually needed SOP\n } else {\n currentContext = await api.getProperty(currentValue, nextValue, g)\n currentValue = currentContext.value\n }\n }\n return currentContext\n }\n\n
|
|
889
|
+
"apply": "async ({callId, flatten, asList, context, api, kms, objects, g, s, log, recall}) => {\n async function toValue(objectContext) {\n if (!objectContext.value) {\n return objectContext;\n }\n let objectValue = kms.stm.api.getVariable(objectContext);\n if (!objectValue) {\n objectValue = objectContext.value\n }\n if (!await api.knownObject(objectValue)) {\n objectContext.verbatim = `There is no object named \"${await g({...objectContext, paraphrase: true})}\"`\n return\n }\n return objectValue\n }\n\n async function processOne(toDo) {\n let currentContext = toDo.pop()\n let currentValue = await toValue(currentContext)\n while (toDo.length > 0) {\n const nextContext = toDo.pop()\n const nextValue = await toValue(nextContext)\n if (!nextValue) {\n // TODO maybe this I aware so it can say \"I don't know about blah...\" and below\n // if (currentContext.unknown || !currentContext.value) {\n if (!api.conceptExists(currentContext.value)) {\n // api.conceptExists(currentContext)\n const objectPhrase = await g({...currentContext, paraphrase: true})\n context.verbatim = `What \"${objectPhrase}\" means is unknown`\n return\n }\n\n const propertyPhrase = await g({...nextContext, paraphrase: true})\n const objectPhrase = await g({...currentContext, paraphrase: true})\n context.verbatim = `There is no interpretation for \"${propertyPhrase} of ${objectPhrase}\"`\n return\n }\n\n let fromMentions\n if (!await api.knownProperty(currentContext, nextContext)) {\n fromMentions = await recall({ context: nextContext, all: nextContext.number == 'many', frameOfReference: currentContext })\n if (!fromMentions) {\n context.verbatim = `There is no property ${await g({...nextContext, paraphrase: true})} of ${await g({...currentContext, paraphrase: true})}`\n return\n }\n }\n if (fromMentions) {\n currentContext = fromMentions\n currentValue = fromMentions // TODO not sure what is right here so just do something and fix when actually needed SOP\n } else {\n currentContext = await api.getProperty(currentValue, nextValue, g)\n currentValue = currentContext.value\n }\n }\n return currentContext\n }\n\n // const toDo = [ ...context.objects ]\n debug.breakAt('drone#call90')\n const [toDos, _] = flatten(['list'], context.objects)\n const results = []\n for (const toDo of toDos) {\n const one = await processOne(toDo)\n results.push(one)\n }\n\n if (results.length > 0) {\n context.focusable = ['object[0]']\n // context.evalue = currentContext\n context.evalue = asList(results, true)\n context.object = undefined;\n }\n }"
|
|
890
890
|
}
|
|
891
891
|
]
|
|
892
892
|
}
|
|
@@ -2462,7 +2462,7 @@
|
|
|
2462
2462
|
"unknown"
|
|
2463
2463
|
]
|
|
2464
2464
|
],
|
|
2465
|
-
"bridge": "{ ...next(operator), object: after[0], objects: after }"
|
|
2465
|
+
"bridge": "{ \n ...next(operator), \n ofWord: operator,\n object: after[0], \n objects: after \n }"
|
|
2466
2466
|
},
|
|
2467
2467
|
{
|
|
2468
2468
|
"id": "propertyOf",
|
|
@@ -2481,7 +2481,7 @@
|
|
|
2481
2481
|
"unknown"
|
|
2482
2482
|
]
|
|
2483
2483
|
],
|
|
2484
|
-
"bridge": "{ ...before[0], propertyOf: true, object: operator.object, objects: append(default(before[0].objects, before), operator.objects) }"
|
|
2484
|
+
"bridge": "{ \n ...before[0], \n propertyOf: true, \n interpolate: [ { property: 'property' }, { word: 'of' }, { property: 'object' } ],\n property: before[0],\n object: operator.object, \n objects: append(default(before[0].objects, before), operator.objects) \n }"
|
|
2485
2485
|
},
|
|
2486
2486
|
{
|
|
2487
2487
|
"id": "whose",
|
|
@@ -2975,83 +2975,83 @@
|
|
|
2975
2975
|
"generators": [
|
|
2976
2976
|
{
|
|
2977
2977
|
"notes": "expression with constraints",
|
|
2978
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2978
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:312"
|
|
2979
2979
|
},
|
|
2980
2980
|
{
|
|
2981
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2981
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:334"
|
|
2982
2982
|
},
|
|
2983
2983
|
{
|
|
2984
2984
|
"notes": "add possession ending",
|
|
2985
2985
|
"priority": -1,
|
|
2986
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2986
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:341"
|
|
2987
2987
|
},
|
|
2988
2988
|
{
|
|
2989
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2989
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:355"
|
|
2990
2990
|
},
|
|
2991
2991
|
{
|
|
2992
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2992
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:360"
|
|
2993
2993
|
},
|
|
2994
2994
|
{
|
|
2995
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2995
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:365"
|
|
2996
2996
|
},
|
|
2997
2997
|
{
|
|
2998
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
2998
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:370"
|
|
2999
2999
|
},
|
|
3000
3000
|
{
|
|
3001
3001
|
"notes": "negative do questions",
|
|
3002
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3002
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:376"
|
|
3003
3003
|
},
|
|
3004
3004
|
{
|
|
3005
3005
|
"notes": "do questions",
|
|
3006
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3006
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:385"
|
|
3007
3007
|
},
|
|
3008
3008
|
{
|
|
3009
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3009
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:399"
|
|
3010
3010
|
},
|
|
3011
3011
|
{
|
|
3012
3012
|
"notes": "the property of object",
|
|
3013
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3013
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:407"
|
|
3014
3014
|
},
|
|
3015
3015
|
{
|
|
3016
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3016
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:431"
|
|
3017
3017
|
},
|
|
3018
3018
|
{
|
|
3019
3019
|
"notes": "object's property",
|
|
3020
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3020
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:440"
|
|
3021
3021
|
}
|
|
3022
3022
|
],
|
|
3023
3023
|
"semantics": [
|
|
3024
3024
|
{
|
|
3025
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3025
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:471"
|
|
3026
3026
|
},
|
|
3027
3027
|
{
|
|
3028
3028
|
"notes": "wants is xfx between wanter and wantee",
|
|
3029
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3029
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:482",
|
|
3030
3030
|
"priority": -1
|
|
3031
3031
|
},
|
|
3032
3032
|
{
|
|
3033
3033
|
"notes": "marking something as readonly",
|
|
3034
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3034
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:496"
|
|
3035
3035
|
},
|
|
3036
3036
|
{
|
|
3037
3037
|
"notes": "crew members. evaluate a concepts to get instances",
|
|
3038
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3038
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:520"
|
|
3039
3039
|
},
|
|
3040
3040
|
{
|
|
3041
3041
|
"notes": "greg has eyes",
|
|
3042
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3042
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:548"
|
|
3043
3043
|
},
|
|
3044
3044
|
{
|
|
3045
3045
|
"notes": "greg has eyes?",
|
|
3046
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3046
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:561"
|
|
3047
3047
|
},
|
|
3048
3048
|
{
|
|
3049
3049
|
"notes": "set the property of an object",
|
|
3050
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3050
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:587"
|
|
3051
3051
|
},
|
|
3052
3052
|
{
|
|
3053
3053
|
"notes": "get/evaluate a property",
|
|
3054
|
-
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:
|
|
3054
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/properties.js:648"
|
|
3055
3055
|
}
|
|
3056
3056
|
]
|
|
3057
3057
|
}
|
|
@@ -3643,11 +3643,113 @@
|
|
|
3643
3643
|
"pullFromContext": true,
|
|
3644
3644
|
"concept": true,
|
|
3645
3645
|
"wantsValue": true,
|
|
3646
|
-
"
|
|
3647
|
-
"modifiers": [
|
|
3646
|
+
"checks": [
|
|
3648
3647
|
"determiner"
|
|
3649
3648
|
],
|
|
3649
|
+
"determiner": {
|
|
3650
|
+
"modifiers": [],
|
|
3651
|
+
"text": "the",
|
|
3652
|
+
"marker": "the",
|
|
3653
|
+
"word": "the",
|
|
3654
|
+
"range": {
|
|
3655
|
+
"start": 0,
|
|
3656
|
+
"end": 2
|
|
3657
|
+
},
|
|
3658
|
+
"level": 0
|
|
3659
|
+
},
|
|
3660
|
+
"theable": {
|
|
3661
|
+
"value": "property1",
|
|
3662
|
+
"unknown": true,
|
|
3663
|
+
"text": "property1",
|
|
3664
|
+
"marker": "unknown",
|
|
3665
|
+
"word": "property1",
|
|
3666
|
+
"range": {
|
|
3667
|
+
"start": 4,
|
|
3668
|
+
"end": 12
|
|
3669
|
+
},
|
|
3670
|
+
"dead": true,
|
|
3671
|
+
"types": [
|
|
3672
|
+
"unknown"
|
|
3673
|
+
],
|
|
3674
|
+
"level": 0
|
|
3675
|
+
},
|
|
3676
|
+
"flatten_ignore": [
|
|
3677
|
+
"theable"
|
|
3678
|
+
],
|
|
3679
|
+
"interpolate": [
|
|
3680
|
+
{
|
|
3681
|
+
"property": "property"
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
"word": "of"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"property": "object"
|
|
3688
|
+
}
|
|
3689
|
+
],
|
|
3650
3690
|
"propertyOf": true,
|
|
3691
|
+
"property": {
|
|
3692
|
+
"value": "property1",
|
|
3693
|
+
"unknown": true,
|
|
3694
|
+
"text": "the property1",
|
|
3695
|
+
"marker": "property",
|
|
3696
|
+
"word": "property1",
|
|
3697
|
+
"range": {
|
|
3698
|
+
"start": 0,
|
|
3699
|
+
"end": 12
|
|
3700
|
+
},
|
|
3701
|
+
"dead": true,
|
|
3702
|
+
"types": [
|
|
3703
|
+
"property",
|
|
3704
|
+
"unknown"
|
|
3705
|
+
],
|
|
3706
|
+
"focusableForPhrase": true,
|
|
3707
|
+
"pullFromContext": true,
|
|
3708
|
+
"concept": true,
|
|
3709
|
+
"wantsValue": true,
|
|
3710
|
+
"checks": [
|
|
3711
|
+
"determiner"
|
|
3712
|
+
],
|
|
3713
|
+
"determiner": {
|
|
3714
|
+
"modifiers": [],
|
|
3715
|
+
"text": "the",
|
|
3716
|
+
"marker": "the",
|
|
3717
|
+
"word": "the",
|
|
3718
|
+
"range": {
|
|
3719
|
+
"start": 0,
|
|
3720
|
+
"end": 2
|
|
3721
|
+
},
|
|
3722
|
+
"level": 0
|
|
3723
|
+
},
|
|
3724
|
+
"theable": {
|
|
3725
|
+
"value": "property1",
|
|
3726
|
+
"unknown": true,
|
|
3727
|
+
"text": "property1",
|
|
3728
|
+
"marker": "unknown",
|
|
3729
|
+
"word": "property1",
|
|
3730
|
+
"range": {
|
|
3731
|
+
"start": 4,
|
|
3732
|
+
"end": 12
|
|
3733
|
+
},
|
|
3734
|
+
"dead": true,
|
|
3735
|
+
"types": [
|
|
3736
|
+
"unknown"
|
|
3737
|
+
],
|
|
3738
|
+
"level": 0
|
|
3739
|
+
},
|
|
3740
|
+
"flatten_ignore": [
|
|
3741
|
+
"theable"
|
|
3742
|
+
],
|
|
3743
|
+
"interpolate": [
|
|
3744
|
+
{
|
|
3745
|
+
"property": "determiner"
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"property": "theable"
|
|
3749
|
+
}
|
|
3750
|
+
],
|
|
3751
|
+
"level": 0
|
|
3752
|
+
},
|
|
3651
3753
|
"object": {
|
|
3652
3754
|
"value": "object1",
|
|
3653
3755
|
"unknown": true,
|
|
@@ -3684,10 +3786,47 @@
|
|
|
3684
3786
|
"pullFromContext": true,
|
|
3685
3787
|
"concept": true,
|
|
3686
3788
|
"wantsValue": true,
|
|
3687
|
-
"
|
|
3688
|
-
"modifiers": [
|
|
3789
|
+
"checks": [
|
|
3689
3790
|
"determiner"
|
|
3690
3791
|
],
|
|
3792
|
+
"determiner": {
|
|
3793
|
+
"modifiers": [],
|
|
3794
|
+
"text": "the",
|
|
3795
|
+
"marker": "the",
|
|
3796
|
+
"word": "the",
|
|
3797
|
+
"range": {
|
|
3798
|
+
"start": 0,
|
|
3799
|
+
"end": 2
|
|
3800
|
+
},
|
|
3801
|
+
"level": 0
|
|
3802
|
+
},
|
|
3803
|
+
"theable": {
|
|
3804
|
+
"value": "property1",
|
|
3805
|
+
"unknown": true,
|
|
3806
|
+
"text": "property1",
|
|
3807
|
+
"marker": "unknown",
|
|
3808
|
+
"word": "property1",
|
|
3809
|
+
"range": {
|
|
3810
|
+
"start": 4,
|
|
3811
|
+
"end": 12
|
|
3812
|
+
},
|
|
3813
|
+
"dead": true,
|
|
3814
|
+
"types": [
|
|
3815
|
+
"unknown"
|
|
3816
|
+
],
|
|
3817
|
+
"level": 0
|
|
3818
|
+
},
|
|
3819
|
+
"flatten_ignore": [
|
|
3820
|
+
"theable"
|
|
3821
|
+
],
|
|
3822
|
+
"interpolate": [
|
|
3823
|
+
{
|
|
3824
|
+
"property": "determiner"
|
|
3825
|
+
},
|
|
3826
|
+
{
|
|
3827
|
+
"property": "theable"
|
|
3828
|
+
}
|
|
3829
|
+
],
|
|
3691
3830
|
"level": 0
|
|
3692
3831
|
},
|
|
3693
3832
|
{
|
|
@@ -3736,7 +3875,7 @@
|
|
|
3736
3875
|
""
|
|
3737
3876
|
],
|
|
3738
3877
|
"paraphrases": [
|
|
3739
|
-
"the property1 is value1"
|
|
3878
|
+
"the property1 of object1 is value1"
|
|
3740
3879
|
],
|
|
3741
3880
|
"paraphrasesParenthesized": [],
|
|
3742
3881
|
"generatedParenthesized": [],
|
|
@@ -4792,11 +4931,112 @@
|
|
|
4792
4931
|
"pullFromContext": true,
|
|
4793
4932
|
"concept": true,
|
|
4794
4933
|
"wantsValue": true,
|
|
4795
|
-
"
|
|
4796
|
-
"modifiers": [
|
|
4934
|
+
"checks": [
|
|
4797
4935
|
"determiner"
|
|
4798
4936
|
],
|
|
4937
|
+
"determiner": {
|
|
4938
|
+
"modifiers": [],
|
|
4939
|
+
"text": "the",
|
|
4940
|
+
"marker": "the",
|
|
4941
|
+
"word": "the",
|
|
4942
|
+
"range": {
|
|
4943
|
+
"start": 0,
|
|
4944
|
+
"end": 2
|
|
4945
|
+
},
|
|
4946
|
+
"level": 0
|
|
4947
|
+
},
|
|
4948
|
+
"theable": {
|
|
4949
|
+
"value": "property",
|
|
4950
|
+
"number": "one",
|
|
4951
|
+
"text": "property",
|
|
4952
|
+
"marker": "property",
|
|
4953
|
+
"word": "property",
|
|
4954
|
+
"range": {
|
|
4955
|
+
"start": 4,
|
|
4956
|
+
"end": 11
|
|
4957
|
+
},
|
|
4958
|
+
"dead": true,
|
|
4959
|
+
"types": [
|
|
4960
|
+
"property"
|
|
4961
|
+
],
|
|
4962
|
+
"level": 0
|
|
4963
|
+
},
|
|
4964
|
+
"flatten_ignore": [
|
|
4965
|
+
"theable"
|
|
4966
|
+
],
|
|
4967
|
+
"interpolate": [
|
|
4968
|
+
{
|
|
4969
|
+
"property": "property"
|
|
4970
|
+
},
|
|
4971
|
+
{
|
|
4972
|
+
"word": "of"
|
|
4973
|
+
},
|
|
4974
|
+
{
|
|
4975
|
+
"property": "object"
|
|
4976
|
+
}
|
|
4977
|
+
],
|
|
4799
4978
|
"propertyOf": true,
|
|
4979
|
+
"property": {
|
|
4980
|
+
"value": "property",
|
|
4981
|
+
"number": "one",
|
|
4982
|
+
"text": "the property",
|
|
4983
|
+
"marker": "property",
|
|
4984
|
+
"word": "property",
|
|
4985
|
+
"range": {
|
|
4986
|
+
"start": 0,
|
|
4987
|
+
"end": 11
|
|
4988
|
+
},
|
|
4989
|
+
"dead": true,
|
|
4990
|
+
"types": [
|
|
4991
|
+
"property"
|
|
4992
|
+
],
|
|
4993
|
+
"focusableForPhrase": true,
|
|
4994
|
+
"pullFromContext": true,
|
|
4995
|
+
"concept": true,
|
|
4996
|
+
"wantsValue": true,
|
|
4997
|
+
"checks": [
|
|
4998
|
+
"determiner"
|
|
4999
|
+
],
|
|
5000
|
+
"determiner": {
|
|
5001
|
+
"modifiers": [],
|
|
5002
|
+
"text": "the",
|
|
5003
|
+
"marker": "the",
|
|
5004
|
+
"word": "the",
|
|
5005
|
+
"range": {
|
|
5006
|
+
"start": 0,
|
|
5007
|
+
"end": 2
|
|
5008
|
+
},
|
|
5009
|
+
"level": 0
|
|
5010
|
+
},
|
|
5011
|
+
"theable": {
|
|
5012
|
+
"value": "property",
|
|
5013
|
+
"number": "one",
|
|
5014
|
+
"text": "property",
|
|
5015
|
+
"marker": "property",
|
|
5016
|
+
"word": "property",
|
|
5017
|
+
"range": {
|
|
5018
|
+
"start": 4,
|
|
5019
|
+
"end": 11
|
|
5020
|
+
},
|
|
5021
|
+
"dead": true,
|
|
5022
|
+
"types": [
|
|
5023
|
+
"property"
|
|
5024
|
+
],
|
|
5025
|
+
"level": 0
|
|
5026
|
+
},
|
|
5027
|
+
"flatten_ignore": [
|
|
5028
|
+
"theable"
|
|
5029
|
+
],
|
|
5030
|
+
"interpolate": [
|
|
5031
|
+
{
|
|
5032
|
+
"property": "determiner"
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
"property": "theable"
|
|
5036
|
+
}
|
|
5037
|
+
],
|
|
5038
|
+
"level": 0
|
|
5039
|
+
},
|
|
4800
5040
|
"object": {
|
|
4801
5041
|
"marker": "object",
|
|
4802
5042
|
"value": "object",
|
|
@@ -4832,10 +5072,47 @@
|
|
|
4832
5072
|
"pullFromContext": true,
|
|
4833
5073
|
"concept": true,
|
|
4834
5074
|
"wantsValue": true,
|
|
4835
|
-
"
|
|
4836
|
-
"modifiers": [
|
|
5075
|
+
"checks": [
|
|
4837
5076
|
"determiner"
|
|
4838
5077
|
],
|
|
5078
|
+
"determiner": {
|
|
5079
|
+
"modifiers": [],
|
|
5080
|
+
"text": "the",
|
|
5081
|
+
"marker": "the",
|
|
5082
|
+
"word": "the",
|
|
5083
|
+
"range": {
|
|
5084
|
+
"start": 0,
|
|
5085
|
+
"end": 2
|
|
5086
|
+
},
|
|
5087
|
+
"level": 0
|
|
5088
|
+
},
|
|
5089
|
+
"theable": {
|
|
5090
|
+
"value": "property",
|
|
5091
|
+
"number": "one",
|
|
5092
|
+
"text": "property",
|
|
5093
|
+
"marker": "property",
|
|
5094
|
+
"word": "property",
|
|
5095
|
+
"range": {
|
|
5096
|
+
"start": 4,
|
|
5097
|
+
"end": 11
|
|
5098
|
+
},
|
|
5099
|
+
"dead": true,
|
|
5100
|
+
"types": [
|
|
5101
|
+
"property"
|
|
5102
|
+
],
|
|
5103
|
+
"level": 0
|
|
5104
|
+
},
|
|
5105
|
+
"flatten_ignore": [
|
|
5106
|
+
"theable"
|
|
5107
|
+
],
|
|
5108
|
+
"interpolate": [
|
|
5109
|
+
{
|
|
5110
|
+
"property": "determiner"
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
"property": "theable"
|
|
5114
|
+
}
|
|
5115
|
+
],
|
|
4839
5116
|
"level": 0
|
|
4840
5117
|
},
|
|
4841
5118
|
{
|
|
@@ -4884,7 +5161,7 @@
|
|
|
4884
5161
|
""
|
|
4885
5162
|
],
|
|
4886
5163
|
"paraphrases": [
|
|
4887
|
-
"the property is value"
|
|
5164
|
+
"the property of object is value"
|
|
4888
5165
|
],
|
|
4889
5166
|
"paraphrasesParenthesized": [],
|
|
4890
5167
|
"generatedParenthesized": [],
|
package/common/properties.js
CHANGED
|
@@ -233,13 +233,25 @@ const config = {
|
|
|
233
233
|
level: 0,
|
|
234
234
|
isA: ['preposition'],
|
|
235
235
|
localHierarchy: [['property', 'queryable'], ['property', 'theAble'], ['property', 'unknown'], ['object', 'unknown']],
|
|
236
|
-
bridge:
|
|
236
|
+
bridge: `{
|
|
237
|
+
...next(operator),
|
|
238
|
+
ofWord: operator,
|
|
239
|
+
object: after[0],
|
|
240
|
+
objects: after
|
|
241
|
+
}`
|
|
237
242
|
},
|
|
238
243
|
{
|
|
239
244
|
id: "propertyOf",
|
|
240
245
|
level: 1,
|
|
241
246
|
localHierarchy: [['property', 'queryable'], ['property', 'theAble'], ['property', 'unknown']],
|
|
242
|
-
bridge:
|
|
247
|
+
bridge: `{
|
|
248
|
+
...before[0],
|
|
249
|
+
propertyOf: true,
|
|
250
|
+
interpolate: [ { property: 'property' }, { word: 'of' }, { property: 'object' } ],
|
|
251
|
+
property: before[0],
|
|
252
|
+
object: operator.object,
|
|
253
|
+
objects: append(default(before[0].objects, before), operator.objects)
|
|
254
|
+
}`
|
|
243
255
|
},
|
|
244
256
|
{
|
|
245
257
|
id: "whose",
|
|
@@ -606,7 +618,6 @@ const config = {
|
|
|
606
618
|
} catch (e) {
|
|
607
619
|
log(`Error processing set property of an object: ${e}`)
|
|
608
620
|
const config = km('properties')
|
|
609
|
-
const fragment = await fragments("the property1 of object1 is value1")
|
|
610
621
|
const value = await api.getProperty(objectId, propertyId)
|
|
611
622
|
if (value.value == context.same.value) {
|
|
612
623
|
context.evalue = [
|
|
@@ -615,30 +626,16 @@ const config = {
|
|
|
615
626
|
context.isResponse = true
|
|
616
627
|
context.sameWasProcessed = true
|
|
617
628
|
} else {
|
|
618
|
-
const mappings =
|
|
619
|
-
{
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
where: where(),
|
|
626
|
-
match: ({context}) => context.value == 'object1',
|
|
627
|
-
apply: ({context}) => {
|
|
628
|
-
Object.assign(context, { word: objectContext.word, value: objectContext.value, paraphrase: true })
|
|
629
|
-
},
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
where: where(),
|
|
633
|
-
match: ({context}) => context.value == 'value1',
|
|
634
|
-
apply: ({context}) => Object.assign(context, value),
|
|
635
|
-
},
|
|
636
|
-
]
|
|
629
|
+
const mappings = {
|
|
630
|
+
property1: { word: propertyContext.word, value: propertyContext.value, paraphrase: true },
|
|
631
|
+
object1: { word: objectContext.word, value: objectContext.value, paraphrase: true },
|
|
632
|
+
value1: value,
|
|
633
|
+
}
|
|
637
634
|
// run the query 'the property of object' then copy that here and template it
|
|
638
635
|
context.evalue = [
|
|
639
636
|
{ marker: 'yesno', value: false, paraphrase: true },
|
|
640
637
|
]
|
|
641
|
-
context.evalue = context.evalue.concat(await
|
|
638
|
+
context.evalue = context.evalue.concat(await fragments("the property1 of object1 is value1", mappings))
|
|
642
639
|
context.evalue.forEach( (r) => r.paraphrase = true )
|
|
643
640
|
context.isResponse = true
|
|
644
641
|
context.sameWasProcessed = true
|
|
@@ -713,8 +710,8 @@ const config = {
|
|
|
713
710
|
return currentContext
|
|
714
711
|
}
|
|
715
712
|
|
|
716
|
-
debug.breakAt('combined#call27')
|
|
717
713
|
// const toDo = [ ...context.objects ]
|
|
714
|
+
debug.breakAt('drone#call90')
|
|
718
715
|
const [toDos, _] = flatten(['list'], context.objects)
|
|
719
716
|
const results = []
|
|
720
717
|
for (const toDo of toDos) {
|