ekms 7.12.4 → 7.12.5-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +96 -0
- package/common/crew.instance.json +480 -0
- package/common/dialogues.js +45 -2
- package/common/dialogues.test.json +780 -0
- package/common/dimension.test.json +170 -26
- package/common/dimensionTemplate.instance.json +4 -0
- package/common/edible.instance.json +1508 -0
- package/common/emotions.instance.json +4 -0
- package/common/fastfood.instance.json +27642 -427
- package/common/fastfood.js +332 -66
- package/common/fastfood.test.json +85364 -916
- package/common/formulasTemplate.instance.json +4 -0
- package/common/help.test.json +26 -8
- package/common/helpers/concept.js +10 -1
- package/common/hierarchy.js +1 -1
- package/common/kirk.instance.json +20 -0
- package/common/length.instance.json +240 -0
- package/common/mathTemplate.instance.json +68 -0
- package/common/ordering.instance.json +60 -0
- package/common/people.instance.json +128 -0
- package/common/pokemon.instance.json +312 -0
- package/common/pressure.instance.json +48 -0
- package/common/properties.instance.json +4 -0
- package/common/reports.instance.json +25 -1
- package/common/reports.js +3 -2
- package/common/scorekeeper.test.json +299 -124
- package/common/spock.instance.json +20 -0
- package/common/stm.js +21 -6
- package/common/temperature.instance.json +104 -192
- package/common/ui.instance.json +12 -0
- package/common/weight.instance.json +300 -0
- package/package.json +2 -2
@@ -186,7 +186,8 @@
|
|
186
186
|
"whose"
|
187
187
|
],
|
188
188
|
"preposition": [
|
189
|
-
"between"
|
189
|
+
"between",
|
190
|
+
"to"
|
190
191
|
],
|
191
192
|
"pronoun": [
|
192
193
|
"it",
|
@@ -208,7 +209,8 @@
|
|
208
209
|
"whatAble",
|
209
210
|
"this",
|
210
211
|
"thisitthat",
|
211
|
-
"reason"
|
212
|
+
"reason",
|
213
|
+
"number"
|
212
214
|
],
|
213
215
|
"theAble": [
|
214
216
|
"property",
|
@@ -266,12 +268,14 @@
|
|
266
268
|
"whatAble",
|
267
269
|
"is",
|
268
270
|
"toAble",
|
271
|
+
"to",
|
269
272
|
"noun",
|
270
273
|
"thisitthat",
|
271
274
|
"reason",
|
272
275
|
"that",
|
273
276
|
"orAble",
|
274
277
|
"ifAble",
|
278
|
+
"number",
|
275
279
|
"*",
|
276
280
|
"mathematical_operator",
|
277
281
|
"+",
|
@@ -333,6 +337,9 @@
|
|
333
337
|
"noun": [
|
334
338
|
"theAble"
|
335
339
|
],
|
340
|
+
"number": [
|
341
|
+
"queryable"
|
342
|
+
],
|
336
343
|
"object": [
|
337
344
|
"queryable",
|
338
345
|
"theAble"
|
@@ -369,6 +376,9 @@
|
|
369
376
|
"thisitthat": [
|
370
377
|
"queryable"
|
371
378
|
],
|
379
|
+
"to": [
|
380
|
+
"preposition"
|
381
|
+
],
|
372
382
|
"unit": [
|
373
383
|
"concept"
|
374
384
|
],
|
@@ -441,6 +451,8 @@
|
|
441
451
|
},
|
442
452
|
"noun": {
|
443
453
|
},
|
454
|
+
"number": {
|
455
|
+
},
|
444
456
|
"object": {
|
445
457
|
},
|
446
458
|
"orAble": {
|
@@ -471,6 +483,8 @@
|
|
471
483
|
},
|
472
484
|
"thisitthat": {
|
473
485
|
},
|
486
|
+
"to": {
|
487
|
+
},
|
474
488
|
"toAble": {
|
475
489
|
},
|
476
490
|
"unit": {
|
@@ -1052,7 +1066,8 @@
|
|
1052
1066
|
"whose"
|
1053
1067
|
],
|
1054
1068
|
"preposition": [
|
1055
|
-
"between"
|
1069
|
+
"between",
|
1070
|
+
"to"
|
1056
1071
|
],
|
1057
1072
|
"pronoun": [
|
1058
1073
|
"it",
|
@@ -1074,7 +1089,8 @@
|
|
1074
1089
|
"whatAble",
|
1075
1090
|
"this",
|
1076
1091
|
"thisitthat",
|
1077
|
-
"reason"
|
1092
|
+
"reason",
|
1093
|
+
"number"
|
1078
1094
|
],
|
1079
1095
|
"theAble": [
|
1080
1096
|
"property",
|
@@ -1132,12 +1148,14 @@
|
|
1132
1148
|
"whatAble",
|
1133
1149
|
"is",
|
1134
1150
|
"toAble",
|
1151
|
+
"to",
|
1135
1152
|
"noun",
|
1136
1153
|
"thisitthat",
|
1137
1154
|
"reason",
|
1138
1155
|
"that",
|
1139
1156
|
"orAble",
|
1140
1157
|
"ifAble",
|
1158
|
+
"number",
|
1141
1159
|
"*",
|
1142
1160
|
"mathematical_operator",
|
1143
1161
|
"+",
|
@@ -1199,6 +1217,9 @@
|
|
1199
1217
|
"noun": [
|
1200
1218
|
"theAble"
|
1201
1219
|
],
|
1220
|
+
"number": [
|
1221
|
+
"queryable"
|
1222
|
+
],
|
1202
1223
|
"object": [
|
1203
1224
|
"queryable",
|
1204
1225
|
"theAble"
|
@@ -1235,6 +1256,9 @@
|
|
1235
1256
|
"thisitthat": [
|
1236
1257
|
"queryable"
|
1237
1258
|
],
|
1259
|
+
"to": [
|
1260
|
+
"preposition"
|
1261
|
+
],
|
1238
1262
|
"unit": [
|
1239
1263
|
"concept"
|
1240
1264
|
],
|
@@ -1307,6 +1331,8 @@
|
|
1307
1331
|
},
|
1308
1332
|
"noun": {
|
1309
1333
|
},
|
1334
|
+
"number": {
|
1335
|
+
},
|
1310
1336
|
"object": {
|
1311
1337
|
},
|
1312
1338
|
"orAble": {
|
@@ -1337,6 +1363,8 @@
|
|
1337
1363
|
},
|
1338
1364
|
"thisitthat": {
|
1339
1365
|
},
|
1366
|
+
"to": {
|
1367
|
+
},
|
1340
1368
|
"toAble": {
|
1341
1369
|
},
|
1342
1370
|
"unit": {
|
@@ -2633,7 +2661,8 @@
|
|
2633
2661
|
"whose"
|
2634
2662
|
],
|
2635
2663
|
"preposition": [
|
2636
|
-
"between"
|
2664
|
+
"between",
|
2665
|
+
"to"
|
2637
2666
|
],
|
2638
2667
|
"pronoun": [
|
2639
2668
|
"it",
|
@@ -2655,7 +2684,8 @@
|
|
2655
2684
|
"whatAble",
|
2656
2685
|
"this",
|
2657
2686
|
"thisitthat",
|
2658
|
-
"reason"
|
2687
|
+
"reason",
|
2688
|
+
"number"
|
2659
2689
|
],
|
2660
2690
|
"theAble": [
|
2661
2691
|
"property",
|
@@ -2718,12 +2748,14 @@
|
|
2718
2748
|
"whatAble",
|
2719
2749
|
"is",
|
2720
2750
|
"toAble",
|
2751
|
+
"to",
|
2721
2752
|
"noun",
|
2722
2753
|
"thisitthat",
|
2723
2754
|
"reason",
|
2724
2755
|
"that",
|
2725
2756
|
"orAble",
|
2726
2757
|
"ifAble",
|
2758
|
+
"number",
|
2727
2759
|
"*",
|
2728
2760
|
"mathematical_operator",
|
2729
2761
|
"+",
|
@@ -2798,6 +2830,9 @@
|
|
2798
2830
|
"noun": [
|
2799
2831
|
"theAble"
|
2800
2832
|
],
|
2833
|
+
"number": [
|
2834
|
+
"queryable"
|
2835
|
+
],
|
2801
2836
|
"object": [
|
2802
2837
|
"queryable",
|
2803
2838
|
"theAble"
|
@@ -2837,6 +2872,9 @@
|
|
2837
2872
|
"thisitthat": [
|
2838
2873
|
"queryable"
|
2839
2874
|
],
|
2875
|
+
"to": [
|
2876
|
+
"preposition"
|
2877
|
+
],
|
2840
2878
|
"unit": [
|
2841
2879
|
"concept"
|
2842
2880
|
],
|
@@ -2915,6 +2953,8 @@
|
|
2915
2953
|
},
|
2916
2954
|
"noun": {
|
2917
2955
|
},
|
2956
|
+
"number": {
|
2957
|
+
},
|
2918
2958
|
"object": {
|
2919
2959
|
},
|
2920
2960
|
"orAble": {
|
@@ -2947,6 +2987,8 @@
|
|
2947
2987
|
},
|
2948
2988
|
"thisitthat": {
|
2949
2989
|
},
|
2990
|
+
"to": {
|
2991
|
+
},
|
2950
2992
|
"toAble": {
|
2951
2993
|
},
|
2952
2994
|
"unit": {
|
@@ -4427,7 +4469,8 @@
|
|
4427
4469
|
"whose"
|
4428
4470
|
],
|
4429
4471
|
"preposition": [
|
4430
|
-
"between"
|
4472
|
+
"between",
|
4473
|
+
"to"
|
4431
4474
|
],
|
4432
4475
|
"pronoun": [
|
4433
4476
|
"it",
|
@@ -4449,7 +4492,8 @@
|
|
4449
4492
|
"whatAble",
|
4450
4493
|
"this",
|
4451
4494
|
"thisitthat",
|
4452
|
-
"reason"
|
4495
|
+
"reason",
|
4496
|
+
"number"
|
4453
4497
|
],
|
4454
4498
|
"theAble": [
|
4455
4499
|
"property",
|
@@ -4512,12 +4556,14 @@
|
|
4512
4556
|
"whatAble",
|
4513
4557
|
"is",
|
4514
4558
|
"toAble",
|
4559
|
+
"to",
|
4515
4560
|
"noun",
|
4516
4561
|
"thisitthat",
|
4517
4562
|
"reason",
|
4518
4563
|
"that",
|
4519
4564
|
"orAble",
|
4520
4565
|
"ifAble",
|
4566
|
+
"number",
|
4521
4567
|
"*",
|
4522
4568
|
"mathematical_operator",
|
4523
4569
|
"+",
|
@@ -4592,6 +4638,9 @@
|
|
4592
4638
|
"noun": [
|
4593
4639
|
"theAble"
|
4594
4640
|
],
|
4641
|
+
"number": [
|
4642
|
+
"queryable"
|
4643
|
+
],
|
4595
4644
|
"object": [
|
4596
4645
|
"queryable",
|
4597
4646
|
"theAble"
|
@@ -4631,6 +4680,9 @@
|
|
4631
4680
|
"thisitthat": [
|
4632
4681
|
"queryable"
|
4633
4682
|
],
|
4683
|
+
"to": [
|
4684
|
+
"preposition"
|
4685
|
+
],
|
4634
4686
|
"unit": [
|
4635
4687
|
"concept"
|
4636
4688
|
],
|
@@ -4709,6 +4761,8 @@
|
|
4709
4761
|
},
|
4710
4762
|
"noun": {
|
4711
4763
|
},
|
4764
|
+
"number": {
|
4765
|
+
},
|
4712
4766
|
"object": {
|
4713
4767
|
},
|
4714
4768
|
"orAble": {
|
@@ -4741,6 +4795,8 @@
|
|
4741
4795
|
},
|
4742
4796
|
"thisitthat": {
|
4743
4797
|
},
|
4798
|
+
"to": {
|
4799
|
+
},
|
4744
4800
|
"toAble": {
|
4745
4801
|
},
|
4746
4802
|
"unit": {
|
@@ -6260,7 +6316,8 @@
|
|
6260
6316
|
"whose"
|
6261
6317
|
],
|
6262
6318
|
"preposition": [
|
6263
|
-
"between"
|
6319
|
+
"between",
|
6320
|
+
"to"
|
6264
6321
|
],
|
6265
6322
|
"pronoun": [
|
6266
6323
|
"it",
|
@@ -6282,7 +6339,8 @@
|
|
6282
6339
|
"whatAble",
|
6283
6340
|
"this",
|
6284
6341
|
"thisitthat",
|
6285
|
-
"reason"
|
6342
|
+
"reason",
|
6343
|
+
"number"
|
6286
6344
|
],
|
6287
6345
|
"theAble": [
|
6288
6346
|
"property",
|
@@ -6345,12 +6403,14 @@
|
|
6345
6403
|
"whatAble",
|
6346
6404
|
"is",
|
6347
6405
|
"toAble",
|
6406
|
+
"to",
|
6348
6407
|
"noun",
|
6349
6408
|
"thisitthat",
|
6350
6409
|
"reason",
|
6351
6410
|
"that",
|
6352
6411
|
"orAble",
|
6353
6412
|
"ifAble",
|
6413
|
+
"number",
|
6354
6414
|
"*",
|
6355
6415
|
"mathematical_operator",
|
6356
6416
|
"+",
|
@@ -6425,6 +6485,9 @@
|
|
6425
6485
|
"noun": [
|
6426
6486
|
"theAble"
|
6427
6487
|
],
|
6488
|
+
"number": [
|
6489
|
+
"queryable"
|
6490
|
+
],
|
6428
6491
|
"object": [
|
6429
6492
|
"queryable",
|
6430
6493
|
"theAble"
|
@@ -6464,6 +6527,9 @@
|
|
6464
6527
|
"thisitthat": [
|
6465
6528
|
"queryable"
|
6466
6529
|
],
|
6530
|
+
"to": [
|
6531
|
+
"preposition"
|
6532
|
+
],
|
6467
6533
|
"unit": [
|
6468
6534
|
"concept"
|
6469
6535
|
],
|
@@ -6542,6 +6608,8 @@
|
|
6542
6608
|
},
|
6543
6609
|
"noun": {
|
6544
6610
|
},
|
6611
|
+
"number": {
|
6612
|
+
},
|
6545
6613
|
"object": {
|
6546
6614
|
},
|
6547
6615
|
"orAble": {
|
@@ -6574,6 +6642,8 @@
|
|
6574
6642
|
},
|
6575
6643
|
"thisitthat": {
|
6576
6644
|
},
|
6645
|
+
"to": {
|
6646
|
+
},
|
6577
6647
|
"toAble": {
|
6578
6648
|
},
|
6579
6649
|
"unit": {
|
@@ -8238,7 +8308,8 @@
|
|
8238
8308
|
"whose"
|
8239
8309
|
],
|
8240
8310
|
"preposition": [
|
8241
|
-
"between"
|
8311
|
+
"between",
|
8312
|
+
"to"
|
8242
8313
|
],
|
8243
8314
|
"pronoun": [
|
8244
8315
|
"it",
|
@@ -8260,7 +8331,8 @@
|
|
8260
8331
|
"whatAble",
|
8261
8332
|
"this",
|
8262
8333
|
"thisitthat",
|
8263
|
-
"reason"
|
8334
|
+
"reason",
|
8335
|
+
"number"
|
8264
8336
|
],
|
8265
8337
|
"theAble": [
|
8266
8338
|
"property",
|
@@ -8323,12 +8395,14 @@
|
|
8323
8395
|
"whatAble",
|
8324
8396
|
"is",
|
8325
8397
|
"toAble",
|
8398
|
+
"to",
|
8326
8399
|
"noun",
|
8327
8400
|
"thisitthat",
|
8328
8401
|
"reason",
|
8329
8402
|
"that",
|
8330
8403
|
"orAble",
|
8331
8404
|
"ifAble",
|
8405
|
+
"number",
|
8332
8406
|
"*",
|
8333
8407
|
"mathematical_operator",
|
8334
8408
|
"+",
|
@@ -8403,6 +8477,9 @@
|
|
8403
8477
|
"noun": [
|
8404
8478
|
"theAble"
|
8405
8479
|
],
|
8480
|
+
"number": [
|
8481
|
+
"queryable"
|
8482
|
+
],
|
8406
8483
|
"object": [
|
8407
8484
|
"queryable",
|
8408
8485
|
"theAble"
|
@@ -8442,6 +8519,9 @@
|
|
8442
8519
|
"thisitthat": [
|
8443
8520
|
"queryable"
|
8444
8521
|
],
|
8522
|
+
"to": [
|
8523
|
+
"preposition"
|
8524
|
+
],
|
8445
8525
|
"unit": [
|
8446
8526
|
"concept"
|
8447
8527
|
],
|
@@ -8520,6 +8600,8 @@
|
|
8520
8600
|
},
|
8521
8601
|
"noun": {
|
8522
8602
|
},
|
8603
|
+
"number": {
|
8604
|
+
},
|
8523
8605
|
"object": {
|
8524
8606
|
},
|
8525
8607
|
"orAble": {
|
@@ -8552,6 +8634,8 @@
|
|
8552
8634
|
},
|
8553
8635
|
"thisitthat": {
|
8554
8636
|
},
|
8637
|
+
"to": {
|
8638
|
+
},
|
8555
8639
|
"toAble": {
|
8556
8640
|
},
|
8557
8641
|
"unit": {
|
@@ -11525,7 +11609,8 @@
|
|
11525
11609
|
"whose"
|
11526
11610
|
],
|
11527
11611
|
"preposition": [
|
11528
|
-
"between"
|
11612
|
+
"between",
|
11613
|
+
"to"
|
11529
11614
|
],
|
11530
11615
|
"pronoun": [
|
11531
11616
|
"it",
|
@@ -11547,7 +11632,8 @@
|
|
11547
11632
|
"whatAble",
|
11548
11633
|
"this",
|
11549
11634
|
"thisitthat",
|
11550
|
-
"reason"
|
11635
|
+
"reason",
|
11636
|
+
"number"
|
11551
11637
|
],
|
11552
11638
|
"theAble": [
|
11553
11639
|
"property",
|
@@ -11610,12 +11696,14 @@
|
|
11610
11696
|
"whatAble",
|
11611
11697
|
"is",
|
11612
11698
|
"toAble",
|
11699
|
+
"to",
|
11613
11700
|
"noun",
|
11614
11701
|
"thisitthat",
|
11615
11702
|
"reason",
|
11616
11703
|
"that",
|
11617
11704
|
"orAble",
|
11618
11705
|
"ifAble",
|
11706
|
+
"number",
|
11619
11707
|
"*",
|
11620
11708
|
"mathematical_operator",
|
11621
11709
|
"+",
|
@@ -11690,6 +11778,9 @@
|
|
11690
11778
|
"noun": [
|
11691
11779
|
"theAble"
|
11692
11780
|
],
|
11781
|
+
"number": [
|
11782
|
+
"queryable"
|
11783
|
+
],
|
11693
11784
|
"object": [
|
11694
11785
|
"queryable",
|
11695
11786
|
"theAble"
|
@@ -11729,6 +11820,9 @@
|
|
11729
11820
|
"thisitthat": [
|
11730
11821
|
"queryable"
|
11731
11822
|
],
|
11823
|
+
"to": [
|
11824
|
+
"preposition"
|
11825
|
+
],
|
11732
11826
|
"unit": [
|
11733
11827
|
"concept"
|
11734
11828
|
],
|
@@ -11807,6 +11901,8 @@
|
|
11807
11901
|
},
|
11808
11902
|
"noun": {
|
11809
11903
|
},
|
11904
|
+
"number": {
|
11905
|
+
},
|
11810
11906
|
"object": {
|
11811
11907
|
},
|
11812
11908
|
"orAble": {
|
@@ -11839,6 +11935,8 @@
|
|
11839
11935
|
},
|
11840
11936
|
"thisitthat": {
|
11841
11937
|
},
|
11938
|
+
"to": {
|
11939
|
+
},
|
11842
11940
|
"toAble": {
|
11843
11941
|
},
|
11844
11942
|
"unit": {
|
@@ -13337,7 +13435,7 @@
|
|
13337
13435
|
"word": "are"
|
13338
13436
|
},
|
13339
13437
|
"error": [
|
13340
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
13438
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
13341
13439
|
],
|
13342
13440
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
13343
13441
|
"isResponse": true,
|
@@ -14026,7 +14124,8 @@
|
|
14026
14124
|
"whose"
|
14027
14125
|
],
|
14028
14126
|
"preposition": [
|
14029
|
-
"between"
|
14127
|
+
"between",
|
14128
|
+
"to"
|
14030
14129
|
],
|
14031
14130
|
"pronoun": [
|
14032
14131
|
"it",
|
@@ -14048,7 +14147,8 @@
|
|
14048
14147
|
"whatAble",
|
14049
14148
|
"this",
|
14050
14149
|
"thisitthat",
|
14051
|
-
"reason"
|
14150
|
+
"reason",
|
14151
|
+
"number"
|
14052
14152
|
],
|
14053
14153
|
"theAble": [
|
14054
14154
|
"property",
|
@@ -14110,12 +14210,14 @@
|
|
14110
14210
|
"whatAble",
|
14111
14211
|
"is",
|
14112
14212
|
"toAble",
|
14213
|
+
"to",
|
14113
14214
|
"noun",
|
14114
14215
|
"thisitthat",
|
14115
14216
|
"reason",
|
14116
14217
|
"that",
|
14117
14218
|
"orAble",
|
14118
14219
|
"ifAble",
|
14220
|
+
"number",
|
14119
14221
|
"*",
|
14120
14222
|
"mathematical_operator",
|
14121
14223
|
"+",
|
@@ -14189,6 +14291,9 @@
|
|
14189
14291
|
"noun": [
|
14190
14292
|
"theAble"
|
14191
14293
|
],
|
14294
|
+
"number": [
|
14295
|
+
"queryable"
|
14296
|
+
],
|
14192
14297
|
"object": [
|
14193
14298
|
"queryable",
|
14194
14299
|
"theAble"
|
@@ -14225,6 +14330,9 @@
|
|
14225
14330
|
"thisitthat": [
|
14226
14331
|
"queryable"
|
14227
14332
|
],
|
14333
|
+
"to": [
|
14334
|
+
"preposition"
|
14335
|
+
],
|
14228
14336
|
"unit": [
|
14229
14337
|
"concept"
|
14230
14338
|
],
|
@@ -14303,6 +14411,8 @@
|
|
14303
14411
|
},
|
14304
14412
|
"noun": {
|
14305
14413
|
},
|
14414
|
+
"number": {
|
14415
|
+
},
|
14306
14416
|
"object": {
|
14307
14417
|
},
|
14308
14418
|
"orAble": {
|
@@ -14333,6 +14443,8 @@
|
|
14333
14443
|
},
|
14334
14444
|
"thisitthat": {
|
14335
14445
|
},
|
14446
|
+
"to": {
|
14447
|
+
},
|
14336
14448
|
"toAble": {
|
14337
14449
|
},
|
14338
14450
|
"unit": {
|
@@ -14529,7 +14641,7 @@
|
|
14529
14641
|
"word": "are"
|
14530
14642
|
},
|
14531
14643
|
"error": [
|
14532
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
14644
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
14533
14645
|
],
|
14534
14646
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
14535
14647
|
"isResponse": true,
|
@@ -15457,7 +15569,7 @@
|
|
15457
15569
|
"word": "are"
|
15458
15570
|
},
|
15459
15571
|
"error": [
|
15460
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
15572
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
15461
15573
|
],
|
15462
15574
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
15463
15575
|
"isResponse": true,
|
@@ -15581,6 +15693,7 @@
|
|
15581
15693
|
}
|
15582
15694
|
},
|
15583
15695
|
"focusableForPhrase": true,
|
15696
|
+
"fromSTM": true,
|
15584
15697
|
"instance": true,
|
15585
15698
|
"marker": "reason",
|
15586
15699
|
"pullFromContext": false,
|
@@ -15646,6 +15759,7 @@
|
|
15646
15759
|
}
|
15647
15760
|
},
|
15648
15761
|
"focusableForPhrase": true,
|
15762
|
+
"fromSTM": true,
|
15649
15763
|
"marker": "reason",
|
15650
15764
|
"pullFromContext": false
|
15651
15765
|
},
|
@@ -16447,7 +16561,8 @@
|
|
16447
16561
|
"whose"
|
16448
16562
|
],
|
16449
16563
|
"preposition": [
|
16450
|
-
"between"
|
16564
|
+
"between",
|
16565
|
+
"to"
|
16451
16566
|
],
|
16452
16567
|
"pronoun": [
|
16453
16568
|
"it",
|
@@ -16469,7 +16584,8 @@
|
|
16469
16584
|
"whatAble",
|
16470
16585
|
"this",
|
16471
16586
|
"thisitthat",
|
16472
|
-
"reason"
|
16587
|
+
"reason",
|
16588
|
+
"number"
|
16473
16589
|
],
|
16474
16590
|
"theAble": [
|
16475
16591
|
"property",
|
@@ -16531,12 +16647,14 @@
|
|
16531
16647
|
"whatAble",
|
16532
16648
|
"is",
|
16533
16649
|
"toAble",
|
16650
|
+
"to",
|
16534
16651
|
"noun",
|
16535
16652
|
"thisitthat",
|
16536
16653
|
"reason",
|
16537
16654
|
"that",
|
16538
16655
|
"orAble",
|
16539
16656
|
"ifAble",
|
16657
|
+
"number",
|
16540
16658
|
"*",
|
16541
16659
|
"mathematical_operator",
|
16542
16660
|
"+",
|
@@ -16610,6 +16728,9 @@
|
|
16610
16728
|
"noun": [
|
16611
16729
|
"theAble"
|
16612
16730
|
],
|
16731
|
+
"number": [
|
16732
|
+
"queryable"
|
16733
|
+
],
|
16613
16734
|
"object": [
|
16614
16735
|
"queryable",
|
16615
16736
|
"theAble"
|
@@ -16646,6 +16767,9 @@
|
|
16646
16767
|
"thisitthat": [
|
16647
16768
|
"queryable"
|
16648
16769
|
],
|
16770
|
+
"to": [
|
16771
|
+
"preposition"
|
16772
|
+
],
|
16649
16773
|
"unit": [
|
16650
16774
|
"concept"
|
16651
16775
|
],
|
@@ -16724,6 +16848,8 @@
|
|
16724
16848
|
},
|
16725
16849
|
"noun": {
|
16726
16850
|
},
|
16851
|
+
"number": {
|
16852
|
+
},
|
16727
16853
|
"object": {
|
16728
16854
|
},
|
16729
16855
|
"orAble": {
|
@@ -16754,6 +16880,8 @@
|
|
16754
16880
|
},
|
16755
16881
|
"thisitthat": {
|
16756
16882
|
},
|
16883
|
+
"to": {
|
16884
|
+
},
|
16757
16885
|
"toAble": {
|
16758
16886
|
},
|
16759
16887
|
"unit": {
|
@@ -16909,6 +17037,7 @@
|
|
16909
17037
|
}
|
16910
17038
|
},
|
16911
17039
|
"focusableForPhrase": true,
|
17040
|
+
"fromSTM": true,
|
16912
17041
|
"instance": true,
|
16913
17042
|
"marker": "reason",
|
16914
17043
|
"pullFromContext": false,
|
@@ -16974,6 +17103,7 @@
|
|
16974
17103
|
}
|
16975
17104
|
},
|
16976
17105
|
"focusableForPhrase": true,
|
17106
|
+
"fromSTM": true,
|
16977
17107
|
"marker": "reason",
|
16978
17108
|
"pullFromContext": false
|
16979
17109
|
},
|
@@ -17169,7 +17299,7 @@
|
|
17169
17299
|
"word": "are"
|
17170
17300
|
},
|
17171
17301
|
"error": [
|
17172
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
17302
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
17173
17303
|
],
|
17174
17304
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
17175
17305
|
"isResponse": true,
|
@@ -17923,7 +18053,7 @@
|
|
17923
18053
|
"word": "are"
|
17924
18054
|
},
|
17925
18055
|
"error": [
|
17926
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
18056
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
17927
18057
|
],
|
17928
18058
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
17929
18059
|
"isResponse": true,
|
@@ -18683,7 +18813,8 @@
|
|
18683
18813
|
"whose"
|
18684
18814
|
],
|
18685
18815
|
"preposition": [
|
18686
|
-
"between"
|
18816
|
+
"between",
|
18817
|
+
"to"
|
18687
18818
|
],
|
18688
18819
|
"pronoun": [
|
18689
18820
|
"it",
|
@@ -18705,7 +18836,8 @@
|
|
18705
18836
|
"whatAble",
|
18706
18837
|
"this",
|
18707
18838
|
"thisitthat",
|
18708
|
-
"reason"
|
18839
|
+
"reason",
|
18840
|
+
"number"
|
18709
18841
|
],
|
18710
18842
|
"theAble": [
|
18711
18843
|
"property",
|
@@ -18767,12 +18899,14 @@
|
|
18767
18899
|
"whatAble",
|
18768
18900
|
"is",
|
18769
18901
|
"toAble",
|
18902
|
+
"to",
|
18770
18903
|
"noun",
|
18771
18904
|
"thisitthat",
|
18772
18905
|
"reason",
|
18773
18906
|
"that",
|
18774
18907
|
"orAble",
|
18775
18908
|
"ifAble",
|
18909
|
+
"number",
|
18776
18910
|
"*",
|
18777
18911
|
"mathematical_operator",
|
18778
18912
|
"+",
|
@@ -18846,6 +18980,9 @@
|
|
18846
18980
|
"noun": [
|
18847
18981
|
"theAble"
|
18848
18982
|
],
|
18983
|
+
"number": [
|
18984
|
+
"queryable"
|
18985
|
+
],
|
18849
18986
|
"object": [
|
18850
18987
|
"queryable",
|
18851
18988
|
"theAble"
|
@@ -18882,6 +19019,9 @@
|
|
18882
19019
|
"thisitthat": [
|
18883
19020
|
"queryable"
|
18884
19021
|
],
|
19022
|
+
"to": [
|
19023
|
+
"preposition"
|
19024
|
+
],
|
18885
19025
|
"unit": [
|
18886
19026
|
"concept"
|
18887
19027
|
],
|
@@ -18960,6 +19100,8 @@
|
|
18960
19100
|
},
|
18961
19101
|
"noun": {
|
18962
19102
|
},
|
19103
|
+
"number": {
|
19104
|
+
},
|
18963
19105
|
"object": {
|
18964
19106
|
},
|
18965
19107
|
"orAble": {
|
@@ -18990,6 +19132,8 @@
|
|
18990
19132
|
},
|
18991
19133
|
"thisitthat": {
|
18992
19134
|
},
|
19135
|
+
"to": {
|
19136
|
+
},
|
18993
19137
|
"toAble": {
|
18994
19138
|
},
|
18995
19139
|
"unit": {
|
@@ -19251,7 +19395,7 @@
|
|
19251
19395
|
"word": "are"
|
19252
19396
|
},
|
19253
19397
|
"error": [
|
19254
|
-
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:666\"\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:666'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:158:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:146:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:202:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:213:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:689:24). Semantic is Semantic(({ context }) => bridge.id == context.marker && context.evaluate, ({callId, context, kms, e, error}) => {\n /*\n error(({context, e}) => {\n context.evalue = 'dont know...'\n })\n */\n if (callId == 'length#call3') {\n debugger\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.'"
|
19398
|
+
"ERROR while applying (dialogues/#4) KM 'dialogues' ordinal: 4 where: \"/home/dev/code/theprogrammablemind/kms/common/dialogues.js:664\"\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:664'. Error is ERROR while applying (dimension/#0) KM 'dimension' ordinal: 0 where: \"/home/dev/code/theprogrammablemind/kms/common/dimension.js:116\"\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:116'. 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}}} 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}}}\n at args.error (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:165:11)\n at Object.evaluator (/home/dev/code/theprogrammablemind/kms/common/dimension.js:143:13)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:318:35)\n at Semantic.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:124:10)\n at Semantics.applyToContext (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:199:35)\n at Semantics.apply (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/semantics.js:315:19)\n at args.s (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:209:47)\n at Config.getEvaluator (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/config.js:939:22)\n at args.e (/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/client.js:220:21)\n at Semantic.apply [as _apply] (/home/dev/code/theprogrammablemind/kms/common/dialogues.js:687: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.'"
|
19255
19399
|
],
|
19256
19400
|
"evalue": "That is not known because there is no conversion between a1 and b1",
|
19257
19401
|
"isResponse": true,
|