ekms 7.12.8 → 8.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/common/animals.instance.json +89 -293
  2. package/common/animals.js +1 -1
  3. package/common/avatar.js +7 -5
  4. package/common/characters.js +12 -5
  5. package/common/crew.instance.json +289 -577
  6. package/common/crew.js +1 -1
  7. package/common/currency.js +0 -2
  8. package/common/dialogues.js +122 -17
  9. package/common/dimension.instance.json +747 -73
  10. package/common/dimension.js +15 -7
  11. package/common/edible.instance.json +243 -435
  12. package/common/edible.js +1 -1
  13. package/common/emotions.instance.json +29 -65
  14. package/common/emotions.js +1 -1
  15. package/common/fastfood.instance.json +1080 -2072
  16. package/common/fastfood.js +1 -1
  17. package/common/formulas.instance.json +992 -0
  18. package/common/formulas.js +19 -6
  19. package/common/formulas.test.json +1187 -3651
  20. package/common/gdefaults.js +2 -0
  21. package/common/help.js +7 -2
  22. package/common/help.test.json +9 -5
  23. package/common/helpers.js +5 -0
  24. package/common/javascript.js +8 -6
  25. package/common/kirk.instance.json +1 -1
  26. package/common/kirk.js +1 -1
  27. package/common/length.instance.json +316 -740
  28. package/common/length.js +1 -1
  29. package/common/math.instance.json +1959 -1
  30. package/common/math.js +17 -5
  31. package/common/meta.instance.json +1 -1
  32. package/common/meta.js +35 -10
  33. package/common/numbers.js +28 -24
  34. package/common/ordering.instance.json +37 -153
  35. package/common/ordering.js +1 -1
  36. package/common/people.instance.json +50 -78
  37. package/common/people.js +1 -1
  38. package/common/pipboy.instance.json +23431 -1082
  39. package/common/pipboy.js +31 -4
  40. package/common/pipboy.test.json +13 -9
  41. package/common/pokemon.instance.json +41 -141
  42. package/common/pokemon.js +1 -1
  43. package/common/pressure.instance.json +93 -33
  44. package/common/pressure.js +1 -1
  45. package/common/properties.instance.json +21 -49
  46. package/common/properties.js +13 -8
  47. package/common/reports.instance.json +23 -63
  48. package/common/reports.js +9 -7
  49. package/common/scorekeeper.instance.json +1 -1
  50. package/common/scorekeeper.js +9 -7
  51. package/common/spock.instance.json +1 -1
  52. package/common/spock.js +1 -1
  53. package/common/tell.js +4 -2
  54. package/common/temperature.instance.json +97 -193
  55. package/common/temperature.js +1 -1
  56. package/common/time.js +36 -20
  57. package/common/time.test.json +66 -44
  58. package/common/tokenize.js +46 -0
  59. package/common/ui.instance.json +9 -1
  60. package/common/weight.instance.json +273 -217
  61. package/common/weight.js +1 -1
  62. package/main.js +4 -8
  63. package/package.json +6 -18
  64. package/common/dimensionTemplate.instance.json +0 -582
  65. package/common/dimensionTemplate.js +0 -35
  66. package/common/formulasTemplate.instance.json +0 -483
  67. package/common/formulasTemplate.js +0 -30
  68. package/common/formulasTemplate.test.json +0 -2
  69. package/common/mathTemplate.instance.json +0 -1635
  70. package/common/mathTemplate.js +0 -32
  71. package/common/mathTemplate.test.json +0 -1422
  72. package/common/pipboyTemplate.instance.json +0 -17420
  73. package/common/pipboyTemplate.js +0 -48
  74. package/common/pipboyTemplate.test.json +0 -2
  75. /package/common/{dimensionTemplate.test.json → tokenize.test.json} +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "queries": [
2
+ "configs": [
3
3
  "pressure is a dimension",
4
4
  "pascals and atmospheres are units of pressure",
5
5
  "pascals = atmospheres * 101325",
@@ -192,6 +192,10 @@
192
192
  "convertToUnits",
193
193
  "queryable"
194
194
  ],
195
+ [
196
+ "convertToUnits",
197
+ "testingValue"
198
+ ],
195
199
  [
196
200
  "countable",
197
201
  "hierarchyAble"
@@ -344,6 +348,10 @@
344
348
  "it",
345
349
  "toAble"
346
350
  ],
351
+ [
352
+ "length",
353
+ "dimension"
354
+ ],
347
355
  [
348
356
  "lowest",
349
357
  "condition"
@@ -572,6 +580,10 @@
572
580
  "reason",
573
581
  "theAble"
574
582
  ],
583
+ [
584
+ "testingValue",
585
+ "testingValue"
586
+ ],
575
587
  [
576
588
  "that",
577
589
  "thisitthat"
@@ -696,9 +708,17 @@
696
708
  "whose",
697
709
  "object"
698
710
  ],
711
+ [
712
+ "x",
713
+ "number"
714
+ ],
699
715
  [
700
716
  "xfx",
701
717
  "queryable"
718
+ ],
719
+ [
720
+ "y",
721
+ "number"
702
722
  ]
703
723
  ],
