ekms 8.0.0-beta.0 → 8.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/common/animals.instance.json +103 -113
  2. package/common/characters.js +0 -1
  3. package/common/colors.instance.json +22304 -0
  4. package/common/colors.js +71 -0
  5. package/common/colors.test.json +4860 -0
  6. package/common/concept.js +2 -2
  7. package/common/crew.instance.json +4142 -3545
  8. package/common/crew.js +4 -2
  9. package/common/dialogues.js +34 -7
  10. package/common/dialogues.test.json +1053 -33
  11. package/common/dimension.instance.json +20 -30
  12. package/common/dimension.test.json +289 -312
  13. package/common/edible.instance.json +216 -156
  14. package/common/emotions.instance.json +64 -0
  15. package/common/fastfood.instance.json +1011 -386
  16. package/common/fastfood.js +1 -1
  17. package/common/fastfood.test.json +7941 -3647
  18. package/common/formulas.instance.json +4 -0
  19. package/common/formulas.test.json +1027 -955
  20. package/common/help.test.json +14 -10
  21. package/common/helpers/concept.js +29 -9
  22. package/common/helpers/dialogues.js +17 -1
  23. package/common/helpers/formulas.js +0 -14
  24. package/common/helpers/meta.js +0 -1
  25. package/common/helpers/properties.js +6 -13
  26. package/common/kirk.instance.json +4 -0
  27. package/common/length.instance.json +93 -63
  28. package/common/math.instance.json +26 -47
  29. package/common/meta.js +0 -2
  30. package/common/ordering.instance.json +76 -0
  31. package/common/people.instance.json +35 -60
  32. package/common/pipboy.instance.json +215 -229
  33. package/common/pokemon.instance.json +131 -82
  34. package/common/pressure.instance.json +38 -48
  35. package/common/properties.instance.json +4 -0
  36. package/common/properties.js +7 -7
  37. package/common/properties.test.json +17605 -4030
  38. package/common/punctuation.js +8 -0
  39. package/common/punctuation.test.json +233 -5
  40. package/common/reports.instance.json +12 -4
  41. package/common/reports.js +0 -2
  42. package/common/sizeable.js +7 -2
  43. package/common/spock.instance.json +4 -0
  44. package/common/stm.js +16 -5
  45. package/common/temperature.instance.json +45 -59
  46. package/common/testing.js +0 -1
  47. package/common/tokenize.js +2 -1
  48. package/common/tokenize.test.json +86 -1
  49. package/common/ui.instance.json +4 -0
  50. package/common/ui.js +0 -1
  51. package/common/weight.instance.json +62 -11
  52. package/common/weight.test.json +242 -238
  53. package/main.js +2 -0
  54. package/package.json +6 -2
@@ -244,6 +244,10 @@
244
244
  "divideByOperator",
245
245
  "mathematicalOperator"
246
246
  ],
247
+ [
248
+ "doubleQuote",
249
+ "queryable"
250
+ ],
247
251
  [
248
252
  "expression",
249
253
  "expression"
@@ -1200,6 +1204,10 @@
1200
1204
  "divideByOperator",
1201
1205
  "mathematicalOperator"
1202
1206
  ],
1207
+ [
1208
+ "doubleQuote",
1209
+ "queryable"
1210
+ ],
1203
1211
  [
1204
1212
  "expression",
1205
1213
  "expression"
@@ -1857,10 +1865,6 @@
1857
1865
  1
1858
1866
  ],
1859
1867
  "ops": [
1860
- [
1861
- "list",
1862
- 1
1863
- ],
1864
1868
  [
1865
1869
  "is",
1866
1870
  0
@@ -1884,35 +1888,6 @@
1884
1888
  ],
1885
1889
  "counter": 5
1886
1890
  },
