tpmkms_4wp 8.0.0-beta.21 → 8.0.0-beta.23
Sign up to get free protection for your applications and to get access to all the features.
- package/common/colors.instance.json +0 -28
- package/common/comparable.js +0 -13
- package/common/concept.js +9 -5
- package/common/countable.js +3 -3
- package/common/crew.js +1 -1
- package/common/currency.js +3 -3
- package/common/dialogues.js +48 -117
- package/common/dimension.instance.json +4 -4
- package/common/dimension.js +8 -8
- package/common/dimension.test.json +242 -1248
- package/common/edible.instance.json +30 -58
- package/common/emotions.js +1 -1
- package/common/events.js +3 -3
- package/common/fastfood.instance.json +873 -1072
- package/common/fastfood.js +20 -20
- package/common/formulas.instance.json +6 -6
- package/common/formulas.js +8 -8
- package/common/gdefaults.js +11 -11
- package/common/help.js +1 -1
- package/common/helpers/dialogues.js +2 -3
- package/common/helpers/properties.js +48 -58
- package/common/hierarchy.js +9 -13
- package/common/javascript.js +5 -5
- package/common/math.instance.json +12 -12
- package/common/math.js +5 -5
- package/common/meta.js +19 -26
- package/common/ordering.js +1 -1
- package/common/people.js +1 -2
- package/common/percentages.js +2 -2
- package/common/pipboy.instance.json +30 -86
- package/common/pipboy.js +25 -28
- package/common/pokemon.js +1 -1
- package/common/properties.js +48 -121
- package/common/punctuation.js +1 -1
- package/common/reports.instance.json +1 -1
- package/common/reports.js +48 -65
- package/common/scorekeeper.js +10 -18
- package/common/sdefaults.js +4 -4
- package/common/stm.js +1 -1
- package/common/tell.js +6 -6
- package/common/temperature.instance.json +0 -84
- package/common/testing.js +3 -3
- package/common/time.js +3 -3
- package/common/ui.js +5 -5
- package/package.json +2 -2
@@ -167,12 +167,6 @@
|
|
167
167
|
"ifAble": [
|
168
168
|
"orAble"
|
169
169
|
],
|
170
|
-
"mathematical_operator": [
|
171
|
-
"*",
|
172
|
-
"+",
|
173
|
-
"/",
|
174
|
-
"-"
|
175
|
-
],
|
176
170
|
"object": [
|
177
171
|
"unknown",
|
178
172
|
"what",
|
@@ -270,28 +264,11 @@
|
|
270
264
|
"number",
|
271
265
|
"orAble",
|
272
266
|
"ifAble",
|
273
|
-
"*",
|
274
|
-
"mathematical_operator",
|
275
|
-
"+",
|
276
|
-
"/",
|
277
|
-
"-",
|
278
267
|
"formula",
|
279
268
|
"dimension",
|
280
269
|
"unit"
|
281
270
|
],
|
282
271
|
"parents": {
|
283
|
-
"*": [
|
284
|
-
"mathematical_operator"
|
285
|
-
],
|
286
|
-
"+": [
|
287
|
-
"mathematical_operator"
|
288
|
-
],
|
289
|
-
"-": [
|
290
|
-
"mathematical_operator"
|
291
|
-
],
|
292
|
-
"/": [
|
293
|
-
"mathematical_operator"
|
294
|
-
],
|
295
272
|
"a": [
|
296
273
|
"articlePOS"
|
297
274
|
],
|
@@ -405,14 +382,6 @@
|
|
405
382
|
"initHandlers": [
|
406
383
|
],
|
407
384
|
"root": {
|
408
|
-
"*": {
|
409
|
-
},
|
410
|
-
"+": {
|
411
|
-
},
|
412
|
-
"-": {
|
413
|
-
},
|
414
|
-
"/": {
|
415
|
-
},
|
416
385
|
"a": {
|
417
386
|
},
|
418
387
|
"articlePOS": {
|
@@ -441,8 +410,6 @@
|
|
441
410
|
},
|
442
411
|
"it": {
|
443
412
|
},
|
444
|
-
"mathematical_operator": {
|
445
|
-
},
|
446
413
|
"modifies": {
|
447
414
|
},
|
448
415
|
"noun": {
|
@@ -712,144 +679,6 @@
|
|
712
679
|
""
|
713
680
|
]
|
714
681
|
},
|
715
|
-
{
|
716
|
-
"context": {
|
717
|
-
"dead": true,
|
718
|
-
"level": 2,
|
719
|
-
"marker": "is",
|
720
|
-
"number": "many",
|
721
|
-
"one": {
|
722
|
-
"default": true,
|
723
|
-
"isList": true,
|
724
|
-
"level": 1,
|
725
|
-
"listable": true,
|
726
|
-
"marker": "list",
|
727
|
-
"number": "many",
|
728
|
-
"range": {
|
729
|
-
"end": 37,
|
730
|
-
"start": 0
|
731
|
-
},
|
732
|
-
"text": "* + / and -",
|
733
|
-
"types": [
|
734
|
-
"list",
|
735
|
-
"unknown"
|
736
|
-
],
|
737
|
-
"value": [
|
738
|
-
{
|
739
|
-
"dead": true,
|
740
|
-
"level": 1,
|
741
|
-
"marker": "unknown",
|
742
|
-
"range": {
|
743
|
-
"end": 0,
|
744
|
-
"start": 0
|
745
|
-
},
|
746
|
-
"text": "*",
|
747
|
-
"unknown": true,
|
748
|
-
"value": "*",
|
749
|
-
"word": "*"
|
750
|
-
},
|
751
|
-
{
|
752
|
-
"dead": true,
|
753
|
-
"level": 1,
|
754
|
-
"marker": "unknown",
|
755
|
-
"range": {
|
756
|
-
"end": 2,
|
757
|
-
"start": 2
|
758
|
-
},
|
759
|
-
"text": "+",
|
760
|
-
"unknown": true,
|
761
|
-
"value": "+",
|
762
|
-
"word": "+"
|
763
|
-
},
|
764
|
-
{
|
765
|
-
"dead": true,
|
766
|
-
"level": 1,
|
767
|
-
"marker": "unknown",
|
768
|
-
"range": {
|
769
|
-
"end": 4,
|
770
|
-
"start": 4
|
771
|
-
},
|
772
|
-
"text": "/",
|
773
|
-
"unknown": true,
|
774
|
-
"value": "/",
|
775
|
-
"word": "/"
|
776
|
-
},
|
777
|
-
{
|
778
|
-
"dead": true,
|
779
|
-
"level": 1,
|
780
|
-
"marker": "unknown",
|
781
|
-
"range": {
|
782
|
-
"end": 10,
|
783
|
-
"start": 10
|
784
|
-
},
|
785
|
-
"text": "-",
|
786
|
-
"unknown": true,
|
787
|
-
"value": "-",
|
788
|
-
"word": "-"
|
789
|
-
}
|
790
|
-
],
|
791
|
-
"word": "and"
|
792
|
-
},
|
793
|
-
"range": {
|
794
|
-
"end": 37,
|
795
|
-
"start": 0
|
796
|
-
},
|
797
|
-
"text": "* + / and - are mathematical operators",
|
798
|
-
"topLevel": true,
|
799
|
-
"touchedBy": [
|
800
|
-
"math#call2",
|
801
|
-
"instance1#math#call2",
|
802
|
-
"instance1#formulas#call2",
|
803
|
-
"instance1#dimension#call2"
|
804
|
-
],
|
805
|
-
"two": {
|
806
|
-
"atomic": true,
|
807
|
-
"concept": true,
|
808
|
-
"dead": true,
|
809
|
-
"level": 1,
|
810
|
-
"marker": "mathematical_operator",
|
811
|
-
"modifier_mathematical": {
|
812
|
-
"level": 0,
|
813
|
-
"marker": "mathematical",
|
814
|
-
"number": "one",
|
815
|
-
"range": {
|
816
|
-
"end": 27,
|
817
|
-
"start": 16
|
818
|
-
},
|
819
|
-
"text": "mathematical",
|
820
|
-
"types": [
|
821
|
-
"mathematical"
|
822
|
-
],
|
823
|
-
"value": "mathematical",
|
824
|
-
"word": "mathematical"
|
825
|
-
},
|
826
|
-
"modifiers": [
|
827
|
-
"modifier_mathematical"
|
828
|
-
],
|
829
|
-
"number": "many",
|
830
|
-
"range": {
|
831
|
-
"end": 37,
|
832
|
-
"start": 16
|
833
|
-
},
|
834
|
-
"text": "mathematical operators",
|
835
|
-
"types": [
|
836
|
-
"mathematical_operator",
|
837
|
-
"operator"
|
838
|
-
],
|
839
|
-
"value": "mathematical_operator",
|
840
|
-
"word": "operators"
|
841
|
-
},
|
842
|
-
"word": "are"
|
843
|
-
},
|
844
|
-
"generatedParenthesized": [
|
845
|
-
],
|
846
|
-
"paraphrases": "*, +, / and - are mathematical operators",
|
847
|
-
"paraphrasesParenthesized": [
|
848
|
-
],
|
849
|
-
"responses": [
|
850
|
-
""
|
851
|
-
]
|
852
|
-
},
|
853
682
|
{
|
854
683
|
"context": {
|
855
684
|
"concept": {
|
@@ -1045,12 +874,6 @@
|
|
1045
874
|
"ifAble": [
|
1046
875
|
"orAble"
|
1047
876
|
],
|
1048
|
-
"mathematical_operator": [
|
1049
|
-
"*",
|
1050
|
-
"+",
|
1051
|
-
"/",
|
1052
|
-
"-"
|
1053
|
-
],
|
1054
877
|
"object": [
|
1055
878
|
"unknown",
|
1056
879
|
"what",
|
@@ -1148,28 +971,11 @@
|
|
1148
971
|
"number",
|
1149
972
|
"orAble",
|
1150
973
|
"ifAble",
|
1151
|
-
"*",
|
1152
|
-
"mathematical_operator",
|
1153
|
-
"+",
|
1154
|
-
"/",
|
1155
|
-
"-",
|
1156
974
|
"formula",
|
1157
975
|
"dimension",
|
1158
976
|
"unit"
|
1159
977
|
],
|
1160
978
|
"parents": {
|
1161
|
-
"*": [
|
1162
|
-
"mathematical_operator"
|
1163
|
-
],
|
1164
|
-
"+": [
|
1165
|
-
"mathematical_operator"
|
1166
|
-
],
|
1167
|
-
"-": [
|
1168
|
-
"mathematical_operator"
|
1169
|
-
],
|
1170
|
-
"/": [
|
1171
|
-
"mathematical_operator"
|
1172
|
-
],
|
1173
979
|
"a": [
|
1174
980
|
"articlePOS"
|
1175
981
|
],
|
@@ -1283,14 +1089,6 @@
|
|
1283
1089
|
"initHandlers": [
|
1284
1090
|
],
|
1285
1091
|
"root": {
|
1286
|
-
"*": {
|
1287
|
-
},
|
1288
|
-
"+": {
|
1289
|
-
},
|
1290
|
-
"-": {
|
1291
|
-
},
|
1292
|
-
"/": {
|
1293
|
-
},
|
1294
1092
|
"a": {
|
1295
1093
|
},
|
1296
1094
|
"articlePOS": {
|
@@ -1319,8 +1117,6 @@
|
|
1319
1117
|
},
|
1320
1118
|
"it": {
|
1321
1119
|
},
|
1322
|
-
"mathematical_operator": {
|
1323
|
-
},
|
1324
1120
|
"modifies": {
|
1325
1121
|
},
|
1326
1122
|
"noun": {
|
@@ -1573,144 +1369,6 @@
|
|
1573
1369
|
""
|
1574
1370
|
]
|
1575
1371
|
},
|
1576
|
-
{
|
1577
|
-
"context": {
|
1578
|
-
"dead": true,
|
1579
|
-
"level": 2,
|
1580
|
-
"marker": "is",
|
1581
|
-
"number": "many",
|
1582
|
-
"one": {
|
1583
|
-
"default": true,
|
1584
|
-
"isList": true,
|
1585
|
-
"level": 1,
|
1586
|
-
"listable": true,
|
1587
|
-
"marker": "list",
|
1588
|
-
"number": "many",
|
1589
|
-
"range": {
|
1590
|
-
"end": 37,
|
1591
|
-
"start": 0
|
1592
|
-
},
|
1593
|
-
"text": "* + / and -",
|
1594
|
-
"types": [
|
1595
|
-
"list",
|
1596
|
-
"unknown"
|
1597
|
-
],
|
1598
|
-
"value": [
|
1599
|
-
{
|
1600
|
-
"dead": true,
|
1601
|
-
"level": 1,
|
1602
|
-
"marker": "unknown",
|
1603
|
-
"range": {
|
1604
|
-
"end": 0,
|
1605
|
-
"start": 0
|
1606
|
-
},
|
1607
|
-
"text": "*",
|
1608
|
-
"unknown": true,
|
1609
|
-
"value": "*",
|
1610
|
-
"word": "*"
|
1611
|
-
},
|
1612
|
-
{
|
1613
|
-
"dead": true,
|
1614
|
-
"level": 1,
|
1615
|
-
"marker": "unknown",
|
1616
|
-
"range": {
|
1617
|
-
"end": 2,
|
1618
|
-
"start": 2
|
1619
|
-
},
|
1620
|
-
"text": "+",
|
1621
|
-
"unknown": true,
|
1622
|
-
"value": "+",
|
1623
|
-
"word": "+"
|
1624
|
-
},
|
1625
|
-
{
|
1626
|
-
"dead": true,
|
1627
|
-
"level": 1,
|
1628
|
-
"marker": "unknown",
|
1629
|
-
"range": {
|
1630
|
-
"end": 4,
|
1631
|
-
"start": 4
|
1632
|
-
},
|
1633
|
-
"text": "/",
|
1634
|
-
"unknown": true,
|
1635
|
-
"value": "/",
|
1636
|
-
"word": "/"
|
1637
|
-
},
|
1638
|
-
{
|
1639
|
-
"dead": true,
|
1640
|
-
"level": 1,
|
1641
|
-
"marker": "unknown",
|
1642
|
-
"range": {
|
1643
|
-
"end": 10,
|
1644
|
-
"start": 10
|
1645
|
-
},
|
1646
|
-
"text": "-",
|
1647
|
-
"unknown": true,
|
1648
|
-
"value": "-",
|
1649
|
-
"word": "-"
|
1650
|
-
}
|
1651
|
-
],
|
1652
|
-
"word": "and"
|
1653
|
-
},
|
1654
|
-
"range": {
|
1655
|
-
"end": 37,
|
1656
|
-
"start": 0
|
1657
|
-
},
|
1658
|
-
"text": "* + / and - are mathematical operators",
|
1659
|
-
"topLevel": true,
|
1660
|
-
"touchedBy": [
|
1661
|
-
"math#call2",
|
1662
|
-
"instance1#math#call2",
|
1663
|
-
"instance1#formulas#call2",
|
1664
|
-
"instance1#dimension#call2"
|
1665
|
-
],
|
1666
|
-
"two": {
|
1667
|
-
"atomic": true,
|
1668
|
-
"concept": true,
|
1669
|
-
"dead": true,
|
1670
|
-
"level": 1,
|
1671
|
-
"marker": "mathematical_operator",
|
1672
|
-
"modifier_mathematical": {
|
1673
|
-
"level": 0,
|
1674
|
-
"marker": "mathematical",
|
1675
|
-
"number": "one",
|
1676
|
-
"range": {
|
1677
|
-
"end": 27,
|
1678
|
-
"start": 16
|
1679
|
-
},
|
1680
|
-
"text": "mathematical",
|
1681
|
-
"types": [
|
1682
|
-
"mathematical"
|
1683
|
-
],
|
1684
|
-
"value": "mathematical",
|
1685
|
-
"word": "mathematical"
|
1686
|
-
},
|
1687
|
-
"modifiers": [
|
1688
|
-
"modifier_mathematical"
|
1689
|
-
],
|
1690
|
-
"number": "many",
|
1691
|
-
"range": {
|
1692
|
-
"end": 37,
|
1693
|
-
"start": 16
|
1694
|
-
},
|
1695
|
-
"text": "mathematical operators",
|
1696
|
-
"types": [
|
1697
|
-
"mathematical_operator",
|
1698
|
-
"operator"
|
1699
|
-
],
|
1700
|
-
"value": "mathematical_operator",
|
1701
|
-
"word": "operators"
|
1702
|
-
},
|
1703
|
-
"word": "are"
|
1704
|
-
},
|
1705
|
-
"generatedParenthesized": [
|
1706
|
-
],
|
1707
|
-
"paraphrases": "*, +, / and - are mathematical operators",
|
1708
|
-
"paraphrasesParenthesized": [
|
1709
|
-
],
|
1710
|
-
"responses": [
|
1711
|
-
""
|
1712
|
-
]
|
1713
|
-
},
|
1714
1372
|
{
|
1715
1373
|
"context": {
|
1716
1374
|
"concept": {
|
@@ -2608,12 +2266,6 @@
|
|
2608
2266
|
"ifAble": [
|
2609
2267
|
"orAble"
|
2610
2268
|
],
|
2611
|
-
"mathematical_operator": [
|
2612
|
-
"*",
|
2613
|
-
"+",
|
2614
|
-
"/",
|
2615
|
-
"-"
|
2616
|
-
],
|
2617
2269
|
"object": [
|
2618
2270
|
"unknown",
|
2619
2271
|
"what",
|
@@ -2716,11 +2368,6 @@
|
|
2716
2368
|
"number",
|
2717
2369
|
"orAble",
|
2718
2370
|
"ifAble",
|
2719
|
-
"*",
|
2720
|
-
"mathematical_operator",
|
2721
|
-
"+",
|
2722
|
-
"/",
|
2723
|
-
"-",
|
2724
2371
|
"formula",
|
2725
2372
|
"dimension",
|
2726
2373
|
"unit",
|
@@ -2730,18 +2377,6 @@
|
|
2730
2377
|
"kelvin"
|
2731
2378
|
],
|
2732
2379
|
"parents": {
|
2733
|
-
"*": [
|
2734
|
-
"mathematical_operator"
|
2735
|
-
],
|
2736
|
-
"+": [
|
2737
|
-
"mathematical_operator"
|
2738
|
-
],
|
2739
|
-
"-": [
|
2740
|
-
"mathematical_operator"
|
2741
|
-
],
|
2742
|
-
"/": [
|
2743
|
-
"mathematical_operator"
|
2744
|
-
],
|
2745
2380
|
"a": [
|
2746
2381
|
"articlePOS"
|
2747
2382
|
],
|
@@ -2867,14 +2502,6 @@
|
|
2867
2502
|
"initHandlers": [
|
2868
2503
|
],
|
2869
2504
|
"root": {
|
2870
|
-
"*": {
|
2871
|
-
},
|
2872
|
-
"+": {
|
2873
|
-
},
|
2874
|
-
"-": {
|
2875
|
-
},
|
2876
|
-
"/": {
|
2877
|
-
},
|
2878
2505
|
"a": {
|
2879
2506
|
},
|
2880
2507
|
"articlePOS": {
|
@@ -2909,8 +2536,6 @@
|
|
2909
2536
|
},
|
2910
2537
|
"kelvin": {
|
2911
2538
|
},
|
2912
|
-
"mathematical_operator": {
|
2913
|
-
},
|
2914
2539
|
"modifies": {
|
2915
2540
|
},
|
2916
2541
|
"noun": {
|
@@ -3438,136 +3063,56 @@
|
|
3438
3063
|
},
|
3439
3064
|
{
|
3440
3065
|
"context": {
|
3441
|
-
"
|
3442
|
-
|
3443
|
-
"marker": "is",
|
3444
|
-
"number": "many",
|
3445
|
-
"one": {
|
3446
|
-
"default": true,
|
3447
|
-
"isList": true,
|
3066
|
+
"concept": {
|
3067
|
+
"dead": true,
|
3448
3068
|
"level": 1,
|
3449
|
-
"
|
3450
|
-
"marker": "list",
|
3451
|
-
"number": "many",
|
3069
|
+
"marker": "unknown",
|
3452
3070
|
"range": {
|
3453
|
-
"end":
|
3454
|
-
"start":
|
3071
|
+
"end": 29,
|
3072
|
+
"start": 22
|
3455
3073
|
},
|
3456
|
-
"text": "
|
3457
|
-
"
|
3458
|
-
|
3459
|
-
|
3460
|
-
],
|
3461
|
-
"value": [
|
3462
|
-
{
|
3463
|
-
"dead": true,
|
3464
|
-
"level": 1,
|
3465
|
-
"marker": "unknown",
|
3466
|
-
"range": {
|
3467
|
-
"end": 0,
|
3468
|
-
"start": 0
|
3469
|
-
},
|
3470
|
-
"text": "*",
|
3471
|
-
"unknown": true,
|
3472
|
-
"value": "*",
|
3473
|
-
"word": "*"
|
3474
|
-
},
|
3475
|
-
{
|
3476
|
-
"dead": true,
|
3477
|
-
"level": 1,
|
3478
|
-
"marker": "unknown",
|
3479
|
-
"range": {
|
3480
|
-
"end": 2,
|
3481
|
-
"start": 2
|
3482
|
-
},
|
3483
|
-
"text": "+",
|
3484
|
-
"unknown": true,
|
3485
|
-
"value": "+",
|
3486
|
-
"word": "+"
|
3487
|
-
},
|
3488
|
-
{
|
3489
|
-
"dead": true,
|
3490
|
-
"level": 1,
|
3491
|
-
"marker": "unknown",
|
3492
|
-
"range": {
|
3493
|
-
"end": 4,
|
3494
|
-
"start": 4
|
3495
|
-
},
|
3496
|
-
"text": "/",
|
3497
|
-
"unknown": true,
|
3498
|
-
"value": "/",
|
3499
|
-
"word": "/"
|
3500
|
-
},
|
3501
|
-
{
|
3502
|
-
"dead": true,
|
3503
|
-
"level": 1,
|
3504
|
-
"marker": "unknown",
|
3505
|
-
"range": {
|
3506
|
-
"end": 10,
|
3507
|
-
"start": 10
|
3508
|
-
},
|
3509
|
-
"text": "-",
|
3510
|
-
"unknown": true,
|
3511
|
-
"value": "-",
|
3512
|
-
"word": "-"
|
3513
|
-
}
|
3514
|
-
],
|
3515
|
-
"word": "and"
|
3074
|
+
"text": "operator",
|
3075
|
+
"unknown": true,
|
3076
|
+
"value": "operator",
|
3077
|
+
"word": "operator"
|
3516
3078
|
},
|
3079
|
+
"dead": true,
|
3080
|
+
"flatten": false,
|
3081
|
+
"level": 1,
|
3082
|
+
"marker": "modifies",
|
3083
|
+
"modifiers": [
|
3084
|
+
{
|
3085
|
+
"dead": true,
|
3086
|
+
"level": 1,
|
3087
|
+
"marker": "unknown",
|
3088
|
+
"range": {
|
3089
|
+
"end": 11,
|
3090
|
+
"start": 0
|
3091
|
+
},
|
3092
|
+
"text": "mathematical",
|
3093
|
+
"unknown": true,
|
3094
|
+
"value": "mathematical",
|
3095
|
+
"word": "mathematical"
|
3096
|
+
}
|
3097
|
+
],
|
3098
|
+
"number": "one",
|
3517
3099
|
"range": {
|
3518
|
-
"end":
|
3100
|
+
"end": 29,
|
3519
3101
|
"start": 0
|
3520
3102
|
},
|
3521
|
-
"text": "
|
3103
|
+
"text": "mathematical modifies operator",
|
3522
3104
|
"topLevel": true,
|
3523
3105
|
"touchedBy": [
|
3524
3106
|
"math#call2",
|
3525
|
-
"
|
3526
|
-
"
|
3527
|
-
"
|
3107
|
+
"instance0#math#call2",
|
3108
|
+
"instance0#formulas#call2",
|
3109
|
+
"instance0#dimension#call2"
|
3528
3110
|
],
|
3529
|
-
"
|
3530
|
-
"atomic": true,
|
3531
|
-
"concept": true,
|
3532
|
-
"dead": true,
|
3533
|
-
"level": 1,
|
3534
|
-
"marker": "mathematical_operator",
|
3535
|
-
"modifier_mathematical": {
|
3536
|
-
"level": 0,
|
3537
|
-
"marker": "mathematical",
|
3538
|
-
"number": "one",
|
3539
|
-
"range": {
|
3540
|
-
"end": 27,
|
3541
|
-
"start": 16
|
3542
|
-
},
|
3543
|
-
"text": "mathematical",
|
3544
|
-
"types": [
|
3545
|
-
"mathematical"
|
3546
|
-
],
|
3547
|
-
"value": "mathematical",
|
3548
|
-
"word": "mathematical"
|
3549
|
-
},
|
3550
|
-
"modifiers": [
|
3551
|
-
"modifier_mathematical"
|
3552
|
-
],
|
3553
|
-
"number": "many",
|
3554
|
-
"range": {
|
3555
|
-
"end": 37,
|
3556
|
-
"start": 16
|
3557
|
-
},
|
3558
|
-
"text": "mathematical operators",
|
3559
|
-
"types": [
|
3560
|
-
"mathematical_operator",
|
3561
|
-
"operator"
|
3562
|
-
],
|
3563
|
-
"value": "mathematical_operator",
|
3564
|
-
"word": "operators"
|
3565
|
-
},
|
3566
|
-
"word": "are"
|
3111
|
+
"word": "modifies"
|
3567
3112
|
},
|
3568
3113
|
"generatedParenthesized": [
|
3569
3114
|
],
|
3570
|
-
"paraphrases": "
|
3115
|
+
"paraphrases": "mathematical modifies operator",
|
3571
3116
|
"paraphrasesParenthesized": [
|
3572
3117
|
],
|
3573
3118
|
"responses": [
|
@@ -4388,12 +3933,6 @@
|
|
4388
3933
|
"ifAble": [
|
4389
3934
|
"orAble"
|
4390
3935
|
],
|
4391
|
-
"mathematical_operator": [
|
4392
|
-
"*",
|
4393
|
-
"+",
|
4394
|
-
"/",
|
4395
|
-
"-"
|
4396
|
-
],
|
4397
3936
|
"object": [
|
4398
3937
|
"unknown",
|
4399
3938
|
"what",
|
@@ -4496,11 +4035,6 @@
|
|
4496
4035
|
"number",
|
4497
4036
|
"orAble",
|
4498
4037
|
"ifAble",
|
4499
|
-
"*",
|
4500
|
-
"mathematical_operator",
|
4501
|
-
"+",
|
4502
|
-
"/",
|
4503
|
-
"-",
|
4504
4038
|
"formula",
|
4505
4039
|
"dimension",
|
4506
4040
|
"unit",
|
@@ -4510,18 +4044,6 @@
|
|
4510
4044
|
"kelvin"
|
4511
4045
|
],
|
4512
4046
|
"parents": {
|
4513
|
-
"*": [
|
4514
|
-
"mathematical_operator"
|
4515
|
-
],
|
4516
|
-
"+": [
|
4517
|
-
"mathematical_operator"
|
4518
|
-
],
|
4519
|
-
"-": [
|
4520
|
-
"mathematical_operator"
|
4521
|
-
],
|
4522
|
-
"/": [
|
4523
|
-
"mathematical_operator"
|
4524
|
-
],
|
4525
4047
|
"a": [
|
4526
4048
|
"articlePOS"
|
4527
4049
|
],
|
@@ -4647,14 +4169,6 @@
|
|
4647
4169
|
"initHandlers": [
|
4648
4170
|
],
|
4649
4171
|
"root": {
|
4650
|
-
"*": {
|
4651
|
-
},
|
4652
|
-
"+": {
|
4653
|
-
},
|
4654
|
-
"-": {
|
4655
|
-
},
|
4656
|
-
"/": {
|
4657
|
-
},
|
4658
4172
|
"a": {
|
4659
4173
|
},
|
4660
4174
|
"articlePOS": {
|
@@ -4689,8 +4203,6 @@
|
|
4689
4203
|
},
|
4690
4204
|
"kelvin": {
|
4691
4205
|
},
|
4692
|
-
"mathematical_operator": {
|
4693
|
-
},
|
4694
4206
|
"modifies": {
|
4695
4207
|
},
|
4696
4208
|
"noun": {
|
@@ -5202,136 +4714,56 @@
|
|
5202
4714
|
},
|
5203
4715
|
{
|
5204
4716
|
"context": {
|
5205
|
-
"
|
5206
|
-
|
5207
|
-
"marker": "is",
|
5208
|
-
"number": "many",
|
5209
|
-
"one": {
|
5210
|
-
"default": true,
|
5211
|
-
"isList": true,
|
4717
|
+
"concept": {
|
4718
|
+
"dead": true,
|
5212
4719
|
"level": 1,
|
5213
|
-
"
|
5214
|
-
"marker": "list",
|
5215
|
-
"number": "many",
|
4720
|
+
"marker": "unknown",
|
5216
4721
|
"range": {
|
5217
|
-
"end":
|
5218
|
-
"start":
|
4722
|
+
"end": 29,
|
4723
|
+
"start": 22
|
5219
4724
|
},
|
5220
|
-
"text": "
|
5221
|
-
"
|
5222
|
-
|
5223
|
-
|
5224
|
-
],
|
5225
|
-
"value": [
|
5226
|
-
{
|
5227
|
-
"dead": true,
|
5228
|
-
"level": 1,
|
5229
|
-
"marker": "unknown",
|
5230
|
-
"range": {
|
5231
|
-
"end": 0,
|
5232
|
-
"start": 0
|
5233
|
-
},
|
5234
|
-
"text": "*",
|
5235
|
-
"unknown": true,
|
5236
|
-
"value": "*",
|
5237
|
-
"word": "*"
|
5238
|
-
},
|
5239
|
-
{
|
5240
|
-
"dead": true,
|
5241
|
-
"level": 1,
|
5242
|
-
"marker": "unknown",
|
5243
|
-
"range": {
|
5244
|
-
"end": 2,
|
5245
|
-
"start": 2
|
5246
|
-
},
|
5247
|
-
"text": "+",
|
5248
|
-
"unknown": true,
|
5249
|
-
"value": "+",
|
5250
|
-
"word": "+"
|
5251
|
-
},
|
5252
|
-
{
|
5253
|
-
"dead": true,
|
5254
|
-
"level": 1,
|
5255
|
-
"marker": "unknown",
|
5256
|
-
"range": {
|
5257
|
-
"end": 4,
|
5258
|
-
"start": 4
|
5259
|
-
},
|
5260
|
-
"text": "/",
|
5261
|
-
"unknown": true,
|
5262
|
-
"value": "/",
|
5263
|
-
"word": "/"
|
5264
|
-
},
|
5265
|
-
{
|
5266
|
-
"dead": true,
|
5267
|
-
"level": 1,
|
5268
|
-
"marker": "unknown",
|
5269
|
-
"range": {
|
5270
|
-
"end": 10,
|
5271
|
-
"start": 10
|
5272
|
-
},
|
5273
|
-
"text": "-",
|
5274
|
-
"unknown": true,
|
5275
|
-
"value": "-",
|
5276
|
-
"word": "-"
|
5277
|
-
}
|
5278
|
-
],
|
5279
|
-
"word": "and"
|
5280
|
-
},
|
5281
|
-
"range": {
|
5282
|
-
"end": 37,
|
5283
|
-
"start": 0
|
4725
|
+
"text": "operator",
|
4726
|
+
"unknown": true,
|
4727
|
+
"value": "operator",
|
4728
|
+
"word": "operator"
|
5284
4729
|
},
|
5285
|
-
"
|
5286
|
-
"
|
5287
|
-
"
|
5288
|
-
|
5289
|
-
|
5290
|
-
|
5291
|
-
|
5292
|
-
|
5293
|
-
|
5294
|
-
"atomic": true,
|
5295
|
-
"concept": true,
|
5296
|
-
"dead": true,
|
5297
|
-
"level": 1,
|
5298
|
-
"marker": "mathematical_operator",
|
5299
|
-
"modifier_mathematical": {
|
5300
|
-
"level": 0,
|
5301
|
-
"marker": "mathematical",
|
5302
|
-
"number": "one",
|
4730
|
+
"dead": true,
|
4731
|
+
"flatten": false,
|
4732
|
+
"level": 1,
|
4733
|
+
"marker": "modifies",
|
4734
|
+
"modifiers": [
|
4735
|
+
{
|
4736
|
+
"dead": true,
|
4737
|
+
"level": 1,
|
4738
|
+
"marker": "unknown",
|
5303
4739
|
"range": {
|
5304
|
-
"end":
|
5305
|
-
"start":
|
4740
|
+
"end": 11,
|
4741
|
+
"start": 0
|
5306
4742
|
},
|
5307
4743
|
"text": "mathematical",
|
5308
|
-
"
|
5309
|
-
"mathematical"
|
5310
|
-
],
|
4744
|
+
"unknown": true,
|
5311
4745
|
"value": "mathematical",
|
5312
4746
|
"word": "mathematical"
|
5313
|
-
}
|
5314
|
-
|
5315
|
-
|
5316
|
-
|
5317
|
-
"
|
5318
|
-
"
|
5319
|
-
"end": 37,
|
5320
|
-
"start": 16
|
5321
|
-
},
|
5322
|
-
"text": "mathematical operators",
|
5323
|
-
"types": [
|
5324
|
-
"mathematical_operator",
|
5325
|
-
"operator"
|
5326
|
-
],
|
5327
|
-
"value": "mathematical_operator",
|
5328
|
-
"word": "operators"
|
4747
|
+
}
|
4748
|
+
],
|
4749
|
+
"number": "one",
|
4750
|
+
"range": {
|
4751
|
+
"end": 29,
|
4752
|
+
"start": 0
|
5329
4753
|
},
|
5330
|
-
"
|
4754
|
+
"text": "mathematical modifies operator",
|
4755
|
+
"topLevel": true,
|
4756
|
+
"touchedBy": [
|
4757
|
+
"math#call2",
|
4758
|
+
"instance0#math#call2",
|
4759
|
+
"instance0#formulas#call2",
|
4760
|
+
"instance0#dimension#call2"
|
4761
|
+
],
|
4762
|
+
"word": "modifies"
|
5331
4763
|
},
|
5332
4764
|
"generatedParenthesized": [
|
5333
4765
|
],
|
5334
|
-
"paraphrases": "
|
4766
|
+
"paraphrases": "mathematical modifies operator",
|
5335
4767
|
"paraphrasesParenthesized": [
|
5336
4768
|
],
|
5337
4769
|
"responses": [
|
@@ -6207,12 +5639,6 @@
|
|
6207
5639
|
"ifAble": [
|
6208
5640
|
"orAble"
|
6209
5641
|
],
|
6210
|
-
"mathematical_operator": [
|
6211
|
-
"*",
|
6212
|
-
"+",
|
6213
|
-
"/",
|
6214
|
-
"-"
|
6215
|
-
],
|
6216
5642
|
"object": [
|
6217
5643
|
"unknown",
|
6218
5644
|
"what",
|
@@ -6315,11 +5741,6 @@
|
|
6315
5741
|
"number",
|
6316
5742
|
"orAble",
|
6317
5743
|
"ifAble",
|
6318
|
-
"*",
|
6319
|
-
"mathematical_operator",
|
6320
|
-
"+",
|
6321
|
-
"/",
|
6322
|
-
"-",
|
6323
5744
|
"formula",
|
6324
5745
|
"dimension",
|
6325
5746
|
"unit",
|
@@ -6329,18 +5750,6 @@
|
|
6329
5750
|
"kelvin"
|
6330
5751
|
],
|
6331
5752
|
"parents": {
|
6332
|
-
"*": [
|
6333
|
-
"mathematical_operator"
|
6334
|
-
],
|
6335
|
-
"+": [
|
6336
|
-
"mathematical_operator"
|
6337
|
-
],
|
6338
|
-
"-": [
|
6339
|
-
"mathematical_operator"
|
6340
|
-
],
|
6341
|
-
"/": [
|
6342
|
-
"mathematical_operator"
|
6343
|
-
],
|
6344
5753
|
"a": [
|
6345
5754
|
"articlePOS"
|
6346
5755
|
],
|
@@ -6466,14 +5875,6 @@
|
|
6466
5875
|
"initHandlers": [
|
6467
5876
|
],
|
6468
5877
|
"root": {
|
6469
|
-
"*": {
|
6470
|
-
},
|
6471
|
-
"+": {
|
6472
|
-
},
|
6473
|
-
"-": {
|
6474
|
-
},
|
6475
|
-
"/": {
|
6476
|
-
},
|
6477
5878
|
"a": {
|
6478
5879
|
},
|
6479
5880
|
"articlePOS": {
|
@@ -6508,8 +5909,6 @@
|
|
6508
5909
|
},
|
6509
5910
|
"kelvin": {
|
6510
5911
|
},
|
6511
|
-
"mathematical_operator": {
|
6512
|
-
},
|
6513
5912
|
"modifies": {
|
6514
5913
|
},
|
6515
5914
|
"noun": {
|
@@ -7037,136 +6436,56 @@
|
|
7037
6436
|
},
|
7038
6437
|
{
|
7039
6438
|
"context": {
|
7040
|
-
"
|
7041
|
-
|
7042
|
-
"marker": "is",
|
7043
|
-
"number": "many",
|
7044
|
-
"one": {
|
7045
|
-
"default": true,
|
7046
|
-
"isList": true,
|
6439
|
+
"concept": {
|
6440
|
+
"dead": true,
|
7047
6441
|
"level": 1,
|
7048
|
-
"
|
7049
|
-
"marker": "list",
|
7050
|
-
"number": "many",
|
6442
|
+
"marker": "unknown",
|
7051
6443
|
"range": {
|
7052
|
-
"end":
|
7053
|
-
"start":
|
6444
|
+
"end": 29,
|
6445
|
+
"start": 22
|
7054
6446
|
},
|
7055
|
-
"text": "
|
7056
|
-
"
|
7057
|
-
|
7058
|
-
|
7059
|
-
],
|
7060
|
-
"value": [
|
7061
|
-
{
|
7062
|
-
"dead": true,
|
7063
|
-
"level": 1,
|
7064
|
-
"marker": "unknown",
|
7065
|
-
"range": {
|
7066
|
-
"end": 0,
|
7067
|
-
"start": 0
|
7068
|
-
},
|
7069
|
-
"text": "*",
|
7070
|
-
"unknown": true,
|
7071
|
-
"value": "*",
|
7072
|
-
"word": "*"
|
7073
|
-
},
|
7074
|
-
{
|
7075
|
-
"dead": true,
|
7076
|
-
"level": 1,
|
7077
|
-
"marker": "unknown",
|
7078
|
-
"range": {
|
7079
|
-
"end": 2,
|
7080
|
-
"start": 2
|
7081
|
-
},
|
7082
|
-
"text": "+",
|
7083
|
-
"unknown": true,
|
7084
|
-
"value": "+",
|
7085
|
-
"word": "+"
|
7086
|
-
},
|
7087
|
-
{
|
7088
|
-
"dead": true,
|
7089
|
-
"level": 1,
|
7090
|
-
"marker": "unknown",
|
7091
|
-
"range": {
|
7092
|
-
"end": 4,
|
7093
|
-
"start": 4
|
7094
|
-
},
|
7095
|
-
"text": "/",
|
7096
|
-
"unknown": true,
|
7097
|
-
"value": "/",
|
7098
|
-
"word": "/"
|
7099
|
-
},
|
7100
|
-
{
|
7101
|
-
"dead": true,
|
7102
|
-
"level": 1,
|
7103
|
-
"marker": "unknown",
|
7104
|
-
"range": {
|
7105
|
-
"end": 10,
|
7106
|
-
"start": 10
|
7107
|
-
},
|
7108
|
-
"text": "-",
|
7109
|
-
"unknown": true,
|
7110
|
-
"value": "-",
|
7111
|
-
"word": "-"
|
7112
|
-
}
|
7113
|
-
],
|
7114
|
-
"word": "and"
|
6447
|
+
"text": "operator",
|
6448
|
+
"unknown": true,
|
6449
|
+
"value": "operator",
|
6450
|
+
"word": "operator"
|
7115
6451
|
},
|
6452
|
+
"dead": true,
|
6453
|
+
"flatten": false,
|
6454
|
+
"level": 1,
|
6455
|
+
"marker": "modifies",
|
6456
|
+
"modifiers": [
|
6457
|
+
{
|
6458
|
+
"dead": true,
|
6459
|
+
"level": 1,
|
6460
|
+
"marker": "unknown",
|
6461
|
+
"range": {
|
6462
|
+
"end": 11,
|
6463
|
+
"start": 0
|
6464
|
+
},
|
6465
|
+
"text": "mathematical",
|
6466
|
+
"unknown": true,
|
6467
|
+
"value": "mathematical",
|
6468
|
+
"word": "mathematical"
|
6469
|
+
}
|
6470
|
+
],
|
6471
|
+
"number": "one",
|
7116
6472
|
"range": {
|
7117
|
-
"end":
|
6473
|
+
"end": 29,
|
7118
6474
|
"start": 0
|
7119
6475
|
},
|
7120
|
-
"text": "
|
6476
|
+
"text": "mathematical modifies operator",
|
7121
6477
|
"topLevel": true,
|
7122
6478
|
"touchedBy": [
|
7123
6479
|
"math#call2",
|
7124
|
-
"
|
7125
|
-
"
|
7126
|
-
"
|
6480
|
+
"instance0#math#call2",
|
6481
|
+
"instance0#formulas#call2",
|
6482
|
+
"instance0#dimension#call2"
|
7127
6483
|
],
|
7128
|
-
"
|
7129
|
-
"atomic": true,
|
7130
|
-
"concept": true,
|
7131
|
-
"dead": true,
|
7132
|
-
"level": 1,
|
7133
|
-
"marker": "mathematical_operator",
|
7134
|
-
"modifier_mathematical": {
|
7135
|
-
"level": 0,
|
7136
|
-
"marker": "mathematical",
|
7137
|
-
"number": "one",
|
7138
|
-
"range": {
|
7139
|
-
"end": 27,
|
7140
|
-
"start": 16
|
7141
|
-
},
|
7142
|
-
"text": "mathematical",
|
7143
|
-
"types": [
|
7144
|
-
"mathematical"
|
7145
|
-
],
|
7146
|
-
"value": "mathematical",
|
7147
|
-
"word": "mathematical"
|
7148
|
-
},
|
7149
|
-
"modifiers": [
|
7150
|
-
"modifier_mathematical"
|
7151
|
-
],
|
7152
|
-
"number": "many",
|
7153
|
-
"range": {
|
7154
|
-
"end": 37,
|
7155
|
-
"start": 16
|
7156
|
-
},
|
7157
|
-
"text": "mathematical operators",
|
7158
|
-
"types": [
|
7159
|
-
"mathematical_operator",
|
7160
|
-
"operator"
|
7161
|
-
],
|
7162
|
-
"value": "mathematical_operator",
|
7163
|
-
"word": "operators"
|
7164
|
-
},
|
7165
|
-
"word": "are"
|
6484
|
+
"word": "modifies"
|
7166
6485
|
},
|
7167
6486
|
"generatedParenthesized": [
|
7168
6487
|
],
|
7169
|
-
"paraphrases": "
|
6488
|
+
"paraphrases": "mathematical modifies operator",
|
7170
6489
|
"paraphrasesParenthesized": [
|
7171
6490
|
],
|
7172
6491
|
"responses": [
|
@@ -8171,12 +7490,6 @@
|
|
8171
7490
|
"ifAble": [
|
8172
7491
|
"orAble"
|
8173
7492
|
],
|
8174
|
-
"mathematical_operator": [
|
8175
|
-
"*",
|
8176
|
-
"+",
|
8177
|
-
"/",
|
8178
|
-
"-"
|
8179
|
-
],
|
8180
7493
|
"object": [
|
8181
7494
|
"unknown",
|
8182
7495
|
"what",
|
@@ -8279,11 +7592,6 @@
|
|
8279
7592
|
"number",
|
8280
7593
|
"orAble",
|
8281
7594
|
"ifAble",
|
8282
|
-
"*",
|
8283
|
-
"mathematical_operator",
|
8284
|
-
"+",
|
8285
|
-
"/",
|
8286
|
-
"-",
|
8287
7595
|
"formula",
|
8288
7596
|
"dimension",
|
8289
7597
|
"unit",
|
@@ -8293,18 +7601,6 @@
|
|
8293
7601
|
"kelvin"
|
8294
7602
|
],
|
8295
7603
|
"parents": {
|
8296
|
-
"*": [
|
8297
|
-
"mathematical_operator"
|
8298
|
-
],
|
8299
|
-
"+": [
|
8300
|
-
"mathematical_operator"
|
8301
|
-
],
|
8302
|
-
"-": [
|
8303
|
-
"mathematical_operator"
|
8304
|
-
],
|
8305
|
-
"/": [
|
8306
|
-
"mathematical_operator"
|
8307
|
-
],
|
8308
7604
|
"a": [
|
8309
7605
|
"articlePOS"
|
8310
7606
|
],
|
@@ -8430,14 +7726,6 @@
|
|
8430
7726
|
"initHandlers": [
|
8431
7727
|
],
|
8432
7728
|
"root": {
|
8433
|
-
"*": {
|
8434
|
-
},
|
8435
|
-
"+": {
|
8436
|
-
},
|
8437
|
-
"-": {
|
8438
|
-
},
|
8439
|
-
"/": {
|
8440
|
-
},
|
8441
7729
|
"a": {
|
8442
7730
|
},
|
8443
7731
|
"articlePOS": {
|
@@ -8472,8 +7760,6 @@
|
|
8472
7760
|
},
|
8473
7761
|
"kelvin": {
|
8474
7762
|
},
|
8475
|
-
"mathematical_operator": {
|
8476
|
-
},
|
8477
7763
|
"modifies": {
|
8478
7764
|
},
|
8479
7765
|
"noun": {
|
@@ -8970,198 +8256,118 @@
|
|
8970
8256
|
},
|
8971
8257
|
{
|
8972
8258
|
"context": {
|
8973
|
-
"dead": true,
|
8974
|
-
"level": 2,
|
8975
|
-
"marker": "is",
|
8976
|
-
"number": "many",
|
8977
|
-
"one": {
|
8978
|
-
"dead": true,
|
8979
|
-
"level": 1,
|
8980
|
-
"marker": "unknown",
|
8981
|
-
"number": "many",
|
8982
|
-
"range": {
|
8983
|
-
"end": 20,
|
8984
|
-
"start": 0
|
8985
|
-
},
|
8986
|
-
"text": "formulas",
|
8987
|
-
"types": [
|
8988
|
-
"unknown"
|
8989
|
-
],
|
8990
|
-
"unknown": true,
|
8991
|
-
"value": "formulas",
|
8992
|
-
"word": "formulas"
|
8993
|
-
},
|
8994
|
-
"range": {
|
8995
|
-
"end": 20,
|
8996
|
-
"start": 0
|
8997
|
-
},
|
8998
|
-
"text": "formulas are concepts",
|
8999
|
-
"topLevel": true,
|
9000
|
-
"touchedBy": [
|
9001
|
-
"formulas#call2",
|
9002
|
-
"instance0#formulas#call2",
|
9003
|
-
"instance0#dimension#call2"
|
9004
|
-
],
|
9005
|
-
"two": {
|
9006
|
-
"concept": true,
|
9007
|
-
"dead": true,
|
9008
|
-
"level": 1,
|
9009
|
-
"marker": "unknown",
|
9010
|
-
"range": {
|
9011
|
-
"end": 20,
|
9012
|
-
"start": 13
|
9013
|
-
},
|
9014
|
-
"text": "concepts",
|
9015
|
-
"types": [
|
9016
|
-
"unknown"
|
9017
|
-
],
|
9018
|
-
"unknown": true,
|
9019
|
-
"value": "concepts",
|
9020
|
-
"word": "concepts"
|
9021
|
-
},
|
9022
|
-
"word": "are"
|
9023
|
-
},
|
9024
|
-
"generatedParenthesized": [
|
9025
|
-
],
|
9026
|
-
"paraphrases": "formulas are concepts",
|
9027
|
-
"paraphrasesParenthesized": [
|
9028
|
-
],
|
9029
|
-
"responses": [
|
9030
|
-
""
|
9031
|
-
]
|
9032
|
-
},
|
9033
|
-
{
|
9034
|
-
"context": {
|
9035
|
-
"dead": true,
|
9036
|
-
"level": 2,
|
9037
|
-
"marker": "is",
|
9038
|
-
"number": "many",
|
9039
|
-
"one": {
|
9040
|
-
"default": true,
|
9041
|
-
"isList": true,
|
9042
|
-
"level": 1,
|
9043
|
-
"listable": true,
|
9044
|
-
"marker": "list",
|
9045
|
-
"number": "many",
|
9046
|
-
"range": {
|
9047
|
-
"end": 37,
|
9048
|
-
"start": 0
|
9049
|
-
},
|
9050
|
-
"text": "* + / and -",
|
9051
|
-
"types": [
|
9052
|
-
"list",
|
9053
|
-
"unknown"
|
9054
|
-
],
|
9055
|
-
"value": [
|
9056
|
-
{
|
9057
|
-
"dead": true,
|
9058
|
-
"level": 1,
|
9059
|
-
"marker": "unknown",
|
9060
|
-
"range": {
|
9061
|
-
"end": 0,
|
9062
|
-
"start": 0
|
9063
|
-
},
|
9064
|
-
"text": "*",
|
9065
|
-
"unknown": true,
|
9066
|
-
"value": "*",
|
9067
|
-
"word": "*"
|
9068
|
-
},
|
9069
|
-
{
|
9070
|
-
"dead": true,
|
9071
|
-
"level": 1,
|
9072
|
-
"marker": "unknown",
|
9073
|
-
"range": {
|
9074
|
-
"end": 2,
|
9075
|
-
"start": 2
|
9076
|
-
},
|
9077
|
-
"text": "+",
|
9078
|
-
"unknown": true,
|
9079
|
-
"value": "+",
|
9080
|
-
"word": "+"
|
9081
|
-
},
|
9082
|
-
{
|
9083
|
-
"dead": true,
|
9084
|
-
"level": 1,
|
9085
|
-
"marker": "unknown",
|
9086
|
-
"range": {
|
9087
|
-
"end": 4,
|
9088
|
-
"start": 4
|
9089
|
-
},
|
9090
|
-
"text": "/",
|
9091
|
-
"unknown": true,
|
9092
|
-
"value": "/",
|
9093
|
-
"word": "/"
|
9094
|
-
},
|
9095
|
-
{
|
9096
|
-
"dead": true,
|
9097
|
-
"level": 1,
|
9098
|
-
"marker": "unknown",
|
9099
|
-
"range": {
|
9100
|
-
"end": 10,
|
9101
|
-
"start": 10
|
9102
|
-
},
|
9103
|
-
"text": "-",
|
9104
|
-
"unknown": true,
|
9105
|
-
"value": "-",
|
9106
|
-
"word": "-"
|
9107
|
-
}
|
8259
|
+
"dead": true,
|
8260
|
+
"level": 2,
|
8261
|
+
"marker": "is",
|
8262
|
+
"number": "many",
|
8263
|
+
"one": {
|
8264
|
+
"dead": true,
|
8265
|
+
"level": 1,
|
8266
|
+
"marker": "unknown",
|
8267
|
+
"number": "many",
|
8268
|
+
"range": {
|
8269
|
+
"end": 20,
|
8270
|
+
"start": 0
|
8271
|
+
},
|
8272
|
+
"text": "formulas",
|
8273
|
+
"types": [
|
8274
|
+
"unknown"
|
9108
8275
|
],
|
9109
|
-
"
|
8276
|
+
"unknown": true,
|
8277
|
+
"value": "formulas",
|
8278
|
+
"word": "formulas"
|
9110
8279
|
},
|
9111
8280
|
"range": {
|
9112
|
-
"end":
|
8281
|
+
"end": 20,
|
9113
8282
|
"start": 0
|
9114
8283
|
},
|
9115
|
-
"text": "
|
8284
|
+
"text": "formulas are concepts",
|
9116
8285
|
"topLevel": true,
|
9117
8286
|
"touchedBy": [
|
9118
|
-
"
|
9119
|
-
"
|
9120
|
-
"
|
9121
|
-
"instance1#dimension#call2"
|
8287
|
+
"formulas#call2",
|
8288
|
+
"instance0#formulas#call2",
|
8289
|
+
"instance0#dimension#call2"
|
9122
8290
|
],
|
9123
8291
|
"two": {
|
9124
|
-
"atomic": true,
|
9125
8292
|
"concept": true,
|
9126
8293
|
"dead": true,
|
9127
8294
|
"level": 1,
|
9128
|
-
"marker": "
|
9129
|
-
"modifier_mathematical": {
|
9130
|
-
"level": 0,
|
9131
|
-
"marker": "mathematical",
|
9132
|
-
"number": "one",
|
9133
|
-
"range": {
|
9134
|
-
"end": 27,
|
9135
|
-
"start": 16
|
9136
|
-
},
|
9137
|
-
"text": "mathematical",
|
9138
|
-
"types": [
|
9139
|
-
"mathematical"
|
9140
|
-
],
|
9141
|
-
"value": "mathematical",
|
9142
|
-
"word": "mathematical"
|
9143
|
-
},
|
9144
|
-
"modifiers": [
|
9145
|
-
"modifier_mathematical"
|
9146
|
-
],
|
9147
|
-
"number": "many",
|
8295
|
+
"marker": "unknown",
|
9148
8296
|
"range": {
|
9149
|
-
"end":
|
9150
|
-
"start":
|
8297
|
+
"end": 20,
|
8298
|
+
"start": 13
|
9151
8299
|
},
|
9152
|
-
"text": "
|
8300
|
+
"text": "concepts",
|
9153
8301
|
"types": [
|
9154
|
-
"
|
9155
|
-
"operator"
|
8302
|
+
"unknown"
|
9156
8303
|
],
|
9157
|
-
"
|
9158
|
-
"
|
8304
|
+
"unknown": true,
|
8305
|
+
"value": "concepts",
|
8306
|
+
"word": "concepts"
|
9159
8307
|
},
|
9160
8308
|
"word": "are"
|
9161
8309
|
},
|
9162
8310
|
"generatedParenthesized": [
|
9163
8311
|
],
|
9164
|
-
"paraphrases": "
|
8312
|
+
"paraphrases": "formulas are concepts",
|
8313
|
+
"paraphrasesParenthesized": [
|
8314
|
+
],
|
8315
|
+
"responses": [
|
8316
|
+
""
|
8317
|
+
]
|
8318
|
+
},
|
8319
|
+
{
|
8320
|
+
"context": {
|
8321
|
+
"concept": {
|
8322
|
+
"dead": true,
|
8323
|
+
"level": 1,
|
8324
|
+
"marker": "unknown",
|
8325
|
+
"range": {
|
8326
|
+
"end": 29,
|
8327
|
+
"start": 22
|
8328
|
+
},
|
8329
|
+
"text": "operator",
|
8330
|
+
"unknown": true,
|
8331
|
+
"value": "operator",
|
8332
|
+
"word": "operator"
|
8333
|
+
},
|
8334
|
+
"dead": true,
|
8335
|
+
"flatten": false,
|
8336
|
+
"level": 1,
|
8337
|
+
"marker": "modifies",
|
8338
|
+
"modifiers": [
|
8339
|
+
{
|
8340
|
+
"dead": true,
|
8341
|
+
"level": 1,
|
8342
|
+
"marker": "unknown",
|
8343
|
+
"range": {
|
8344
|
+
"end": 11,
|
8345
|
+
"start": 0
|
8346
|
+
},
|
8347
|
+
"text": "mathematical",
|
8348
|
+
"unknown": true,
|
8349
|
+
"value": "mathematical",
|
8350
|
+
"word": "mathematical"
|
8351
|
+
}
|
8352
|
+
],
|
8353
|
+
"number": "one",
|
8354
|
+
"range": {
|
8355
|
+
"end": 29,
|
8356
|
+
"start": 0
|
8357
|
+
},
|
8358
|
+
"text": "mathematical modifies operator",
|
8359
|
+
"topLevel": true,
|
8360
|
+
"touchedBy": [
|
8361
|
+
"math#call2",
|
8362
|
+
"instance0#math#call2",
|
8363
|
+
"instance0#formulas#call2",
|
8364
|
+
"instance0#dimension#call2"
|
8365
|
+
],
|
8366
|
+
"word": "modifies"
|
8367
|
+
},
|
8368
|
+
"generatedParenthesized": [
|
8369
|
+
],
|
8370
|
+
"paraphrases": "mathematical modifies operator",
|
9165
8371
|
"paraphrasesParenthesized": [
|
9166
8372
|
],
|
9167
8373
|
"responses": [
|
@@ -11430,12 +10636,6 @@
|
|
11430
10636
|
"ifAble": [
|
11431
10637
|
"orAble"
|
11432
10638
|
],
|
11433
|
-
"mathematical_operator": [
|
11434
|
-
"*",
|
11435
|
-
"+",
|
11436
|
-
"/",
|
11437
|
-
"-"
|
11438
|
-
],
|
11439
10639
|
"object": [
|
11440
10640
|
"unknown",
|
11441
10641
|
"what",
|
@@ -11538,11 +10738,6 @@
|
|
11538
10738
|
"number",
|
11539
10739
|
"orAble",
|
11540
10740
|
"ifAble",
|
11541
|
-
"*",
|
11542
|
-
"mathematical_operator",
|
11543
|
-
"+",
|
11544
|
-
"/",
|
11545
|
-
"-",
|
11546
10741
|
"formula",
|
11547
10742
|
"dimension",
|
11548
10743
|
"unit",
|
@@ -11552,18 +10747,6 @@
|
|
11552
10747
|
"kelvin"
|
11553
10748
|
],
|
11554
10749
|
"parents": {
|
11555
|
-
"*": [
|
11556
|
-
"mathematical_operator"
|
11557
|
-
],
|
11558
|
-
"+": [
|
11559
|
-
"mathematical_operator"
|
11560
|
-
],
|
11561
|
-
"-": [
|
11562
|
-
"mathematical_operator"
|
11563
|
-
],
|
11564
|
-
"/": [
|
11565
|
-
"mathematical_operator"
|
11566
|
-
],
|
11567
10750
|
"a": [
|
11568
10751
|
"articlePOS"
|
11569
10752
|
],
|
@@ -11689,14 +10872,6 @@
|
|
11689
10872
|
"initHandlers": [
|
11690
10873
|
],
|
11691
10874
|
"root": {
|
11692
|
-
"*": {
|
11693
|
-
},
|
11694
|
-
"+": {
|
11695
|
-
},
|
11696
|
-
"-": {
|
11697
|
-
},
|
11698
|
-
"/": {
|
11699
|
-
},
|
11700
10875
|
"a": {
|
11701
10876
|
},
|
11702
10877
|
"articlePOS": {
|
@@ -11731,8 +10906,6 @@
|
|
11731
10906
|
},
|
11732
10907
|
"kelvin": {
|
11733
10908
|
},
|
11734
|
-
"mathematical_operator": {
|
11735
|
-
},
|
11736
10909
|
"modifies": {
|
11737
10910
|
},
|
11738
10911
|
"noun": {
|
@@ -13278,7 +12451,7 @@
|
|
13278
12451
|
"word": "are"
|
13279
12452
|
},
|
13280
12453
|
"error": [
|
13281
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
12454
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
13282
12455
|
],
|
13283
12456
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
13284
12457
|
"isResponse": true,
|
@@ -13925,12 +13098,6 @@
|
|
13925
13098
|
"ifAble": [
|
13926
13099
|
"orAble"
|
13927
13100
|
],
|
13928
|
-
"mathematical_operator": [
|
13929
|
-
"*",
|
13930
|
-
"+",
|
13931
|
-
"/",
|
13932
|
-
"-"
|
13933
|
-
],
|
13934
13101
|
"object": [
|
13935
13102
|
"unknown",
|
13936
13103
|
"what",
|
@@ -14032,11 +13199,6 @@
|
|
14032
13199
|
"number",
|
14033
13200
|
"orAble",
|
14034
13201
|
"ifAble",
|
14035
|
-
"*",
|
14036
|
-
"mathematical_operator",
|
14037
|
-
"+",
|
14038
|
-
"/",
|
14039
|
-
"-",
|
14040
13202
|
"formula",
|
14041
13203
|
"dimension",
|
14042
13204
|
"unit",
|
@@ -14045,18 +13207,6 @@
|
|
14045
13207
|
"b1"
|
14046
13208
|
],
|
14047
13209
|
"parents": {
|
14048
|
-
"*": [
|
14049
|
-
"mathematical_operator"
|
14050
|
-
],
|
14051
|
-
"+": [
|
14052
|
-
"mathematical_operator"
|
14053
|
-
],
|
14054
|
-
"-": [
|
14055
|
-
"mathematical_operator"
|
14056
|
-
],
|
14057
|
-
"/": [
|
14058
|
-
"mathematical_operator"
|
14059
|
-
],
|
14060
13210
|
"a": [
|
14061
13211
|
"articlePOS"
|
14062
13212
|
],
|
@@ -14179,14 +13329,6 @@
|
|
14179
13329
|
"initHandlers": [
|
14180
13330
|
],
|
14181
13331
|
"root": {
|
14182
|
-
"*": {
|
14183
|
-
},
|
14184
|
-
"+": {
|
14185
|
-
},
|
14186
|
-
"-": {
|
14187
|
-
},
|
14188
|
-
"/": {
|
14189
|
-
},
|
14190
13332
|
"a": {
|
14191
13333
|
},
|
14192
13334
|
"a1": {
|
@@ -14221,8 +13363,6 @@
|
|
14221
13363
|
},
|
14222
13364
|
"it": {
|
14223
13365
|
},
|
14224
|
-
"mathematical_operator": {
|
14225
|
-
},
|
14226
13366
|
"modifies": {
|
14227
13367
|
},
|
14228
13368
|
"noun": {
|
@@ -14460,7 +13600,7 @@
|
|
14460
13600
|
"word": "are"
|
14461
13601
|
},
|
14462
13602
|
"error": [
|
14463
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
13603
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
14464
13604
|
],
|
14465
13605
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
14466
13606
|
"isResponse": true,
|
@@ -14883,136 +14023,56 @@
|
|
14883
14023
|
},
|
14884
14024
|
{
|
14885
14025
|
"context": {
|
14886
|
-
"
|
14887
|
-
|
14888
|
-
"marker": "is",
|
14889
|
-
"number": "many",
|
14890
|
-
"one": {
|
14891
|
-
"default": true,
|
14892
|
-
"isList": true,
|
14026
|
+
"concept": {
|
14027
|
+
"dead": true,
|
14893
14028
|
"level": 1,
|
14894
|
-
"
|
14895
|
-
"marker": "list",
|
14896
|
-
"number": "many",
|
14029
|
+
"marker": "unknown",
|
14897
14030
|
"range": {
|
14898
|
-
"end":
|
14899
|
-
"start":
|
14031
|
+
"end": 29,
|
14032
|
+
"start": 22
|
14900
14033
|
},
|
14901
|
-
"text": "
|
14902
|
-
"
|
14903
|
-
|
14904
|
-
|
14905
|
-
],
|
14906
|
-
"value": [
|
14907
|
-
{
|
14908
|
-
"dead": true,
|
14909
|
-
"level": 1,
|
14910
|
-
"marker": "unknown",
|
14911
|
-
"range": {
|
14912
|
-
"end": 0,
|
14913
|
-
"start": 0
|
14914
|
-
},
|
14915
|
-
"text": "*",
|
14916
|
-
"unknown": true,
|
14917
|
-
"value": "*",
|
14918
|
-
"word": "*"
|
14919
|
-
},
|
14920
|
-
{
|
14921
|
-
"dead": true,
|
14922
|
-
"level": 1,
|
14923
|
-
"marker": "unknown",
|
14924
|
-
"range": {
|
14925
|
-
"end": 2,
|
14926
|
-
"start": 2
|
14927
|
-
},
|
14928
|
-
"text": "+",
|
14929
|
-
"unknown": true,
|
14930
|
-
"value": "+",
|
14931
|
-
"word": "+"
|
14932
|
-
},
|
14933
|
-
{
|
14934
|
-
"dead": true,
|
14935
|
-
"level": 1,
|
14936
|
-
"marker": "unknown",
|
14937
|
-
"range": {
|
14938
|
-
"end": 4,
|
14939
|
-
"start": 4
|
14940
|
-
},
|
14941
|
-
"text": "/",
|
14942
|
-
"unknown": true,
|
14943
|
-
"value": "/",
|
14944
|
-
"word": "/"
|
14945
|
-
},
|
14946
|
-
{
|
14947
|
-
"dead": true,
|
14948
|
-
"level": 1,
|
14949
|
-
"marker": "unknown",
|
14950
|
-
"range": {
|
14951
|
-
"end": 10,
|
14952
|
-
"start": 10
|
14953
|
-
},
|
14954
|
-
"text": "-",
|
14955
|
-
"unknown": true,
|
14956
|
-
"value": "-",
|
14957
|
-
"word": "-"
|
14958
|
-
}
|
14959
|
-
],
|
14960
|
-
"word": "and"
|
14034
|
+
"text": "operator",
|
14035
|
+
"unknown": true,
|
14036
|
+
"value": "operator",
|
14037
|
+
"word": "operator"
|
14961
14038
|
},
|
14039
|
+
"dead": true,
|
14040
|
+
"flatten": false,
|
14041
|
+
"level": 1,
|
14042
|
+
"marker": "modifies",
|
14043
|
+
"modifiers": [
|
14044
|
+
{
|
14045
|
+
"dead": true,
|
14046
|
+
"level": 1,
|
14047
|
+
"marker": "unknown",
|
14048
|
+
"range": {
|
14049
|
+
"end": 11,
|
14050
|
+
"start": 0
|
14051
|
+
},
|
14052
|
+
"text": "mathematical",
|
14053
|
+
"unknown": true,
|
14054
|
+
"value": "mathematical",
|
14055
|
+
"word": "mathematical"
|
14056
|
+
}
|
14057
|
+
],
|
14058
|
+
"number": "one",
|
14962
14059
|
"range": {
|
14963
|
-
"end":
|
14060
|
+
"end": 29,
|
14964
14061
|
"start": 0
|
14965
14062
|
},
|
14966
|
-
"text": "
|
14063
|
+
"text": "mathematical modifies operator",
|
14967
14064
|
"topLevel": true,
|
14968
14065
|
"touchedBy": [
|
14969
14066
|
"math#call2",
|
14970
|
-
"
|
14971
|
-
"
|
14972
|
-
"
|
14067
|
+
"instance0#math#call2",
|
14068
|
+
"instance0#formulas#call2",
|
14069
|
+
"instance0#dimension#call2"
|
14973
14070
|
],
|
14974
|
-
"
|
14975
|
-
"atomic": true,
|
14976
|
-
"concept": true,
|
14977
|
-
"dead": true,
|
14978
|
-
"level": 1,
|
14979
|
-
"marker": "mathematical_operator",
|
14980
|
-
"modifier_mathematical": {
|
14981
|
-
"level": 0,
|
14982
|
-
"marker": "mathematical",
|
14983
|
-
"number": "one",
|
14984
|
-
"range": {
|
14985
|
-
"end": 27,
|
14986
|
-
"start": 16
|
14987
|
-
},
|
14988
|
-
"text": "mathematical",
|
14989
|
-
"types": [
|
14990
|
-
"mathematical"
|
14991
|
-
],
|
14992
|
-
"value": "mathematical",
|
14993
|
-
"word": "mathematical"
|
14994
|
-
},
|
14995
|
-
"modifiers": [
|
14996
|
-
"modifier_mathematical"
|
14997
|
-
],
|
14998
|
-
"number": "many",
|
14999
|
-
"range": {
|
15000
|
-
"end": 37,
|
15001
|
-
"start": 16
|
15002
|
-
},
|
15003
|
-
"text": "mathematical operators",
|
15004
|
-
"types": [
|
15005
|
-
"mathematical_operator",
|
15006
|
-
"operator"
|
15007
|
-
],
|
15008
|
-
"value": "mathematical_operator",
|
15009
|
-
"word": "operators"
|
15010
|
-
},
|
15011
|
-
"word": "are"
|
14071
|
+
"word": "modifies"
|
15012
14072
|
},
|
15013
14073
|
"generatedParenthesized": [
|
15014
14074
|
],
|
15015
|
-
"paraphrases": "
|
14075
|
+
"paraphrases": "mathematical modifies operator",
|
15016
14076
|
"paraphrasesParenthesized": [
|
15017
14077
|
],
|
15018
14078
|
"responses": [
|
@@ -15397,7 +14457,7 @@
|
|
15397
14457
|
"word": "are"
|
15398
14458
|
},
|
15399
14459
|
"error": [
|
15400
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
14460
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
15401
14461
|
],
|
15402
14462
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
15403
14463
|
"isResponse": true,
|
@@ -16347,12 +15407,6 @@
|
|
16347
15407
|
"ifAble": [
|
16348
15408
|
"orAble"
|
16349
15409
|
],
|
16350
|
-
"mathematical_operator": [
|
16351
|
-
"*",
|
16352
|
-
"+",
|
16353
|
-
"/",
|
16354
|
-
"-"
|
16355
|
-
],
|
16356
15410
|
"object": [
|
16357
15411
|
"unknown",
|
16358
15412
|
"what",
|
@@ -16454,11 +15508,6 @@
|
|
16454
15508
|
"number",
|
16455
15509
|
"orAble",
|
16456
15510
|
"ifAble",
|
16457
|
-
"*",
|
16458
|
-
"mathematical_operator",
|
16459
|
-
"+",
|
16460
|
-
"/",
|
16461
|
-
"-",
|
16462
15511
|
"formula",
|
16463
15512
|
"dimension",
|
16464
15513
|
"unit",
|
@@ -16467,18 +15516,6 @@
|
|
16467
15516
|
"b1"
|
16468
15517
|
],
|
16469
15518
|
"parents": {
|
16470
|
-
"*": [
|
16471
|
-
"mathematical_operator"
|
16472
|
-
],
|
16473
|
-
"+": [
|
16474
|
-
"mathematical_operator"
|
16475
|
-
],
|
16476
|
-
"-": [
|
16477
|
-
"mathematical_operator"
|
16478
|
-
],
|
16479
|
-
"/": [
|
16480
|
-
"mathematical_operator"
|
16481
|
-
],
|
16482
15519
|
"a": [
|
16483
15520
|
"articlePOS"
|
16484
15521
|
],
|
@@ -16601,14 +15638,6 @@
|
|
16601
15638
|
"initHandlers": [
|
16602
15639
|
],
|
16603
15640
|
"root": {
|
16604
|
-
"*": {
|
16605
|
-
},
|
16606
|
-
"+": {
|
16607
|
-
},
|
16608
|
-
"-": {
|
16609
|
-
},
|
16610
|
-
"/": {
|
16611
|
-
},
|
16612
15641
|
"a": {
|
16613
15642
|
},
|
16614
15643
|
"a1": {
|
@@ -16643,8 +15672,6 @@
|
|
16643
15672
|
},
|
16644
15673
|
"it": {
|
16645
15674
|
},
|
16646
|
-
"mathematical_operator": {
|
16647
|
-
},
|
16648
15675
|
"modifies": {
|
16649
15676
|
},
|
16650
15677
|
"noun": {
|
@@ -17103,7 +16130,7 @@
|
|
17103
16130
|
"word": "are"
|
17104
16131
|
},
|
17105
16132
|
"error": [
|
17106
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
16133
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
17107
16134
|
],
|
17108
16135
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
17109
16136
|
"isResponse": true,
|
@@ -17863,7 +16890,7 @@
|
|
17863
16890
|
"word": "are"
|
17864
16891
|
},
|
17865
16892
|
"error": [
|
17866
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
16893
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
17867
16894
|
],
|
17868
16895
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
17869
16896
|
"isResponse": true,
|
@@ -18581,12 +17608,6 @@
|
|
18581
17608
|
"ifAble": [
|
18582
17609
|
"orAble"
|
18583
17610
|
],
|
18584
|
-
"mathematical_operator": [
|
18585
|
-
"*",
|
18586
|
-
"+",
|
18587
|
-
"/",
|
18588
|
-
"-"
|
18589
|
-
],
|
18590
17611
|
"object": [
|
18591
17612
|
"unknown",
|
18592
17613
|
"what",
|
@@ -18688,11 +17709,6 @@
|
|
18688
17709
|
"number",
|
18689
17710
|
"orAble",
|
18690
17711
|
"ifAble",
|
18691
|
-
"*",
|
18692
|
-
"mathematical_operator",
|
18693
|
-
"+",
|
18694
|
-
"/",
|
18695
|
-
"-",
|
18696
17712
|
"formula",
|
18697
17713
|
"dimension",
|
18698
17714
|
"unit",
|
@@ -18701,18 +17717,6 @@
|
|
18701
17717
|
"b1"
|
18702
17718
|
],
|
18703
17719
|
"parents": {
|
18704
|
-
"*": [
|
18705
|
-
"mathematical_operator"
|
18706
|
-
],
|
18707
|
-
"+": [
|
18708
|
-
"mathematical_operator"
|
18709
|
-
],
|
18710
|
-
"-": [
|
18711
|
-
"mathematical_operator"
|
18712
|
-
],
|
18713
|
-
"/": [
|
18714
|
-
"mathematical_operator"
|
18715
|
-
],
|
18716
17720
|
"a": [
|
18717
17721
|
"articlePOS"
|
18718
17722
|
],
|
@@ -18835,14 +17839,6 @@
|
|
18835
17839
|
"initHandlers": [
|
18836
17840
|
],
|
18837
17841
|
"root": {
|
18838
|
-
"*": {
|
18839
|
-
},
|
18840
|
-
"+": {
|
18841
|
-
},
|
18842
|
-
"-": {
|
18843
|
-
},
|
18844
|
-
"/": {
|
18845
|
-
},
|
18846
17842
|
"a": {
|
18847
17843
|
},
|
18848
17844
|
"a1": {
|
@@ -18877,8 +17873,6 @@
|
|
18877
17873
|
},
|
18878
17874
|
"it": {
|
18879
17875
|
},
|
18880
|
-
"mathematical_operator": {
|
18881
|
-
},
|
18882
17876
|
"modifies": {
|
18883
17877
|
},
|
18884
17878
|
"noun": {
|
@@ -19181,7 +18175,7 @@
|
|
19181
18175
|
"word": "are"
|
19182
18176
|
},
|
19183
18177
|
"error": [
|
19184
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:717'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:374:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:192:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1007:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:203:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:740:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = e(from).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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, ({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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
18178
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708\"\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 \"query\": [\n \"what\"\n ],\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\": 19\n },\n \"dead\": true,\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1\n },\n \"dead\": true,\n \"level\": 2,\n \"topLevel\": true\n}.\nError applying semantics 'what x is y?/home/dev/code/theprogrammablemind/kms/common/dialogues.js:708'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:117\"\n to\n {\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\": \"dimension\",\n \"unit\": {\n \"value\": \"a1\",\n \"number\": \"one\",\n \"text\": \"a1\",\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\": 1\n },\n \"value\": 10,\n \"amount\": {\n \"value\": 10,\n \"instance\": true,\n \"text\": \"10\",\n \"marker\": \"number\",\n \"word\": \"10\",\n \"range\": {\n \"start\": 9,\n \"end\": 10\n },\n \"dead\": true,\n \"types\": [\n \"number\"\n ],\n \"level\": 1\n },\n \"text\": \"10 a1\",\n \"range\": {\n \"start\": 9,\n \"end\": 13\n },\n \"dead\": true,\n \"types\": [\n \"dimension\"\n ],\n \"level\": 1\n },\n \"to\": {\n \"value\": \"b1\",\n \"number\": \"one\",\n \"text\": \"b1\",\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\": 1\n },\n \"types\": [\n \"convertToUnits\"\n ],\n \"level\": 1,\n \"evaluate\": true\n}.\nError applying semantics '/home/dev/code/theprogrammablemind/kms/common/dimension.js:117'. Error is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true} stack is Error: {\"marker\":\"reason\",\"focusableForPhrase\":true,\"evalue\":{\"marker\":\"noconversion\",\"from\":{\"value\":\"a1\",\"number\":\"one\",\"text\":\"a1\",\"marker\":\"a1\",\"word\":\"a1\",\"range\":{\"start\":12,\"end\":13},\"dead\":true,\"types\":[\"a1\"],\"level\":1},\"to\":{\"value\":\"b1\",\"number\":\"one\",\"text\":\"b1\",\"marker\":\"b1\",\"word\":\"b1\",\"range\":{\"start\":18,\"end\":19},\"dead\":true,\"types\":[\"b1\"],\"level\":1}},\"pullFromContext\":false,\"fromSTM\":true}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:169:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:144:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:387:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:16)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:207:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:325:14)\n at async Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:1009:22)\n at async Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:731:24)\n at async Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:127:5). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, async ({context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n const from = context.from;\n const to = context.to;\n let evalue;\n let efrom = from\n if (!from.unit) {\n efrom = (await e(from)).evalue\n }\n if (to.value == efrom.unit.value) {\n evalue = efrom.amount\n } else {\n const formula = kms.formulas.api.get(to, [efrom.unit])\n if (!formula) {\n const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }\n kms.stm.api.mentioned(reason)\n error(reason)\n }\n kms.stm.api.setVariable(efrom.unit.value, efrom.amount)\n evalue = await e(formula)\n }\n /*\n '{\n \"marker\":\"dimension\",\n \"unit\":{\"marker\":\"unit\",\"range\":{\"start\":19,\"end\":25},\"word\":\"celcius\",\"text\":\"celcius\",\"value\":\"celcius\",\"unknown\":true,\"types\":[\"unit\",\"unknown\"]},\n \"value\":10,\n \"amount\":{\"word\":\"degrees\",\"number\":\"many\",\"text\":\"10 degrees\",\"marker\":\"degree\",\"range\":{\"start\":8,\"end\":17},\"value\":10,\"amount\":{\"value\":10,\"text\":\"10\",\"marker\":\"number\",\"word\":\"10\",\"range\":{\"start\":8,\"end\":9},\"types\":[\"number\"]}},\n \"text\":\"10 degrees celcius\",\"range\":{\"start\":8,\"end\":25}}'\n */\n context.evalue = { \n paraphrase: true,\n marker: 'dimension',\n level: 1,\n unit: to,\n amount: { evalue, paraphrase: undefined }\n }\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.mentioned(concept)\n // TODO wtf is the next line?\n value = JSON.parse(JSON.stringify(value))\n let instance = await e(value)\n if (false && instance.evalue) {\n km('stm').api.mentioned(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.'"
|
19185
18179
|
],
|
19186
18180
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
19187
18181
|
"isResponse": true,
|