UNPKG

tpmkms

Version:

Reusable libraries for Entodicton, a natural language to json converter

1,724 lines 717 kB
[ { "associations": [ [ [ "convertToUnits", 0 ], [ "integer", 0 ], [ "is", 0 ], [ "what", 0 ] ], [ [ "convertToUnits", 0 ], [ "is", 0 ] ], [ [ "convertToUnits", 0 ], [ "is", 0 ], [ "what", 0 ] ] ], "config": { }, "contexts": [ { "context_id": 2, "context_index": 1, "dead": true, "level": 2, "marker": "is", "number": "one", "one": { "dead": true, "level": 0, "marker": "unknown", "number": "one", "range": { "end": 1, "start": 0 }, "text": "c1", "types": [ "unknown" ], "unknown": true, "value": "c1", "word": "c1" }, "range": { "end": 16, "start": 0 }, "text": "c1 is a dimension", "topLevel": true, "touchedBy": [ "dimension#call2" ], "two": { "concept": true, "dead": true, "determiner": { "default": true, "level": 0, "marker": "a", "range": { "end": 6, "start": 6 }, "text": "a", "word": "a" }, "instance": true, "level": 0, "marker": "dimension", "modifiers": [ "determiner" ], "number": "one", "pullFromContext": false, "range": { "end": 16, "start": 6 }, "text": "a dimension", "types": [ "dimension" ], "value": "dimension", "wantsValue": true, "word": "dimension" }, "word": "is" }, { "context_id": 5, "context_index": 1, "dead": true, "level": 2, "marker": "is", "number": "many", "one": { "default": true, "isList": true, "level": 1, "listable": true, "marker": "list", "number": "many", "range": { "end": 8, "start": 0 }, "text": "a1 and b1", "types": [ "list", "unknown" ], "value": [ { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 1, "start": 0 }, "text": "a1", "types": [ "unknown" ], "unknown": true, "value": "a1", "word": "a1" }, { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 8, "start": 7 }, "text": "b1", "types": [ "unknown" ], "unknown": true, "value": "b1", "word": "b1" } ], "word": "and" }, "range": { "end": 24, "start": 0 }, "text": "a1 and b1 are units of d1", "topLevel": true, "touchedBy": [ "dimension#call17" ], "two": { "concept": true, "dead": true, "level": 0, "marker": "unit", "number": "many", "object": { "dead": true, "level": 0, "marker": "object", "range": { "end": 24, "start": 23 }, "text": "d1", "types": [ "object" ], "unknown": true, "value": "d1", "word": "d1" }, "objects": [ { "dead": true, "level": 0, "marker": "unit", "number": "many", "range": { "end": 18, "start": 14 }, "text": "units", "types": [ "unit" ], "value": "unit", "word": "units" }, { "dead": true, "level": 0, "marker": "object", "range": { "end": 24, "start": 23 }, "text": "d1", "types": [ "object" ], "unknown": true, "value": "d1", "word": "d1" } ], "propertyOf": true, "range": { "end": 24, "start": 14 }, "text": "units of d1", "types": [ "unit" ], "value": "unit", "word": "units" }, "word": "are" }, { "context": { "context_id": 8, "context_index": 1, "dead": true, "level": 2, "marker": "is", "number": "many", "one": { "dead": true, "default": true, "determined": true, "level": 1, "marker": "what", "number": "many", "query": [ "what" ], "range": { "end": 3, "start": 0 }, "text": "what", "types": [ "what" ], "value": "what", "word": "what" }, "query": [ "what" ], "range": { "end": 19, "start": 0 }, "text": "what are 10 a1 in b1", "topLevel": true, "two": { "dead": true, "default": true, "from": { "amount": { "dead": true, "instance": true, "level": 1, "marker": "integer", "range": { "end": 10, "start": 9 }, "text": "10", "types": [ "integer" ], "value": 10, "word": "10" }, "dead": true, "level": 1, "marker": "quantity", "range": { "end": 13, "start": 9 }, "text": "10 a1", "types": [ "quantity" ], "unit": { "dead": true, "dimension": "d1", "level": 0, "marker": "a1", "number": "one", "range": { "end": 13, "start": 12 }, "text": "a1", "types": [ "a1" ], "value": "a1", "word": "a1" } }, "level": 1, "marker": "convertToUnits", "range": { "end": 19, "start": 9 }, "text": "10 a1 in b1", "to": { "dead": true, "dimension": "d1", "level": 0, "marker": "b1", "number": "one", "range": { "end": 19, "start": 18 }, "text": "b1", "types": [ "b1" ], "value": "b1", "word": "b1" }, "types": [ "convertToUnits" ], "word": "in" }, "word": "are" }, "error": [ "ERROR while applying (dialogues/#3) KM 'dialogues' ordinal: 3 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:527\"\n to\n {\n \"query\": [\n \"what\"\n ],\n \"number\": \"many\",\n \"text\": \"what are 10 a1 in b1\",\n \"marker\": \"is\",\n \"word\": \"are\",\n \"range\": {\n \"start\": 0,\n \"end\": 19\n },\n \"one\": {\n \"number\": \"many\",\n \"marker\": \"what\",\n \"value\": \"what\",\n \"default\": true,\n \"text\": \"what\",\n \"word\": \"what\",\n \"range\": {\n \"start\": 0,\n \"end\": 3\n },\n \"dead\": true,\n \"query\": [\n \"what\"\n ],\n \"determined\": true,\n \"types\": [\n \"what\"\n ],\n \"level\": 1\n },\n \"two\": {\n \"marker\": \"convertToUnits\",\n \"default\": true,\n \"word\": \"in\",\n \"text\": \"10 a1 in b1\",\n \"range\": {\n \"start\": 9,\n \"end\": 19\n },\n \"dead\": true,\n \"from\": {\n \"marker\": \"quantity\",\n \"dead\": true,\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\n \"dimension\": \"d1\",\n \"marker\": \"a1\",\n \"word\": \"a1\",\n \"range\": {\n \"start\": 12,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"a1\"\n ],\n \"level\": 0\n },\n \"amount\": {\n \"instance\": true,\n \"value\": 10,\n \"text\": \"10\",\n \"marker\": \"integer\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"integer\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"types\": [\n \"quantity\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\n \"dimension\": \"d1\",\n \"marker\": \"b1\",\n \"word\": \"b1\",\n \"range\": {\n \"start\": 18,\n \"end\": 19\n },\n \"dead\": true,\n \"types\": [\n \"b1\"\n ],\n \"level\": 0\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"context_index\": 1,\n \"topLevel\": true,\n \"context_id\": 8\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:527'. Error is ERROR while applying (dimension/#1) KM 'dimension' ordinal: 1 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:257\"\n to\n {\n \"isModule\": true,\n \"isProcess\": true,\n \"marker\": \"convertToUnits\",\n \"default\": true,\n \"word\": \"in\",\n \"text\": \"10 a1 in b1\",\n \"range\": {\n \"start\": 9,\n \"end\": 19\n },\n \"dead\": true,\n \"from\": {\n \"marker\": \"quantity\",\n \"dead\": true,\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\n \"dimension\": \"d1\",\n \"marker\": \"a1\",\n \"word\": \"a1\",\n \"range\": {\n \"start\": 12,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"a1\"\n ],\n \"level\": 0\n },\n \"amount\": {\n \"instance\": true,\n \"value\": 10,\n \"text\": \"10\",\n \"marker\": \"integer\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"integer\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"types\": [\n \"quantity\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\n \"dimension\": \"d1\",\n \"marker\": \"b1\",\n \"word\": \"b1\",\n \"range\": {\n \"start\": 18,\n \"end\": 19\n },\n \"dead\": true,\n \"types\": [\n \"b1\"\n ],\n \"level\": 0\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:257'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"dimension\":\"d1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":0},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"dimension\":\"d1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":0}},\"pullFromContext\":false,\"fromSTM\":true,\"namespaced\":{\"stm\":{\"id\":1}}} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"dimension\":\"d1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":0},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"dimension\":\"d1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":0}},\"pullFromContext\":false,\"fromSTM\":true,\"namespaced\":{\"stm\":{\"id\":1}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/configHelpers.js:147:11)\n at convert (/home/dev/code/theprogrammablemind/kms/common/dimension.js:112:11)\n at API.convertToUnits (/home/dev/code/theprogrammablemind/kms/common/dimension.js:122:35)\n at evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:268:44)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:496:30)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:106:16)\n at Semantics.applyToContextHelper (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:212:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:161:14)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:345:14). Semantic is Semantic((args) => bridge.id === args.context.marker && !!args.context.evaluate === evaluate && match(args), async ({context, api, toArray, resolveEvaluate}) => {\n const from = context.from;\n const tos = toArray(context.to);\n resolveEvaluate(context, await api.convertToUnits(context, from, tos))\n })\nsee the evaluator property. The error has a retryCall property that will recall the function that failed.'. Semantic is Semantic(({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && context.query, async ({context, s, log, km, objects, e}) => {\n const one = context.one;\n const two = context.two;\n let concept, value;\n if (one.query) {\n concept = one;\n value = two;\n } else {\n concept = two;\n value = one;\n }\n // km('dialogues').api.remember(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n const instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.remember({ context: value })\n }\n if (instance.verbatim) {\n context.evalue = { verbatim: instance.verbatim }\n context.isResponse = true\n return\n }\n // instance.focusable = ['one', 'two']\n // concept = JSON.parse(JSON.stringify(value)) \n concept = _.cloneDeep(value) \n concept.isQuery = undefined\n // greg101\n // instance.focusableForPhrase = true\n instance.focus = true\n if (concept.hierarchy) {\n concept.focusableForPhrase = true\n }\n // concept.focus = true\n\n const many = isMany(concept) || isMany(instance)\n const evalue = {\n \"default\": true,\n \"marker\": \"is\",\n \"one\": concept,\n \"two\": instance,\n \"focusable\": ['two', 'one'],\n \"word\": many ? \"are\" : \"is\",\n \"number\": many ? \"many\" : undefined,\n }\n context.evalue = evalue\n context.isResponse = true\n }). The error has a retryCall property that will recall the function that failed.'" ], "evalue": "That is not known because there is no conversion between a1 and b1", "isResponse": true, "marker": "error", "reason": { "evalue": { "from": { "dead": true, "dimension": "d1", "level": 0, "marker": "a1", "number": "one", "range": { "end": 13, "start": 12 }, "text": "a1", "types": [ "a1" ], "value": "a1", "word": "a1" }, "marker": "noconversion", "to": { "dead": true, "dimension": "d1", "level": 0, "marker": "b1", "number": "one", "range": { "end": 19, "start": 18 }, "text": "b1", "types": [ "b1" ], "value": "b1", "word": "b1" } }, "focusableForPhrase": true, "fromSTM": true, "marker": "reason", "namespaced": { "stm": { "id": 1 } }, "pullFromContext": false }, "text": "[object Object]", "touchedBy": [ "dimension#call40" ] } ], "generatedParenthesized": [ "", "", "(That is not known because there is no conversion between a1 and b1)" ], "metadata": { "opChoices": [ { "counter": 1, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "is", 0 ], [ "unknown", 0 ] ] }, { "counter": 2, "op": [ "a", 0 ], "ops": [ [ "a", 0 ], [ "is", 0 ] ] }, { "counter": 3, "op": [ "is", 0 ], "ops": [ [ "is", 0 ] ] }, { "counter": 4, "op": [ "is", 1 ], "ops": [ [ "is", 1 ] ] }, { "counter": 7, "op": [ "unknown", 0 ], "ops": [ [ "is", 0 ], [ "list", 0 ], [ "propertyOf", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ] ] }, { "counter": 8, "op": [ "unknown", 0 ], "ops": [ [ "is", 0 ], [ "list", 0 ], [ "propertyOf", 0 ], [ "unknown", 0 ], [ "unknown", 0 ] ] }, { "counter": 9, "op": [ "unknown", 0 ], "ops": [ [ "is", 0 ], [ "list", 0 ], [ "propertyOf", 0 ], [ "unknown", 0 ] ] }, { "counter": 10, "op": [ "list", 0 ], "ops": [ [ "is", 0 ], [ "list", 0 ], [ "propertyOf", 0 ] ] }, { "counter": 11, "op": [ "propertyOf", 0 ], "ops": [ [ "is", 0 ], [ "propertyOf", 0 ] ] }, { "counter": 12, "op": [ "propertyOf", 1 ], "ops": [ [ "is", 0 ], [ "propertyOf", 1 ] ] }, { "counter": 13, "op": [ "is", 0 ], "ops": [ [ "is", 0 ] ] }, { "counter": 14, "op": [ "is", 1 ], "ops": [ [ "is", 1 ] ] }, { "counter": 17, "op": [ "integer", 0 ], "ops": [ [ "a1", 0 ], [ "amountOfCoordinate", 0 ], [ "b1", 0 ], [ "convertToUnits", 0 ], [ "integer", 0 ], [ "is", 0 ], [ "what", 0 ] ] }, { "counter": 18, "op": [ "a1", 0 ], "ops": [ [ "a1", 0 ], [ "amountOfCoordinate", 0 ], [ "b1", 0 ], [ "convertToUnits", 0 ], [ "is", 0 ], [ "what", 0 ] ] }, { "counter": 19, "op": [ "amountOfCoordinate", 0 ], "ops": [ [ "amountOfCoordinate", 0 ], [ "b1", 0 ], [ "convertToUnits", 0 ], [ "is", 0 ], [ "what", 0 ] ] }, { "counter": 20, "op": [ "b1", 0 ], "ops": [ [ "b1", 0 ], [ "convertToUnits", 0 ], [ "is", 0 ], [ "what", 0 ] ] }, { "counter": 21, "op": [ "what", 0 ], "ops": [ [ "convertToUnits", 0 ], [ "is", 0 ], [ "what", 0 ] ] }, { "counter": 22, "op": [ "convertToUnits", 0 ], "ops": [ [ "convertToUnits", 0 ], [ "is", 0 ] ] }, { "counter": 23, "op": [ "is", 0 ], "ops": [ [ "is", 0 ] ] }, { "counter": 24, "op": [ "is", 1 ], "ops": [ [ "is", 1 ] ] } ] }, "objects": { "associations": [ ], "nameToUUID": { "articles": "articles2", "asking": "asking2", "comparable": "comparable2", "concept": "concept2", "conjunction": "conjunction2", "countable": "countable2", "dialogues": "dialogues2", "dimension": "dimension1", "evaluate": "evaluate2", "formulas": "formulas2", "gdefaults": "gdefaults2", "hierarchy": "hierarchy2", "math": "math2", "meta": "meta2", "negation": "negation2", "numbers": "numbers2", "pos": "pos2", "properties": "properties2", "punctuation": "punctuation2", "sdefaults": "sdefaults2", "stm": "stm2", "testing": "testing2", "tokenize": "tokenize2", "words": "words2" }, "namespaced": { "articles2": { "km": "articles2" }, "asking2": { "km": "asking2" }, "comparable2": { "km": "comparable2" }, "concept2": { "defaultTypesForHierarchy": { }, "km": "concept2", "valueToWords": [ ] }, "conjunction2": { "km": "conjunction2" }, "countable2": { "km": "countable2" }, "dialogues2": { "idSuffix": "", "km": "dialogues2", "mentioned": [ ], "variables": { } }, "dimension1": { "km": "dimension1" }, "evaluate2": { "km": "evaluate2" }, "formulas2": { "formulas": { }, "km": "formulas2" }, "gdefaults2": { "km": "gdefaults2" }, "hierarchy2": { "km": "hierarchy2" }, "math2": { "km": "math2" }, "meta2": { "km": "meta2" }, "negation2": { "km": "negation2" }, "numbers2": { "km": "numbers2" }, "pos2": { "km": "pos2" }, "properties2": { "children": { "adjective": [ "stm_previous", "stm_current", "stm_before" ], "article": [ "a", "the", "each", "every" ], "canBeDoQuestion": [ "have" ], "canBeQuestion": [ "have", "is" ], "concept": [ "condition", "formula", "amount", "dimension", "measurement_unit" ], "condition": [ "superlative" ], "deletable": [ "memorable" ], "dimension": [ "c1" ], "hierarchyAble": [ "unknown" ], "ifAble": [ "orAble" ], "listable": [ "object", "queryable" ], "measurement_system": [ "metric_system", "imperial_system" ], "object": [ "what", "whose" ], "preposition": [ "between", "propertyOf", "to" ], "pronoun": [ "it", "this" ], "punctuation": [ "questionMark" ], "queryable": [ "xfx", "hierarchyAble", "readonly", "property", "object", "concept", "doubleQuote", "theAble", "it", "what", "whatAble", "negatable", "this", "reason", "distributable", "thisitthat" ], "sort_ordering": [ "ascending", "descending" ], "superlative": [ "highest", "lowest", "maximum", "minimum" ], "theAble": [ "property", "object", "concept", "listable", "reason", "memorable", "noun" ], "thisAble": [ "noun" ], "thisitthat": [ "it", "this", "that" ], "toAble": [ "it" ], "unit": [ "imperial_unit", "metric_unit" ], "unit_d1": [ "a1", "b1" ], "verb": [ "modifies", "is", "isQuery", "delete", "remember" ] }, "concepts": [ "properties", "unknown", "hierarchyAble", "what", "object", "xfx", "queryable", "between", "preposition", "readonly", "have", "canBeDoQuestion", "canBeQuestion", "property", "theAble", "listable", "propertyOf", "whose", "concept", "modifies", "verb", "doubleQuote", "it", "pronoun", "this", "questionMark", "punctuation", "a", "article", "the", "whatAble", "negatable", "is", "toAble", "to", "isQuery", "reason", "orAble", "ifAble", "delete", "memorable", "deletable", "remember", "stm_previous", "adjective", "stm_current", "stm_before", "each", "every", "distributable", "noun", "thisitthat", "that", "thisAble", "ascending", "sort_ordering", "descending", "condition", "superlative", "highest", "lowest", "maximum", "minimum", "formula", "amount", "dimension", "measurement_unit", "metric_system", "measurement_system", "imperial_system", "imperial_unit", "unit", "metric_unit", "c1", "a1", "unit_d1", "b1" ], "km": "properties2", "parents": { "a": [ "article" ], "a1": [ "unit_d1" ], "amount": [ "concept" ], "ascending": [ "sort_ordering" ], "b1": [ "unit_d1" ], "between": [ "preposition" ], "c1": [ "dimension" ], "concept": [ "theAble", "queryable" ], "condition": [ "concept" ], "delete": [ "verb" ], "descending": [ "sort_ordering" ], "dimension": [ "concept" ], "distributable": [ "queryable" ], "doubleQuote": [ "queryable" ], "each": [ "article" ], "every": [ "article" ], "formula": [ "concept" ], "have": [ "canBeDoQuestion", "canBeQuestion" ], "hierarchyAble": [ "queryable" ], "highest": [ "superlative" ], "imperial_system": [ "measurement_system" ], "imperial_unit": [ "unit" ], "is": [ "canBeQuestion", "verb" ], "isQuery": [ "verb" ], "it": [ "pronoun", "queryable", "toAble", "thisitthat" ], "listable": [ "theAble" ], "lowest": [ "superlative" ], "maximum": [ "superlative" ], "measurement_unit": [ "concept" ], "memorable": [ "theAble", "deletable" ], "metric_system": [ "measurement_system" ], "metric_unit": [ "unit" ], "minimum": [ "superlative" ], "modifies": [ "verb" ], "negatable": [ "queryable" ], "noun": [ "theAble", "thisAble" ], "object": [ "queryable", "theAble", "listable" ], "orAble": [ "ifAble" ], "property": [ "queryable", "theAble" ], "propertyOf": [ "preposition" ], "queryable": [ "listable" ], "questionMark": [ "punctuation" ], "readonly": [ "queryable" ], "reason": [ "theAble", "queryable" ], "remember": [ "verb" ], "stm_before": [ "adjective" ], "stm_current": [ "adjective" ], "stm_previous": [ "adjective" ], "superlative": [ "condition" ], "that": [ "thisitthat" ], "the": [ "article" ], "theAble": [ "queryable" ], "this": [ "pronoun", "queryable", "thisitthat" ], "thisitthat": [ "queryable" ], "to": [ "preposition" ], "unknown": [ "hierarchyAble" ], "what": [ "object", "queryable" ], "whatAble": [ "queryable" ], "whose": [ "object" ], "xfx": [ "queryable" ] }, "properties": { "handlers": { }, "initHandlers": [ ], "root": { "a": { }, "a1": { }, "adjective": { }, "amount": { }, "article": { }, "ascending": { }, "b1": { }, "between": { }, "c1": { }, "canBeDoQuestion": { }, "canBeQuestion": { }, "concept": { }, "condition": { }, "deletable": { }, "delete": { }, "descending": { }, "dimension": { }, "distributable": { }, "doubleQuote": { }, "each": { }, "every": { }, "formula": { }, "have": { }, "hierarchyAble": { }, "highest": { }, "ifAble": { }, "imperial_system": { }, "imperial_unit": { }, "is": { }, "isQuery": { }, "it": { }, "listable": { }, "lowest": { }, "maximum": { }, "measurement_system": { }, "measurement_unit": { }, "memorable": { }, "metric_system": { }, "metric_unit": { }, "minimum": { }, "modifies": { }, "negatable": { }, "noun": { }, "object": { }, "orAble": { }, "preposition": { }, "pronoun": { }, "property": { }, "propertyOf": { }, "punctuation": { }, "queryable": { }, "questionMark": { }, "readonly": { }, "reason": { }, "remember": { }, "sort_ordering": { }, "stm_before": { }, "stm_current": { }, "stm_previous": { }, "superlative": { }, "that": { }, "the": { }, "theAble": { }, "this": { }, "thisAble": { }, "thisitthat": { }, "to": { }, "toAble": { }, "unit": { }, "unit_d1": { }, "unknown": { }, "verb": { }, "what": { }, "whatAble": { }, "whose": { }, "xfx": { } } }, "property": { }, "relations": [ ], "valueToWords": { } }, "punctuation2": { "km": "punctuation2" }, "sdefaults2": { "km": "sdefaults2" }, "stm2": { "km": "stm2", "mentioned": [ { "evalue": { "from": { "dead": true, "dimension": "d1", "level": 0, "marker": "a1", "number": "one", "range": { "end": 13, "start": 12 }, "text": "a1", "types": [ "a1" ], "value": "a1", "word": "a1" }, "marker": "noconversion", "to": { "dead": true, "dimension": "d1", "level": 0, "marker": "b1", "number": "one", "range": { "end": 19, "start": 18 }, "text": "b1", "types": [ "b1" ], "value": "b1", "word": "b1" } }, "focusableForPhrase": true, "fromSTM": true, "marker": "reason", "namespaced": { "stm": { "id": 1 } }, "pullFromContext": false } ], "variables": { } }, "testing2": { "km": "testing2" }, "tokenize2": { "km": "tokenize2" }, "words2": { "km": "words2", "words": [ ] } }, "processed": [ { "context": { "context": { "context_id": 8, "context_index": 1, "dead": true, "level": 2, "marker": "is", "number": "many", "one": { "dead": true, "default": true, "determined": true, "level": 1, "marker": "what", "number": "many", "query": [ "what" ], "range": { "end": 3, "start": 0 }, "text": "what", "types": [ "what" ], "value": "what", "word": "what" }, "query": [ "what" ], "range": { "end": 19, "start": 0 }, "text": "what are 10 a1 in b1", "topLevel": true, "two": { "dead": true, "default": true, "from": { "amount": { "dead": true, "instance": true, "level": 1, "marker": "integer", "range": { "end": 10, "start": 9 }, "text": "10", "types": [ "integer" ], "value": 10, "word": "10" }, "dead": true, "level": 1, "marker": "quantity", "range": { "end": 13, "start": 9 }, "text": "10 a1", "types": [ "quantity" ], "unit": { "dead": true, "dimension": "d1", "level": 0, "marker": "a1", "number": "one", "range": { "end": 13, "start": 12 }, "text": "a1", "types": [ "a1" ], "value": "a1", "word": "a1" } }, "level": 1, "marker": "convertToUnits", "range": { "end": 19, "start": 9 }, "text": "10 a1 in b1", "to": { "dead": true, "dimension": "d1", "level": 0, "marker": "b1", "number": "one", "range": { "end": 19, "start": 18 }, "text": "b1", "types": [ "b1" ], "value": "b1", "word": "b1" }, "types": [ "convertToUnits" ], "word": "in" }, "word": "are" }, "error": [ "ERROR while applying (dialogues/#3) KM 'dialogues' ordinal: 3 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:527\"\n to\n {\n \"query\": [\n \"what\"\n ],\n \"number\": \"many\",\n \"text\": \"what are 10 a1 in b1\",\n \"marker\": \"is\",\n \"word\": \"are\",\n \"range\": {\n \"start\": 0,\n \"end\": 19\n },\n \"one\": {\n \"number\": \"many\",\n \"marker\": \"what\",\n \"value\": \"what\",\n \"default\": true,\n \"text\": \"what\",\n \"word\": \"what\",\n \"range\": {\n \"start\": 0,\n \"end\": 3\n },\n \"dead\": true,\n \"query\": [\n \"what\"\n ],\n \"determined\": true,\n \"types\": [\n \"what\"\n ],\n \"level\": 1\n },\n \"two\": {\n \"marker\": \"convertToUnits\",\n \"default\": true,\n \"word\": \"in\",\n \"text\": \"10 a1 in b1\",\n \"range\": {\n \"start\": 9,\n \"end\": 19\n },\n \"dead\": true,\n \"from\": {\n \"marker\": \"quantity\",\n \"dead\": true,\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\n \"dimension\": \"d1\",\n \"marker\": \"a1\",\n \"word\": \"a1\",\n \"range\": {\n \"start\": 12,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"a1\"\n ],\n \"level\": 0\n },\n \"amount\": {\n \"instance\": true,\n \"value\": 10,\n \"text\": \"10\",\n \"marker\": \"integer\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"integer\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"types\": [\n \"quantity\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\n \"dimension\": \"d1\",\n \"marker\": \"b1\",\n \"word\": \"b1\",\n \"range\": {\n \"start\": 18,\n \"end\": 19\n },\n \"dead\": true,\n \"types\": [\n \"b1\"\n ],\n \"level\": 0\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"context_index\": 1,\n \"topLevel\": true,\n \"context_id\": 8\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:527'. Error is ERROR while applying (dimension/#1) KM 'dimension' ordinal: 1 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:257\"\n to\n {\n \"isModule\": true,\n \"isProcess\": true,\n \"marker\": \"convertToUnits\",\n \"default\": true,\n \"word\": \"in\",\n \"text\": \"10 a1 in b1\",\n \"range\": {\n \"start\": 9,\n \"end\": 19\n },\n \"dead\": true,\n \"from\": {\n \"marker\": \"quantity\",\n \"dead\": true,\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\n \"dimension\": \"d1\",\n \"marker\": \"a1\",\n \"word\": \"a1\",\n \"range\": {\n \"start\": 12,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"a1\"\n ],\n \"level\": 0\n },\n \"amount\": {\n \"instance\": true,\n \"value\": 10,\n \"text\": \"10\",\n \"marker\": \"integer\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"integer\"\n ],\n