1887
- {
1888
- "op": [
1889
- "list",
1890
- 1
1891
- ],
1892
- "ops": [
1893
- [
1894
- "is",
1895
- 0
1896
- ],
1897
- [
1898
- "unit",
1899
- 0
1900
- ],
1901
- [
1902
- "propertyOf",
1903
- 0
1904
- ],
1905
- [
1906
- "temperature",
1907
- 0
1908
- ],
1909
- [
1910
- "list",
1911
- 1
1912
- ]
1913
- ],
1914
- "counter": 6
1915
- },
1916
1891
  {
1917
1892
  "op": [
1918
1893
  "unit",
@@ -1936,7 +1911,7 @@
1936
1911
  0
1937
1912
  ]
1938
1913
  ],
1939
- "counter": 7
1914
+ "counter": 6
1940
1915
  },
1941
1916
  {
1942
1917
  "op": [
@@ -1957,7 +1932,7 @@
1957
1932
  0
1958
1933
  ]
1959
1934
  ],
1960
- "counter": 8
1935
+ "counter": 7
1961
1936
  },
1962
1937
  {
1963
1938
  "op": [
@@ -1974,7 +1949,7 @@
1974
1949
  0
1975
1950
  ]
1976
1951
  ],
1977
- "counter": 9
1952
+ "counter": 8
1978
1953
  },
1979
1954
  {
1980
1955
  "op": [
@@ -1991,7 +1966,7 @@
1991
1966
  1
1992
1967
  ]
1993
1968
  ],
1994
- "counter": 10
1969
+ "counter": 9
1995
1970
  },
1996
1971
  {
1997
1972
  "op": [
@@ -2004,7 +1979,7 @@
2004
1979
  0
2005
1980
  ]
2006
1981
  ],
2007
- "counter": 11
1982
+ "counter": 10
2008
1983
  },
2009
1984
  {
2010
1985
  "op": [
@@ -2017,7 +1992,7 @@
2017
1992
  1
2018
1993
  ]
2019
1994
  ],
2020
- "counter": 12
1995
+ "counter": 11
2021
1996
  }
2022
1997
  ]
2023
1998
  },
@@ -2035,7 +2010,19 @@
2035
2010
  "one": {
2036
2011
  "number": "many",
2037
2012
  "marker": "list",
2013
+ "default": true,
2014
+ "word": "and",
2015
+ "text": "celcius fahrenheit and kelvin",
2016
+ "range": {
2017
+ "start": 0,
2018
+ "end": 53
2019
+ },
2020
+ "types": [
2021
+ "list",
2022
+ "unknown"
2023
+ ],
2038
2024
  "listable": true,
2025
+ "isList": true,
2039
2026
  "value": [
2040
2027
  {
2041
2028
  "value": "celcius",
@@ -2061,7 +2048,7 @@
2061
2048
  "end": 17
2062
2049
  },
2063
2050
  "dead": true,
2064
- "level": 2
2051
+ "level": 1
2065
2052
  },
2066
2053
  {
2067
2054
  "value": "kelvin",
@@ -2074,18 +2061,9 @@
2074
2061
  "end": 28
2075
2062
  },
2076
2063
  "dead": true,
2077
- "level": 2
2064
+ "level": 1
2078
2065
  }
2079
2066
  ],
2080
- "range": {
2081
- "start": 0,
2082
- "end": 53
2083
- },
2084
- "types": [
2085
- "list",
2086
- "unknown"
2087
- ],
2088
- "text": "celcius",
2089
2067
  "level": 1
2090
2068
  },
2091
2069
  "two": {
@@ -2638,6 +2616,10 @@
2638
2616
  "divideByOperator",
2639
2617
  "mathematicalOperator"
2640
2618
  ],
