UNPKG

tpmkms

Version:

Reusable libraries for Entodicton, a natural language to json converter

2,233 lines (2,232 loc) 974 kB
[ { "associations": [ [ [ "a", 0 ], [ "is", 0 ], [ "unknown", 0 ] ], [ [ "by", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "the", 0 ], [ "unknown", 0 ] ], [ [ "by", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "what", 0 ] ], [ [ "by", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "unknown", 0 ] ], [ [ "is", 0 ], [ "owned", 0 ], [ "unknown", 0 ] ], [ [ "is", 0 ], [ "ownee", 0 ] ], [ [ "is", 0 ], [ "unknown", 0 ] ], [ [ "owns", 0 ], [ "unknown", 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": 3, "start": 0 }, "text": "cleo", "types": [ "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" }, "range": { "end": 12, "start": 0 }, "text": "cleo is a cat", "topLevel": true, "touchedBy": [ "people#call2" ], "two": { "concept": true, "dead": true, "determiner": { "default": true, "level": 0, "marker": "a", "range": { "end": 8, "start": 8 }, "text": "a", "word": "a" }, "instance": true, "level": 0, "marker": "unknown", "modifiers": [ "determiner" ], "number": "one", "pullFromContext": false, "range": { "end": 12, "start": 8 }, "text": "a cat", "types": [ "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "word": "is" }, { "context_id": 4, "context_index": 3, "dead": true, "do": { "left": "owner", "right": "ownee" }, "focusable": [ "owner", "ownee" ], "interpolate": [ { "property": "owner" }, { "number": "owner", "property": "operator" }, { "property": "ownee" } ], "isVerb": true, "level": 2, "marker": "owns", "number": "one", "operator": { "evaluateWord": true, "imperative": false, "isVerb": true, "level": 0, "marker": "owns", "number": "one", "text": "owns", "value": "owns", "word": "owns" }, "ownee": { "dead": true, "level": 0, "marker": "unknown", "text": "cleo", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "text": "wendy", "types": [ "owner", "unknown" ], "unknown": true, "value": "wendy", "word": "wendy" }, "text": "wendy owns cleo", "topLevel": true, "touchedBy": [ "people#call17" ], "truthValue": true, "unflatten": [ "owner", "ownee" ], "value": "owns", "word": "owns" }, { "context_id": 6, "context_index": 5, "dead": true, "evalue": { "default": true, "focusable": [ "two", "one" ], "marker": "is", "one": { "concept": true, "constraints": [ { "constraint": { "constrained": true, "dead": true, "default": true, "level": 1, "marker": "owned", "ownee": { "concept": true, "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "unknown", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 43, "start": 37 }, "text": "the cat", "types": [ "unknown", "ownee" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 58, "start": 54 }, "text": "wendy", "types": [ "by_after_isEder_owner" ], "unknown": true, "value": "wendy", "word": "wendy" }, "query": true, "range": { "end": 49, "start": 45 }, "text": "owned", "word": "owned" }, "paraphrase": { "marker": "owns", "ownee": { "marker": "ownee", "types": [ "ownee" ], "word": "ownee" }, "owner": { "marker": "owner", "types": [ "owner" ], "word": "owner" } }, "properties": [ "ownee", "owner" ], "property": "ownee" } ], "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "two": { "concept": true, "dead": true, "determiner": "the", "evalue": { "marker": "list", "value": [ { "dead": true, "level": 0, "marker": "unknown", "text": "cleo", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" } ] }, "focus": true, "focusableForPhrase": true, "instance": true, "isModule": true, "isProcess": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "touchedBy": [ "people#call28", "people#call27" ], "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "word": "is" }, "isResponse": true, "level": 2, "marker": "is", "number": "one", "one": { "dead": true, "determined": true, "level": 1, "marker": "what", "modifiers": [ ], "number": "one", "query": [ "what" ], "range": { "end": 32, "start": 30 }, "text": "who", "types": [ "what" ], "word": "who" }, "query": [ "what" ], "range": { "end": 58, "start": 30 }, "text": "who is the cat owned by wendy", "topLevel": true, "touchedBy": [ "people#call27" ], "two": { "concept": true, "constraints": [ { "constraint": { "constrained": true, "dead": true, "default": true, "level": 1, "marker": "owned", "ownee": { "concept": true, "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "unknown", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 43, "start": 37 }, "text": "the cat", "types": [ "unknown", "ownee" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 58, "start": 54 }, "text": "wendy", "types": [ "by_after_isEder_owner" ], "unknown": true, "value": "wendy", "word": "wendy" }, "range": { "end": 49, "start": 45 }, "text": "owned", "word": "owned" }, "paraphrase": { "marker": "owns", "ownee": { "marker": "ownee", "types": [ "ownee" ], "word": "ownee" }, "owner": { "marker": "owner", "types": [ "owner" ], "word": "owner" } }, "properties": [ "ownee", "owner" ], "property": "ownee" } ], "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "word": "is" } ], "generatedParenthesized": [ "", "", "(((((the (cat)) owned by (wendy))) is (((cleo)))))" ], "metadata": { "opChoices": [ { "counter": 1, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 2, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 3, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 4, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 5, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 6, "op": [ "unknown", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "unknown", 0 ], [ "what", 0 ] ] }, { "counter": 7, "op": [ "what", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ], [ "what", 0 ] ] }, { "counter": 8, "op": [ "a", 0 ], "ops": [ [ "a", 0 ], [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ] ] }, { "counter": 9, "op": [ "the", 0 ], "ops": [ [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ], [ "the", 0 ] ] }, { "counter": 10, "op": [ "owns", 0 ], "ops": [ [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 0 ] ] }, { "counter": 11, "op": [ "owns", 1 ], "ops": [ [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ], [ "owns", 1 ] ] }, { "counter": 12, "op": [ "by", 0 ], "ops": [ [ "by", 0 ], [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ] ] }, { "counter": 13, "op": [ "owned", 0 ], "ops": [ [ "is", 0 ], [ "is", 0 ], [ "owned", 0 ] ] }, { "counter": 14, "op": [ "is", 0 ], "ops": [ [ "is", 0 ], [ "is", 0 ] ] }, { "counter": 15, "op": [ "is", 1 ], "ops": [ [ "is", 0 ], [ "is", 1 ] ] }, { "counter": 16, "op": [ "is", 0 ], "ops": [ [ "is", 0 ] ] }, { "counter": 17, "op": [ "is", 1 ], "ops": [ [ "is", 1 ] ] } ] }, "objects": { "associations": [ ], "nameToUUID": { "articles": "articles2", "asking": "asking2", "concept": "concept2", "conjunction": "conjunction2", "dialogues": "dialogues2", "evaluate": "evaluate2", "gdefaults": "gdefaults2", "hierarchy": "hierarchy2", "meta": "meta2", "negation": "negation2", "people": "people1", "pos": "pos2", "properties": "properties2", "punctuation": "punctuation2", "sdefaults": "sdefaults2", "stm": "stm2", "tokenize": "tokenize2", "words": "words2" }, "namespaced": { "articles2": { "km": "articles2" }, "asking2": { "km": "asking2" }, "concept2": { "defaultTypesForHierarchy": { }, "km": "concept2", "valueToWords": [ ] }, "conjunction2": { "km": "conjunction2" }, "dialogues2": { "idSuffix": "", "km": "dialogues2", "mentioned": [ ], "variables": { } }, "evaluate2": { "km": "evaluate2" }, "gdefaults2": { "km": "gdefaults2" }, "hierarchy2": { "km": "hierarchy2" }, "meta2": { "km": "meta2" }, "negation2": { "km": "negation2" }, "people1": { "km": "people1" }, "pos2": { "km": "pos2" }, "properties2": { "children": { "adjective": [ "stm_previous", "stm_current", "stm_before" ], "article": [ "a", "the", "each", "every" ], "canBeDoQuestion": [ "have" ], "canBeQuestion": [ "have", "is" ], "cat": [ "cleo" ], "hierarchyAble": [ "unknown" ], "ifAble": [ "orAble" ], "listable": [ "object", "queryable" ], "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" ], "theAble": [ "property", "object", "concept", "listable", "reason", "memorable", "noun" ], "thisitthat": [ "it", "this", "that" ], "toAble": [ "it" ], "verb": [ "modifies", "is", "isQuery", "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", "memorable", "remember", "stm_previous", "adjective", "stm_current", "stm_before", "orAble", "ifAble", "each", "every", "distributable", "noun", "thisitthat", "that", "cleo", "cat" ], "km": "properties2", "parents": { "a": [ "article" ], "between": [ "preposition" ], "cleo": [ "cat" ], "concept": [ "theAble", "queryable" ], "distributable": [ "queryable" ], "doubleQuote": [ "queryable" ], "each": [ "article" ], "every": [ "article" ], "have": [ "canBeDoQuestion", "canBeQuestion" ], "hierarchyAble": [ "queryable" ], "is": [ "canBeQuestion", "verb" ], "isQuery": [ "verb" ], "it": [ "pronoun", "queryable", "toAble", "thisitthat" ], "listable": [ "theAble" ], "memorable": [ "theAble" ], "modifies": [ "verb" ], "negatable": [ "queryable" ], "noun": [ "theAble" ], "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" ], "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": { }, "adjective": { }, "article": { }, "between": { }, "canBeDoQuestion": { }, "canBeQuestion": { }, "cat": { }, "cleo": { }, "concept": { }, "distributable": { }, "doubleQuote": { }, "each": { }, "every": { }, "have": { }, "hierarchyAble": { }, "ifAble": { }, "is": { }, "isQuery": { }, "it": { }, "listable": { }, "memorable": { }, "modifies": { }, "negatable": { }, "noun": { }, "object": { }, "orAble": { }, "preposition": { }, "pronoun": { }, "property": { }, "propertyOf": { }, "punctuation": { }, "queryable": { }, "questionMark": { }, "readonly": { }, "reason": { }, "remember": { }, "stm_before": { }, "stm_current": { }, "stm_previous": { }, "that": { }, "the": { }, "theAble": { }, "this": { }, "thisitthat": { }, "to": { }, "toAble": { }, "unknown": { }, "verb": { }, "what": { }, "whatAble": { }, "whose": { }, "xfx": { } } }, "property": { }, "relations": [ { "context_id": 4, "context_index": 3, "dead": true, "do": { "left": "owner", "right": "ownee" }, "focusable": [ "owner", "ownee" ], "interpolate": [ { "property": "owner" }, { "number": "owner", "property": "operator" }, { "property": "ownee" } ], "isVerb": true, "level": 2, "marker": "owns", "number": "one", "operator": { "evaluateWord": true, "imperative": false, "isVerb": true, "level": 0, "marker": "owns", "number": "one", "text": "owns", "value": "owns", "word": "owns" }, "ownee": { "dead": true, "level": 0, "marker": "unknown", "text": "cleo", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "text": "wendy", "types": [ "owner", "unknown" ], "unknown": true, "value": "wendy", "word": "wendy" }, "text": "wendy owns cleo", "topLevel": true, "touchedBy": [ "people#call17" ], "truthValue": true, "unflatten": [ "owner", "ownee" ], "value": "owns", "word": "owns" } ], "valueToWords": { } }, "punctuation2": { "km": "punctuation2" }, "sdefaults2": { "km": "sdefaults2" }, "stm2": { "km": "stm2", "mentioned": [ { "fromSTM": true, "isVariable": true, "marker": "surname", "pullFromContext": false, "stm": { "id": 1 }, "value": "last_name" } ], "variables": { } }, "tokenize2": { "km": "tokenize2" }, "words2": { "km": "words2", "words": [ ] } }, "processed": [ { "context": { "context_id": 6, "context_index": 5, "dead": true, "evalue": { "default": true, "focusable": [ "two", "one" ], "marker": "is", "one": { "concept": true, "constraints": [ { "constraint": { "constrained": true, "dead": true, "default": true, "level": 1, "marker": "owned", "ownee": { "concept": true, "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "unknown", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 43, "start": 37 }, "text": "the cat", "types": [ "unknown", "ownee" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 58, "start": 54 }, "text": "wendy", "types": [ "by_after_isEder_owner" ], "unknown": true, "value": "wendy", "word": "wendy" }, "query": true, "range": { "end": 49, "start": 45 }, "text": "owned", "word": "owned" }, "paraphrase": { "marker": "owns", "ownee": { "marker": "ownee", "types": [ "ownee" ], "word": "ownee" }, "owner": { "marker": "owner", "types": [ "owner" ], "word": "owner" } }, "properties": [ "ownee", "owner" ], "property": "ownee" } ], "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "two": { "concept": true, "dead": true, "determiner": "the", "evalue": { "marker": "list", "value": [ { "dead": true, "level": 0, "marker": "unknown", "text": "cleo", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" } ] }, "focus": true, "focusableForPhrase": true, "instance": true, "isModule": true, "isProcess": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "touchedBy": [ "people#call28", "people#call27" ], "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "word": "is" }, "isResponse": true, "level": 2, "marker": "is", "number": "one", "one": { "dead": true, "determined": true, "level": 1, "marker": "what", "modifiers": [ ], "number": "one", "query": [ "what" ], "range": { "end": 32, "start": 30 }, "text": "who", "types": [ "what" ], "word": "who" }, "query": [ "what" ], "range": { "end": 58, "start": 30 }, "text": "who is the cat owned by wendy", "topLevel": true, "touchedBy": [ "people#call27" ], "two": { "concept": true, "constraints": [ { "constraint": { "constrained": true, "dead": true, "default": true, "level": 1, "marker": "owned", "ownee": { "concept": true, "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "unknown", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 43, "start": 37 }, "text": "the cat", "types": [ "unknown", "ownee" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "range": { "end": 58, "start": 54 }, "text": "wendy", "types": [ "by_after_isEder_owner" ], "unknown": true, "value": "wendy", "word": "wendy" }, "range": { "end": 49, "start": 45 }, "text": "owned", "word": "owned" }, "paraphrase": { "marker": "owns", "ownee": { "marker": "ownee", "types": [ "ownee" ], "word": "ownee" }, "owner": { "marker": "owner", "types": [ "owner" ], "word": "owner" } }, "properties": [ "ownee", "owner" ], "property": "ownee" } ], "dead": true, "determiner": "the", "focusableForPhrase": true, "level": 0, "marker": "ownee", "modifiers": [ "determiner" ], "pullFromContext": true, "range": { "end": 58, "start": 37 }, "text": "the cat owned by wendy", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cat", "wantsValue": true, "word": "cat" }, "word": "is" }, "generatedParenthesized": [ ], "paraphrases": [ ], "paraphrasesParenthesized": [ ], "responses": [ "", "", "the cat owned by wendy is cleo" ] }, { "context": { "context_id": 4, "context_index": 3, "dead": true, "do": { "left": "owner", "right": "ownee" }, "focusable": [ "owner", "ownee" ], "interpolate": [ { "property": "owner" }, { "number": "owner", "property": "operator" }, { "property": "ownee" } ], "isVerb": true, "level": 2, "marker": "owns", "number": "one", "operator": { "evaluateWord": true, "imperative": false, "isVerb": true, "level": 0, "marker": "owns", "number": "one", "text": "owns", "value": "owns", "word": "owns" }, "ownee": { "dead": true, "level": 0, "marker": "unknown", "text": "cleo", "types": [ "ownee", "unknown" ], "unknown": true, "value": "cleo", "word": "cleo" }, "owner": { "dead": true, "level": 0, "marker": "unknown", "text": "wendy", "types": [ "owner", "unknown" ], "unknown": true, "value": "wendy", "word": "wendy" }, "text": "wendy owns cleo", "topLevel": true, "touchedBy": [ "people#call17" ], "truthValue": true, "unflatten": [ "owner", "ownee" ], "value": "owns", "word": "owns" }, "generatedParenthesized": [ ], "paraphrases": [ ], "paraphrasesParenthesized": [ ], "responses": [ "", "", "the cat owned by wendy is cleo" ] }, { "context": { "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": 3, "start": 0 }, "text": "cleo", "types": [ "unknown" ], "unknown": true,