704
724
  "metadata": {
@@ -807,15 +827,15 @@
807
827
  },
808
828
  "one": {
809
829
  "number": "one",
830
+ "value": "pressure",
831
+ "unknown": true,
832
+ "text": "pressure",
810
833
  "marker": "unknown",
834
+ "word": "pressure",
811
835
  "range": {
812
836
  "start": 0,
813
837
  "end": 22
814
838
  },
815
- "word": "pressure",
816
- "text": "pressure",
817
- "value": "pressure",
818
- "unknown": true,
819
839
  "dead": true,
820
840
  "types": [
821
841
  "unknown"
@@ -1128,6 +1148,10 @@
1128
1148
  "convertToUnits",
1129
1149
  "queryable"
1130
1150
  ],
1151
+ [
1152
+ "convertToUnits",
1153
+ "testingValue"
1154
+ ],
1131
1155
  [
1132
1156
  "countable",
1133
1157
  "hierarchyAble"
@@ -1280,6 +1304,10 @@
1280
1304
  "it",
1281
1305
  "toAble"
1282
1306
  ],
1307
+ [
1308
+ "length",
1309
+ "dimension"
1310
+ ],
1283
1311
  [
1284
1312
  "lowest",
1285
1313
  "condition"
@@ -1540,6 +1568,10 @@
1540
1568
  "reason",
1541
1569
  "theAble"
1542
1570
  ],
1571
+ [
1572
+ "testingValue",
1573
+ "testingValue"
1574
+ ],
1543
1575
  [
1544
1576
  "that",
1545
1577
  "thisitthat"
@@ -1664,9 +1696,17 @@
1664
1696
  "whose",
1665
1697
  "object"
1666
1698
  ],
1699
+ [
1700
+ "x",
1701
+ "number"
1702
+ ],
1667
1703
  [
1668
1704
  "xfx",
1669
1705
  "queryable"
1706
+ ],
1707
+ [
1708
+ "y",
1709
+ "number"
1670
1710
  ]
1671
1711
  ],
1672
1712
  "metadata": {
@@ -1924,28 +1964,28 @@
1924
1964
  "listable": true,
1925
1965
  "value": [
1926
1966
  {
1967
+ "value": "pascals",
1968
+ "unknown": true,
1969
+ "text": "pascals",
1927
1970
  "marker": "unknown",
1971
+ "word": "pascals",
1928
1972
  "range": {
1929
1973
  "start": 0,
1930
1974
  "end": 6
1931
1975
  },
1932
- "word": "pascals",
1933
- "text": "pascals",
1934
- "value": "pascals",
1935
- "unknown": true,
1936
1976
  "dead": true,
1937
1977
  "level": 2
1938
1978
  },
1939
1979
  {
1980
+ "value": "atmospheres",
1981
+ "unknown": true,
1982
+ "text": "atmospheres",
1940
1983
  "marker": "unknown",
1984
+ "word": "atmospheres",
1941
1985
  "range": {
1942
1986
  "start": 12,
1943
1987
  "end": 22
1944
1988
  },
1945
- "word": "atmospheres",
1946
- "text": "atmospheres",
1947
- "value": "atmospheres",
1948
- "unknown": true,
1949
1989
  "dead": true,
1950
1990
  "level": 2
1951
1991
  }
@@ -2207,16 +2247,6 @@
2207
2247
  "propertyOf",
2208
2248
  1
2209
2249
  ]
2210
- ],
2211
- [
2212
- [
2213
- "pressure",
2214
- 0
2215
- ],
2216
- [
2217
- "unknown",
2218
- 0
2219
- ]
2220
2250
  ]
2221
2251
  ],
2222
2252
  "learned_contextual_priorities": [],
@@ -2443,6 +2473,10 @@
2443
2473
  "convertToUnits",
2444
2474
  "queryable"
2445
2475
  ],