2619
+ [
2620
+ "doubleQuote",
2621
+ "queryable"
2622
+ ],
2641
2623
  [
2642
2624
  "expression",
2643
2625
  "expression"
@@ -3479,7 +3461,7 @@
3479
3461
  "trace": "undefined",
3480
3462
  "contexts": [
3481
3463
  {
3482
- "value": "=",
3464
+ "value": "equals",
3483
3465
  "text": "fahrenheit = celcius*9/5 + 32",
3484
3466
  "marker": "equals",
3485
3467
  "word": "=",
@@ -3507,7 +3489,7 @@
3507
3489
  },
3508
3490
  "right": {
3509
3491
  "value": null,
3510
- "text": "celcius * 9 / 5 + 32",
3492
+ "text": "celcius*9/5 + 32",
3511
3493
  "marker": "plusExpression",
3512
3494
  "word": "+",
3513
3495
  "range": {
@@ -3521,7 +3503,7 @@
3521
3503
  ],
3522
3504
  "x": {
3523
3505
  "value": null,
3524
- "text": "celcius * 9 / 5",
3506
+ "text": "celcius*9/5",
3525
3507
  "marker": "divideByExpression",
3526
3508
  "word": "/",
3527
3509
  "range": {
@@ -3535,7 +3517,7 @@
3535
3517
  ],
3536
3518
  "x": {
3537
3519
  "value": null,
3538
- "text": "celcius * 9",
3520
+ "text": "celcius*9",
3539
3521
  "marker": "timesExpression",
3540
3522
  "word": "*",
3541
3523
  "range": {
@@ -4043,6 +4025,10 @@
4043
4025
  "divideByOperator",
4044
4026
  "mathematicalOperator"
4045
4027
  ],
4028
+ [
4029
+ "doubleQuote",
4030
+ "queryable"
4031
+ ],
4046
4032
  [
4047
4033
  "expression",
4048
4034
  "expression"
@@ -4920,7 +4906,7 @@
4920
4906
  "trace": "undefined",
4921
4907
  "contexts": [
4922
4908
  {
4923
- "value": "=",
4909
+ "value": "equals",
4924
4910
  "text": "celcius = (fahrenheit - 32)*5/8 + 32",
4925
4911
  "marker": "equals",
4926
4912
  "word": "=",
@@ -4948,7 +4934,7 @@
4948
4934
  },
4949
4935
  "right": {
4950
4936
  "value": null,
4951
- "text": "( fahrenheit - 32 ) * 5 / 8 + 32",
4937
+ "text": "(fahrenheit - 32)*5/8 + 32",
4952
4938
  "marker": "plusExpression",
4953
4939
  "word": "+",
4954
4940
  "range": {
@@ -4962,7 +4948,7 @@
4962
4948
  ],
4963
4949
  "x": {
4964
4950
  "value": null,
4965
- "text": "( fahrenheit - 32 ) * 5 / 8",
4951
+ "text": "(fahrenheit - 32)*5/8",
4966
4952
  "marker": "divideByExpression",
4967
4953
  "word": "/",
4968
4954
  "range": {
@@ -4976,7 +4962,7 @@
4976
4962
  ],
4977
4963
  "x": {
4978
4964
  "value": null,
4979
- "text": "( fahrenheit - 32 ) * 5",
4965
+ "text": "(fahrenheit - 32)*5",
4980
4966
  "marker": "timesExpression",
4981
4967
  "word": "*",
4982
4968
  "range": {
@@ -4990,7 +4976,7 @@
4990
4976
  ],
4991
4977
  "x": {
4992
4978
  "value": null,
4993
- "text": "( fahrenheit - 32 )",
4979
+ "text": "(fahrenheit - 32)",
4994
4980
  "marker": "minusExpression",
4995
4981
  "word": "-",
4996
4982
  "range": {
package/common/testing.js CHANGED
@@ -15,7 +15,6 @@ let configStruct = {
15
15
  id: 'testingEvaluate',
16
16
  generatorp: ({context, g}) => `${context.word} ${g(context.value)}`,
17
17
  semantic: ({context, e}) => {
18
- debugger
19
18
  context.evalue = e(context.value)
20
19
  context.isResponse = true
21
20
  },
@@ -25,7 +25,8 @@ let configStruct = {
25
25
  ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split("").map((letter) => { return { child: letter, parent: 'upper' } }),
26
26
  { child: 'letter', parent: 'alphanumeric' },
27
27
  { child: 'digit', parent: 'alphanumeric' },
28
- ...`~!@#$%^&*()_+-=[]{}\\|;:,<>/?'"`.split("").map((punctuation) => { return { child: punctuation, parent: 'punctuation' } }),
28
+ { child: '_', parent: 'alphanumeric' },
29
+ ...`~!@#$%^&*()+-=[]{}\\|;:,<>/?'"`.split("").map((punctuation) => { return { child: punctuation, parent: 'punctuation' } }),
29
30
  ],
30
31
  },
31
32
  };
@@ -1,2 +1,87 @@
1
1
  [
2
- ]
2
+ {
3
+ "associations": [
4
+ ],
5
+ "config": {
6
+ },
7
+ "contexts": [
8
+ {
9
+ "dead": true,
10
+ "level": 1,
11
+ "marker": "unknown",
12
+ "range": {
13
+ "end": 10,
14
+ "start": 0
15
+ },
16
+ "text": "hello_world",
17
+ "topLevel": true,
18
+ "unknown": true,
19
+ "value": "hello_world",
20
+ "word": "hello_world"
21
+ }
22
+ ],
23
+ "generatedParenthesized": [
24
+ ""
25
+ ],
26
+ "metadata": {
27
+ "opChoices": [
28
+ {
29
+ "counter": 1,
30
+ "op": [
31
+ "unknown",
32
+ 0
33
+ ],
34
+ "ops": [
35
+ [
36
+ "unknown",
37
+ 0
38
+ ]
39
+ ]
40
+ }
41
+ ]
42
+ },
43
+ "objects": {
44
+ "nameToUUID": {
45
+ "tokenize": "tokenize1"
46
+ },
47
+ "namespaced": {
48
+ "tokenize1": {
49
+ }
50
+ },
51
+ "processed": [
52
+ {
53
+ "context": {
54
+ "dead": true,
55
+ "level": 1,
56
+ "marker": "unknown",
57
+ "range": {
58
+ "end": 10,
59
+ "start": 0
60
+ },
61
+ "text": "hello_world",
62
+ "topLevel": true,
63
+ "unknown": true,
64
+ "value": "hello_world",
65
+ "word": "hello_world"
66
+ },
67
+ "generatedParenthesized": "",
68
+ "paraphrases": "",
69
+ "paraphrasesParenthesized": "()",
70
+ "responses": [
71
+ ""
72
+ ]
73
+ }
74
+ ]
75
+ },
76
+ "paraphrases": [
77
+ ""
78
+ ],
79
+ "paraphrasesParenthesized": [
80
+ "()"
81
+ ],
82
+ "query": "hello_world",
83
+ "responses": [
84
+ ""
85
+ ]
86
+ }
87
+ ]
@@ -196,6 +196,10 @@
196
196
  "divideByOperator",
197
197
  "mathematicalOperator"
198
198
  ],
199
+ [
200
+ "doubleQuote",
201
+ "queryable"
202
+ ],
199
203
  [
200
204
  "down",
201
205
  "direction"
package/common/ui.js CHANGED
@@ -119,7 +119,6 @@ const configStruct = {
119
119
  bridge: "{ ...next(operator), action: after[0] }",
120
120
  generatorp: ({context, g}) => `stop ${g(context.action)}`,
121
121
  semantic: ({api, context}) => {
122
- debugger
123
122
  api.stop(context.action.value)
124
123
  }
125
124
  },
@@ -252,6 +252,10 @@
252
252
  "divideByOperator",
253
253
  "mathematicalOperator"
254
254
  ],
255
+ [
256
+ "doubleQuote",
257
+ "queryable"
258
+ ],
255
259
  [
256
260
  "expression",
257
261
  "expression"
@@ -1123,6 +1127,10 @@
1123
1127
  "divideByOperator",
1124
1128
  "mathematicalOperator"
1125
1129
  ],
1130
+ [
1131
+ "doubleQuote",
1132
+ "queryable"
1133
+ ],
1126
1134
  [
1127
1135
  "expression",
1128
1136
  "expression"
@@ -2187,6 +2195,10 @@
2187
2195
  "divideByOperator",
2188
2196
  "mathematicalOperator"
2189
2197
  ],
2198
+ [
2199
+ "doubleQuote",
2200
+ "queryable"
2201
+ ],
2190
2202
  [
2191
2203
  "expression",
2192
2204
  "expression"
@@ -3331,7 +3343,7 @@
3331
3343
  "marker": "list",
3332
3344
  "default": true,
3333
3345
  "word": "and",
3334
- "text": "kilograms grams pounds ( troy ounces ) ounces and tons",
3346
+ "text": "kilograms grams pounds (troy ounces) ounces and tons",
3335
3347
  "range": {
3336
3348
  "start": 0,
3337
3349
  "end": 71
@@ -3385,7 +3397,7 @@
3385
3397
  {
3386
3398
  "value": "troy_ounce",
3387
3399
  "number": "many",
3388
- "text": "( troy ounces )",
3400
+ "text": "(troy ounces)",
3389
3401
  "marker": "troy_ounce",
3390
3402
  "word": "ounces",
3391
3403
  "range": {
@@ -3398,6 +3410,7 @@
3398
3410
  ],
3399
3411
  "modifier_troy": {
3400
3412
  "value": "troy",
3413
+ "number": "one",
3401
3414
  "text": "troy",
3402
3415
  "marker": "troy",
3403
3416
  "word": "troy",
@@ -4117,6 +4130,10 @@
4117
4130
  "divideByOperator",
4118
4131
  "mathematicalOperator"
4119
4132
  ],
4133
+ [
4134
+ "doubleQuote",
4135
+ "queryable"
4136
+ ],
4120
4137
  [
4121
4138
  "expression",
4122
4139
  "expression"
@@ -4994,7 +5011,7 @@
4994
5011
  "trace": "undefined",
4995
5012
  "contexts": [
4996
5013
  {
4997
- "value": "=",
5014
+ "value": "equals",
4998
5015
  "text": "ounces = 1.097 * troy ounces",
4999
5016
  "marker": "equals",
5000
5017
  "word": "=",
@@ -5067,6 +5084,7 @@
5067
5084
  ],
5068
5085
  "modifier_troy": {
5069
5086
  "value": "troy",
5087
+ "number": "one",
5070
5088
  "text": "troy",
5071
5089
  "marker": "troy",
5072
5090
  "word": "troy",
@@ -5419,6 +5437,10 @@
5419
5437
  "divideByOperator",
5420
5438
  "mathematicalOperator"
5421
5439
  ],
5440
+ [
5441
+ "doubleQuote",
5442
+ "queryable"
5443
+ ],
5422
5444
  [
5423
5445
  "expression",
5424
5446
  "expression"
@@ -6288,7 +6310,7 @@
6288
6310
  "trace": "undefined",
6289
6311
  "contexts": [
6290
6312
  {
6291
- "value": "=",
6313
+ "value": "equals",
6292
6314
  "text": "troy ounces = ounces / 1.097",
6293
6315
  "marker": "equals",
6294
6316
  "word": "=",
@@ -6314,6 +6336,7 @@
6314
6336
  ],
6315
6337
  "modifier_troy": {
6316
6338
  "value": "troy",
6339
+ "number": "one",
6317
6340
  "text": "troy",
6318
6341
  "marker": "troy",
6319
6342
  "word": "troy",
@@ -6713,6 +6736,10 @@
6713
6736
  "divideByOperator",
6714
6737
  "mathematicalOperator"
6715
6738
  ],
6739
+ [
6740
+ "doubleQuote",
6741
+ "queryable"
6742
+ ],
6716
6743
  [
6717
6744
  "expression",
6718
6745
  "expression"
@@ -7578,7 +7605,7 @@
7578
7605
  "trace": "undefined",
7579
7606
  "contexts": [
7580
7607
  {
7581
- "value": "=",
7608
+ "value": "equals",
7582
7609
  "text": "kilograms = pounds * 0.453592",
7583
7610
  "marker": "equals",
7584
7611
  "word": "=",
@@ -7984,6 +8011,10 @@
7984
8011
  "divideByOperator",
7985
8012
  "mathematicalOperator"
7986
8013
  ],
8014
+ [
8015
+ "doubleQuote",
8016
+ "queryable"
8017
+ ],
7987
8018
  [
7988
8019
  "expression",
7989
8020
  "expression"
@@ -8849,7 +8880,7 @@
8849
8880
  "trace": "undefined",
8850
8881
  "contexts": [
8851
8882
  {
8852
- "value": "=",
8883
+ "value": "equals",
8853
8884
  "text": "grams = kilograms * 1000",
8854
8885
  "marker": "equals",
8855
8886
  "word": "=",
@@ -9255,6 +9286,10 @@
9255
9286
  "divideByOperator",
9256
9287
  "mathematicalOperator"
9257
9288
  ],
9289
+ [
9290
+ "doubleQuote",
9291
+ "queryable"
9292
+ ],
9258
9293
  [
9259
9294
  "expression",
9260
9295
  "expression"
@@ -10120,7 +10155,7 @@
10120
10155
  "trace": "undefined",
10121
10156
  "contexts": [
10122
10157
  {
10123
- "value": "=",
10158
+ "value": "equals",
10124
10159
  "text": "kilograms = grams / 1000",
10125
10160
  "marker": "equals",
10126
10161
  "word": "=",
@@ -10526,6 +10561,10 @@
10526
10561
  "divideByOperator",
10527
10562
  "mathematicalOperator"
10528
10563
  ],
10564
+ [
10565
+ "doubleQuote",
10566
+ "queryable"
10567
+ ],
10529
10568
  [
10530
10569
  "expression",
10531
10570
  "expression"
@@ -11391,7 +11430,7 @@
11391
11430
  "trace": "undefined",
11392
11431
  "contexts": [
11393
11432
  {
11394
- "value": "=",
11433
+ "value": "equals",
11395
11434
  "text": "pounds = kilograms * 2.20462",
11396
11435
  "marker": "equals",
11397
11436
  "word": "=",
@@ -11797,6 +11836,10 @@
11797
11836
  "divideByOperator",
11798
11837
  "mathematicalOperator"
11799
11838
  ],
11839
+ [
11840
+ "doubleQuote",
11841
+ "queryable"
11842
+ ],
11800
11843
  [
11801
11844
  "expression",
11802
11845
  "expression"
@@ -12662,7 +12705,7 @@
12662
12705
  "trace": "undefined",
12663
12706
  "contexts": [
12664
12707
  {
12665
- "value": "=",
12708
+ "value": "equals",
12666
12709
  "text": "ounces = pounds * 16",
12667
12710
  "marker": "equals",
12668
12711
  "word": "=",
@@ -13068,6 +13111,10 @@
13068
13111
  "divideByOperator",
13069
13112
  "mathematicalOperator"
13070
13113
  ],
13114
+ [
13115
+ "doubleQuote",
13116
+ "queryable"
13117
+ ],
13071
13118
  [
13072
13119
  "expression",
13073
13120
  "expression"
@@ -13933,7 +13980,7 @@
13933
13980
  "trace": "undefined",
13934
13981
  "contexts": [
13935
13982
  {
13936
- "value": "=",
13983
+ "value": "equals",
13937
13984
  "text": "ton = tonne * 0.907185",
13938
13985
  "marker": "equals",
13939
13986
  "word": "=",
@@ -14351,6 +14398,10 @@
14351
14398
  "divideByOperator",
14352
14399
  "mathematicalOperator"
14353
14400
  ],
14401
+ [
14402
+ "doubleQuote",
14403
+ "queryable"
14404
+ ],
14354
14405
  [
14355
14406
  "expression",
14356
14407
  "expression"
@@ -15216,7 +15267,7 @@
15216
15267
  "trace": "undefined",
15217
15268
  "contexts": [
15218
15269
  {
15219
- "value": "=",
15270
+ "value": "equals",
15220
15271
  "text": "pounds = ton * 2000",
15221
15272
  "marker": "equals",
15222
15273
  "word": "=",