tpmkms
Version:
Reusable libraries for Entodicton, a natural language to json converter
1,696 lines (1,695 loc) • 246 kB
JSON
[
{
"associations": [
[
[
"celcius",
0
],
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"integer",
0
],
[
"is",
0
],
[
"what",
0
]
],
[
[
"celcius",
0
],
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
],
[
"what",
0
]
],
[
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
]
],
[
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
],
[
"what",
0
]
]
],
"config": {
},
"contexts": [
{
"context_id": 2,
"context_index": 1,
"dead": true,
"evalue": {
"default": true,
"focusable": [
"two",
"one"
],
"marker": "is",
"one": {
"dead": true,
"default": true,
"from": {
"amount": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 9,
"start": 8
},
"text": "10",
"types": [
"integer"
],
"value": 10,
"word": "10"
},
"dead": true,
"level": 1,
"marker": "quantity",
"range": {
"end": 17,
"start": 8
},
"text": "10 celcius",
"types": [
"quantity"
],
"unit": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 17,
"start": 11
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
}
},
"level": 1,
"marker": "convertToUnits",
"range": {
"end": 31,
"start": 8
},
"text": "10 celcius in fahrenheit",
"to": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 31,
"start": 22
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"types": [
"convertToUnits"
],
"word": "in"
},
"two": {
"dead": true,
"default": true,
"evalue": {
"amount": {
"evalue": {
"dead": true,
"evalue": 50,
"instance": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isModule": true,
"isProcess": true,
"isResponse": true,
"level": 1,
"marker": "plusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "plusOperator",
"range": {
"end": 25,
"start": 25
},
"text": "+",
"value": "plusOperator",
"word": "+"
},
"range": {
"end": 28,
"start": 13
},
"text": "celcius*9/5 + 32",
"touchedBy": [
"temperature#call4",
"temperature#call3"
],
"types": [
"number",
"plusExpression"
],
"value": null,
"word": "+",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "divideByExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "divideByOperator",
"range": {
"end": 22,
"start": 22
},
"text": "/",
"value": "divideByOperator",
"word": "/"
},
"range": {
"end": 23,
"start": 13
},
"text": "celcius*9/5",
"types": [
"divideByExpression",
"number"
],
"value": null,
"word": "/",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "timesExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "timesOperator",
"range": {
"end": 20,
"start": 20
},
"text": "*",
"value": "timesOperator",
"word": "*"
},
"range": {
"end": 21,
"start": 13
},
"text": "celcius*9",
"types": [
"number",
"timesExpression"
],
"value": null,
"word": "*",
"x": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 19,
"start": 13
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 21,
"start": 21
},
"text": "9",
"types": [
"integer"
],
"value": 9,
"word": "9"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 23,
"start": 23
},
"text": "5",
"types": [
"integer"
],
"value": 5,
"word": "5"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 28,
"start": 27
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
}
},
"level": 1,
"marker": "quantity",
"paraphrase": true,
"unit": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "many",
"range": {
"end": 31,
"start": 22
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
}
},
"focus": true,
"from": {
"amount": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 9,
"start": 8
},
"text": "10",
"types": [
"integer"
],
"value": 10,
"word": "10"
},
"dead": true,
"level": 1,
"marker": "quantity",
"range": {
"end": 17,
"start": 8
},
"text": "10 celcius",
"types": [
"quantity"
],
"unit": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 17,
"start": 11
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
}
},
"instance": true,
"isModule": true,
"isProcess": true,
"level": 1,
"marker": "convertToUnits",
"range": {
"end": 31,
"start": 8
},
"text": "10 celcius in fahrenheit",
"to": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 31,
"start": 22
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"touchedBy": [
"temperature#call3",
"temperature#call2"
],
"types": [
"convertToUnits"
],
"word": "in"
},
"word": "is"
},
"isResponse": true,
"level": 2,
"marker": "is",
"number": "one",
"one": {
"dead": true,
"default": true,
"determined": true,
"level": 1,
"marker": "what",
"number": "one",
"query": [
"what"
],
"range": {
"end": 3,
"start": 0
},
"text": "what",
"types": [
"what"
],
"value": "what",
"word": "what"
},
"query": [
"what"
],
"range": {
"end": 31,
"start": 0
},
"text": "what is 10 celcius in fahrenheit",
"topLevel": true,
"touchedBy": [
"temperature#call2"
],
"two": {
"dead": true,
"default": true,
"from": {
"amount": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 9,
"start": 8
},
"text": "10",
"types": [
"integer"
],
"value": 10,
"word": "10"
},
"dead": true,
"level": 1,
"marker": "quantity",
"range": {
"end": 17,
"start": 8
},
"text": "10 celcius",
"types": [
"quantity"
],
"unit": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 17,
"start": 11
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
}
},
"level": 1,
"marker": "convertToUnits",
"range": {
"end": 31,
"start": 8
},
"text": "10 celcius in fahrenheit",
"to": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 31,
"start": 22
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"types": [
"convertToUnits"
],
"word": "in"
},
"word": "is"
}
],
"generatedParenthesized": [
"(((((10) (celcius)) in (fahrenheit)) is ((((50)) (fahrenheit)))))"
],
"metadata": {
"opChoices": [
{
"counter": 1,
"op": [
"integer",
0
],
"ops": [
[
"amountOfCoordinate",
0
],
[
"celcius",
0
],
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"integer",
0
],
[
"is",
0
],
[
"what",
0
]
]
},
{
"counter": 2,
"op": [
"celcius",
0
],
"ops": [
[
"amountOfCoordinate",
0
],
[
"celcius",
0
],
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
],
[
"what",
0
]
]
},
{
"counter": 3,
"op": [
"amountOfCoordinate",
0
],
"ops": [
[
"amountOfCoordinate",
0
],
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
],
[
"what",
0
]
]
},
{
"counter": 4,
"op": [
"fahrenheit",
0
],
"ops": [
[
"convertToUnits",
0
],
[
"fahrenheit",
0
],
[
"is",
0
],
[
"what",
0
]
]
},
{
"counter": 5,
"op": [
"what",
0
],
"ops": [
[
"convertToUnits",
0
],
[
"is",
0
],
[
"what",
0
]
]
},
{
"counter": 6,
"op": [
"convertToUnits",
0
],
"ops": [
[
"convertToUnits",
0
],
[
"is",
0
]
]
},
{
"counter": 7,
"op": [
"is",
0
],
"ops": [
[
"is",
0
]
]
},
{
"counter": 8,
"op": [
"is",
1
],
"ops": [
[
"is",
1
]
]
}
]
},
"objects": {
"associations": [
],
"nameToUUID": {
"articles": "articles2",
"asking": "asking2",
"comparable": "comparable2",
"concept": "concept2",
"conjunction": "conjunction2",
"countable": "countable2",
"dialogues": "dialogues2",
"dimension": "dimension2",
"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",
"temperature": "temperature1",
"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": {
}
},
"dimension2": {
"km": "dimension2"
},
"evaluate2": {
"km": "evaluate2"
},
"formulas2": {
"formulas": {
"celcius": [
{
"equality": {
"context_id": null,
"context_index": 1,
"dead": true,
"left": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 6,
"start": 0
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
},
"level": 1,
"marker": "equals",
"range": {
"end": 35,
"start": 0
},
"right": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "plusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "plusOperator",
"range": {
"end": 32,
"start": 32
},
"text": "+",
"value": "plusOperator",
"word": "+"
},
"range": {
"end": 35,
"start": 10
},
"text": "(fahrenheit - 32)*5/8 + 32",
"types": [
"number",
"plusExpression"
],
"value": null,
"word": "+",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "divideByExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "divideByOperator",
"range": {
"end": 29,
"start": 29
},
"text": "/",
"value": "divideByOperator",
"word": "/"
},
"range": {
"end": 30,
"start": 10
},
"text": "(fahrenheit - 32)*5/8",
"types": [
"divideByExpression",
"number"
],
"value": null,
"word": "/",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "timesExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "timesOperator",
"range": {
"end": 27,
"start": 27
},
"text": "*",
"value": "timesOperator",
"word": "*"
},
"range": {
"end": 28,
"start": 10
},
"text": "(fahrenheit - 32)*5",
"types": [
"number",
"timesExpression"
],
"value": null,
"word": "*",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "minusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "minusOperator",
"range": {
"end": 22,
"start": 22
},
"text": "-",
"value": "minusOperator",
"word": "-"
},
"parenthesis": "(",
"range": {
"end": 26,
"start": 10
},
"text": "(fahrenheit - 32)",
"types": [
"minusExpression",
"number"
],
"value": null,
"word": "-",
"x": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 20,
"start": 11
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 25,
"start": 24
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 28,
"start": 28
},
"text": "5",
"types": [
"integer"
],
"value": 5,
"word": "5"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 30,
"start": 30
},
"text": "8",
"types": [
"integer"
],
"value": 8,
"word": "8"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 35,
"start": 34
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
},
"text": "celcius = (fahrenheit - 32)*5/8 + 32",
"topLevel": true,
"touchedBy": [
"temperature#call2",
"instance3#temperature#call2"
],
"value": "equals",
"word": "="
},
"formula": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "plusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "plusOperator",
"range": {
"end": 32,
"start": 32
},
"text": "+",
"value": "plusOperator",
"word": "+"
},
"range": {
"end": 35,
"start": 10
},
"text": "(fahrenheit - 32)*5/8 + 32",
"types": [
"number",
"plusExpression"
],
"value": null,
"word": "+",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "divideByExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "divideByOperator",
"range": {
"end": 29,
"start": 29
},
"text": "/",
"value": "divideByOperator",
"word": "/"
},
"range": {
"end": 30,
"start": 10
},
"text": "(fahrenheit - 32)*5/8",
"types": [
"divideByExpression",
"number"
],
"value": null,
"word": "/",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "timesExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "timesOperator",
"range": {
"end": 27,
"start": 27
},
"text": "*",
"value": "timesOperator",
"word": "*"
},
"range": {
"end": 28,
"start": 10
},
"text": "(fahrenheit - 32)*5",
"types": [
"number",
"timesExpression"
],
"value": null,
"word": "*",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "minusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "minusOperator",
"range": {
"end": 22,
"start": 22
},
"text": "-",
"value": "minusOperator",
"word": "-"
},
"parenthesis": "(",
"range": {
"end": 26,
"start": 10
},
"text": "(fahrenheit - 32)",
"types": [
"minusExpression",
"number"
],
"value": null,
"word": "-",
"x": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 20,
"start": 11
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 25,
"start": 24
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 28,
"start": 28
},
"text": "5",
"types": [
"integer"
],
"value": 5,
"word": "5"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 30,
"start": 30
},
"text": "8",
"types": [
"integer"
],
"value": 8,
"word": "8"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 35,
"start": 34
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
},
"name": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 6,
"start": 0
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
}
}
],
"fahrenheit": [
{
"equality": {
"context_id": null,
"context_index": 1,
"dead": true,
"left": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "fahrenheit",
"number": "one",
"range": {
"end": 9,
"start": 0
},
"text": "fahrenheit",
"types": [
"fahrenheit"
],
"value": "fahrenheit",
"word": "fahrenheit"
},
"level": 1,
"marker": "equals",
"range": {
"end": 28,
"start": 0
},
"right": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "plusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "plusOperator",
"range": {
"end": 25,
"start": 25
},
"text": "+",
"value": "plusOperator",
"word": "+"
},
"range": {
"end": 28,
"start": 13
},
"text": "celcius*9/5 + 32",
"types": [
"number",
"plusExpression"
],
"value": null,
"word": "+",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "divideByExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "divideByOperator",
"range": {
"end": 22,
"start": 22
},
"text": "/",
"value": "divideByOperator",
"word": "/"
},
"range": {
"end": 23,
"start": 13
},
"text": "celcius*9/5",
"types": [
"divideByExpression",
"number"
],
"value": null,
"word": "/",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "timesExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "timesOperator",
"range": {
"end": 20,
"start": 20
},
"text": "*",
"value": "timesOperator",
"word": "*"
},
"range": {
"end": 21,
"start": 13
},
"text": "celcius*9",
"types": [
"number",
"timesExpression"
],
"value": null,
"word": "*",
"x": {
"dead": true,
"dimension": "temperature",
"level": 0,
"marker": "celcius",
"number": "one",
"range": {
"end": 19,
"start": 13
},
"text": "celcius",
"types": [
"celcius"
],
"value": "celcius",
"word": "celcius"
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 21,
"start": 21
},
"text": "9",
"types": [
"integer"
],
"value": 9,
"word": "9"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 23,
"start": 23
},
"text": "5",
"types": [
"integer"
],
"value": 5,
"word": "5"
}
},
"y": {
"dead": true,
"instance": true,
"level": 1,
"marker": "integer",
"range": {
"end": 28,
"start": 27
},
"text": "32",
"types": [
"integer"
],
"value": 32,
"word": "32"
}
},
"text": "fahrenheit = celcius*9/5 + 32",
"topLevel": true,
"touchedBy": [
"temperature#call2",
"instance2#temperature#call2"
],
"value": "equals",
"word": "="
},
"formula": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,
"level": 1,
"marker": "plusExpression",
"number": "one",
"operator": {
"level": 0,
"marker": "plusOperator",
"range": {
"end": 25,
"start": 25
},
"text": "+",
"value": "plusOperator",
"word": "+"
},
"range": {
"end": 28,
"start": 13
},
"text": "celcius*9/5 + 32",
"types": [
"number",
"plusExpression"
],
"value": null,
"word": "+",
"x": {
"dead": true,
"evaluate": true,
"interpolate": [
{
"property": "x"
},
{
"property": "operator"
},
{
"property": "y"
}
],
"isResponse": true,