2476
+ [
2477
+ "convertToUnits",
2478
+ "testingValue"
2479
+ ],
2446
2480
  [
2447
2481
  "countable",
2448
2482
  "hierarchyAble"
@@ -2595,6 +2629,10 @@
2595
2629
  "it",
2596
2630
  "toAble"
2597
2631
  ],
2632
+ [
2633
+ "length",
2634
+ "dimension"
2635
+ ],
2598
2636
  [
2599
2637
  "lowest",
2600
2638
  "condition"
@@ -2887,6 +2925,10 @@
2887
2925
  "reason",
2888
2926
  "theAble"
2889
2927
  ],
2928
+ [
2929
+ "testingValue",
2930
+ "testingValue"
2931
+ ],
2890
2932
  [
2891
2933
  "that",
2892
2934
  "thisitthat"
@@ -3011,9 +3053,17 @@
3011
3053
  "whose",
3012
3054
  "object"
3013
3055
  ],
3056
+ [
3057
+ "x",
3058
+ "number"
3059
+ ],
3014
3060
  [
3015
3061
  "xfx",
3016
3062
  "queryable"
3063
+ ],
3064
+ [
3065
+ "y",
3066
+ "number"
3017
3067
  ]
3018
3068
  ],
3019
3069
  "metadata": {
@@ -3514,6 +3564,10 @@
3514
3564
  "convertToUnits",
3515
3565
  "queryable"
3516
3566
  ],
3567
+ [
3568
+ "convertToUnits",
3569
+ "testingValue"
3570
+ ],
3517
3571
  [
3518
3572
  "countable",
3519
3573
  "hierarchyAble"
@@ -3666,6 +3720,10 @@
3666
3720
  "it",
3667
3721
  "toAble"
3668
3722
  ],
3723
+ [
3724
+ "length",
3725
+ "dimension"
3726
+ ],
3669
3727
  [
3670
3728
  "lowest",
3671
3729
  "condition"
@@ -3958,6 +4016,10 @@
3958
4016
  "reason",
3959
4017
  "theAble"
3960
4018
  ],
4019
+ [
4020
+ "testingValue",
4021
+ "testingValue"
4022
+ ],
3961
4023
  [
3962
4024
  "that",
3963
4025
  "thisitthat"
@@ -4082,9 +4144,17 @@
4082
4144
  "whose",
4083
4145
  "object"
4084
4146
  ],
4147
+ [
4148
+ "x",
4149
+ "number"
4150
+ ],
4085
4151
  [
4086
4152
  "xfx",
4087
4153
  "queryable"
4154
+ ],
4155
+ [
4156
+ "y",
4157
+ "number"
4088
4158
  ]
4089
4159
  ],
4090
4160
  "metadata": {
@@ -4718,16 +4788,6 @@
4718
4788
  "unknown",
4719
4789
  1
4720
4790
  ]
4721
- ],
4722
- [
4723
- [
4724
- "pressure",
4725
- 0
4726
- ],
4727
- [
4728
- "unknown",
4729
- 0
4730
- ]
4731
4791
  ]
4732
4792
  ],
4733
4793
  "learned_contextual_priorities": []
@@ -5,7 +5,7 @@ const pressure_tests = require('./pressure.test.json')
5
5
  const pressure_instance = require('./pressure.instance.json')
6
6
 
7
7
  const template = {
8
- "queries": [
8
+ configs: [
9
9
  "pressure is a dimension",
10
10
  "pascals and atmospheres are units of pressure",
11
11
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "queries": [],
2
+ "configs": [],
3
3
  "resultss": [],
4
4
  "fragments": [
5
5
  {
@@ -406,15 +406,15 @@
406
406
  },
407
407
  "one": {
408
408
  "number": "one",
409
+ "value": "property1",
410
+ "unknown": true,
411
+ "text": "the property1 of object1",
409
412
  "marker": "property",
413
+ "word": "property1",
410
414
  "range": {
411
415
  "start": 0,
412
416
  "end": 33
413
417
  },
414
- "word": "property1",
415
- "text": "the property1 of object1",
416
- "value": "property1",
417
- "unknown": true,
418
418
  "dead": true,
419
419
  "types": [
420
420
  "property",
@@ -429,15 +429,15 @@
429
429
  "determiner"
430
430
  ],
431
431
  "object": {
432
+ "value": "object1",
433
+ "unknown": true,
434
+ "text": "object1",
432
435
  "marker": "unknown",
436
+ "word": "object1",
433
437
  "range": {
434
438
  "start": 17,
435
439
  "end": 23
436
440
  },
437
- "word": "object1",
438
- "text": "object1",
439
- "value": "object1",
440
- "unknown": true,
441
441
  "dead": true,
442
442
  "types": [
443
443
  "unknown"
@@ -446,15 +446,15 @@
446
446
  },
447
447
  "objects": [
448
448
  {
449
+ "value": "property1",
450
+ "unknown": true,
451
+ "text": "the property1",
449
452
  "marker": "property",
453
+ "word": "property1",
450
454
  "range": {
451
455
  "start": 0,
452
456
  "end": 12
453
457
  },
454
- "word": "property1",
455
- "text": "the property1",
456
- "value": "property1",
457
- "unknown": true,
458
458
  "dead": true,
459
459
  "types": [
460
460
  "property",
@@ -471,15 +471,15 @@
471
471
  "level": 1
472
472
  },
473
473
  {
474
+ "value": "object1",
475
+ "unknown": true,
476
+ "text": "object1",
474
477
  "marker": "unknown",
478
+ "word": "object1",
475
479
  "range": {
476
480
  "start": 17,
477
481
  "end": 23
478
482
  },
479
- "word": "object1",
480
- "text": "object1",
481
- "value": "object1",
482
- "unknown": true,
483
483
  "dead": true,
484
484
  "types": [
485
485
  "unknown"
@@ -490,15 +490,15 @@
490
490
  "level": 1
491
491
  },
492
492
  "two": {
493
+ "value": "value1",
494
+ "unknown": true,
495
+ "text": "value1",
493
496
  "marker": "unknown",
497
+ "word": "value1",
494
498
  "range": {
495
499
  "start": 28,
496
500
  "end": 33
497
501
  },
498
- "word": "value1",
499
- "text": "value1",
500
- "value": "value1",
501
- "unknown": true,
502
502
  "dead": true,
503
503
  "types": [
504
504
  "unknown"
@@ -611,20 +611,6 @@
611
611
  1
612
612
  ]
613
613
  ],
614
- [
615
- [
616
- "is",
617
- 0
618
- ],
619
- [
620
- "the",
621
- 0
622
- ],
623
- [
624
- "unknown",
625
- 0
626
- ]
627
- ],
628
614
  [
629
615
  [
630
616
  "is",
@@ -732,20 +718,6 @@
732
718
  1
733
719
  ]
734
720
  ],
735
- [
736
- [
737
- "is",
738
- 0
739
- ],
740
- [
741
- "the",
742
- 0
743
- ],
744
- [
745
- "unknown",
746
- 0
747
- ]
748
- ],
749
721
  [
750
722
  [
751
723
  "is",
@@ -172,14 +172,19 @@ let configStruct = {
172
172
  { id: "objectPrefix", level: 0, bridge: '{ ...after[0], object: operator, objects: [after[0], operator] }' },
173
173
  ],
174
174
  words: {
175
- "<<possession>>": [{ id: 'possession', initial: "{ value: 'possession' }" }],
176
- " 's": [{ id: 'possession', initial: "{ value: 'possession' }" }],
177
- "have": [{ id: 'have', initial: "{ doesable: true, number: 'many' }" }],
178
- "has": [{ id: 'have', initial: "{ doesable: true, number: 'one' }" }],
179
- "dont": [{ id: 'doesnt', initial: "{ number: 'many' }" }],
180
- "doesnt": [{ id: 'doesnt', initial: "{ number: 'one' }" }],
181
- // "my": [{ id: 'objectPrefix', initial: "{ value: 'other' }" }],
182
- // "your": [{ id: 'objectPrefix', initial: "{ value: 'self' }" }],
175
+ literals: {
176
+ "<<possession>>": [{ id: 'possession', initial: "{ value: 'possession' }" }],
177
+ " 's": [{ id: 'possession', initial: "{ value: 'possession' }" }],
178
+ "have": [{ id: 'have', initial: "{ doesable: true, number: 'many' }" }],
179
+ "has": [{ id: 'have', initial: "{ doesable: true, number: 'one' }" }],
180
+ "dont": [{ id: 'doesnt', initial: "{ number: 'many' }" }],
181
+ "doesnt": [{ id: 'doesnt', initial: "{ number: 'one' }" }],
182
+ // "my": [{ id: 'objectPrefix', initial: "{ value: 'other' }" }],
183
+ // "your": [{ id: 'objectPrefix', initial: "{ value: 'self' }" }],
184
+ },
185
+ patterns: [
186
+ { "pattern": ["'s"], defs: [{id: "possession", uuid: '1', initial: "{ value: 'possession' }" }]},
187
+ ],
183
188
  },
184
189
  priorities: [
185
190
  { "context": [['list', 0], ['between', 0], ], "choose": [0] },