ekms 7.12.8-beta.0 → 7.12.8-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,992 @@
1
+ {
2
+ "queries": [
3
+ "formulas are concepts",
4
+ {
5
+ "name": "formulas",
6
+ "operators": [
7
+ "([formula])",
8
+ "([solve] (equals/1) ([forVariable|for]) (variable))",
9
+ "(([formula]) [formulaForVariable|] ([forVariable|]) (variable))",
10
+ "([calculate] ([expression]))",
11
+ "(([expression]) [equals] ([expression]))"
12
+ ],
13
+ "priorities": [
14
+ {
15
+ "context": [
16
+ [
17
+ "mathematicalOperator",
18
+ 0
19
+ ],
20
+ [
21
+ "number",
22
+ 0
23
+ ]
24
+ ],
25
+ "choose": [
26
+ 0
27
+ ]
28
+ }
29
+ ],
30
+ "semantics": [
31
+ {
32
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:109",
33
+ "match": "({context, api}) => context.evaluate && api.get(context)",
34
+ "apply": "({context, api, e}) => {\n const { formula } = api.get(context)\n // console.log('greg24 -----------', JSON.stringify(formula, null, 2))\n context.evalue = e(formula) \n }"
35
+ }
36
+ ],
37
+ "bridges": [
38
+ {
39
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:120",
40
+ "id": "formulaForVariable",
41
+ "isA": [
42
+ "preposition",
43
+ "queryable"
44
+ ],
45
+ "convolution": true,
46
+ "bridge": "{ number: before[0].number, ...next(operator), what: before[0], equality: after[0], variable: after[1] }",
47
+ "generatorp": "({context, g}) => `${g(context.what)} ${g(context.equality)} ${g(context.variable)}`",
48
+ "evaluator": "({context, api, objects}) => {\n const formulas = api.gets(context.variable).map((f) => { return { ...f.equality, paraphrase: true } })\n context.evalue = { marker: 'list', value: formulas }\n }"
49
+ },
50
+ {
51
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:132",
52
+ "id": "solve",
53
+ "bridge": "{ ...next(operator), equality: after[0], variable: after[2] }",
54
+ "generatorp": "({context, gp}) => `${context.word} ${gp(context.equality)} for ${gp(context.variable)}`",
55
+ "semantic": "({context}) => {\n context.response = solveFor(context.equality, context.variable)\n context.isResponse = true\n context.value = null\n if (!context.response) {\n // TODO some KM for talking to the user wrt brief+avatar\n context.verbatim = `Solving failed`\n }\n }"
56
+ },
57
+ {
58
+ "id": "forVariable",
59
+ "isA": [
60
+ "preposition"
61
+ ]
62
+ },
63
+ {
64
+ "id": "formula"
65
+ },
66
+ {
67
+ "id": "expression",
68
+ "children": [
69
+ "mathematicalExpression",
70
+ "number"
71
+ ],
72
+ "before": [
73
+ "verby"
74
+ ]
75
+ },
76
+ {
77
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:159",
78
+ "id": "calculate",
79
+ "isA": [
80
+ "verby"
81
+ ],
82
+ "bridge": "{ ...next(operator), expression: after[0] }",
83
+ "generatorp": "({context, g}) => `${context.word} ${g(context.expression)}`",
84
+ "localHierarchy": [
85
+ [
86
+ "unknown",
87
+ "expression"
88
+ ]
89
+ ],
90
+ "semantic": "({context, e}) => {\n context.evalue = e(context.expression)\n context.isResponse = true\n }"
91
+ },
92
+ {
93
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:171",
94
+ "id": "equals",
95
+ "bridge": "{ ...next(operator), left: before[0], right: after[0] }",
96
+ "words": [
97
+ "="
98
+ ],
99
+ "after": [
100
+ "mathematicalOperator"
101
+ ],
102
+ "localHierarchy": [
103
+ [
104
+ "unknown",
105
+ "expression"
106
+ ]
107
+ ],
108
+ "generatorp": "({context, gp}) => `${gp(context.left)} ${context.word} ${gp(context.right)}`",
109
+ "semantic": "({context, api}) => {\n // TODO make sure left is a single name\n // TODO calculate invertable formulas?\n api.add(context.left, context.right, context)\n }"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "resultss": [
115
+ {
116
+ "hierarchy": [
117
+ [
118
+ "*",
119
+ "hierarchyAble"
120
+ ],
121
+ [
122
+ "*",
123
+ "isEdee"
124
+ ],
125
+ [
126
+ "*",
127
+ "isEder"
128
+ ],
129
+ [
130
+ "*",
131
+ "mathematical_operator"
132
+ ],
133
+ [
134
+ "*",
135
+ "object"
136
+ ],
137
+ [
138
+ "*",
139
+ "property"
140
+ ],
141
+ [
142
+ "*",
143
+ "queryable"
144
+ ],
145
+ [
146
+ "*",
147
+ "theAble"
148
+ ],
149
+ [
150
+ "+",
151
+ "hierarchyAble"
152
+ ],
153
+ [
154
+ "+",
155
+ "isEdee"
156
+ ],
157
+ [
158
+ "+",
159
+ "isEder"
160
+ ],
161
+ [
162
+ "+",
163
+ "mathematical_operator"
164
+ ],
165
+ [
166
+ "+",
167
+ "object"
168
+ ],
169
+ [
170
+ "+",
171
+ "property"
172
+ ],
173
+ [
174
+ "+",
175
+ "queryable"
176
+ ],
177
+ [
178
+ "+",
179
+ "theAble"
180
+ ],
181
+ [
182
+ "-",
183
+ "hierarchyAble"
184
+ ],
185
+ [
186
+ "-",
187
+ "isEdee"
188
+ ],
189
+ [
190
+ "-",
191
+ "isEder"
192
+ ],
193
+ [
194
+ "-",
195
+ "mathematical_operator"
196
+ ],
197
+ [
198
+ "-",
199
+ "object"
200
+ ],
201
+ [
202
+ "-",
203
+ "property"
204
+ ],
205
+ [
206
+ "-",
207
+ "queryable"
208
+ ],
209
+ [
210
+ "-",
211
+ "theAble"
212
+ ],
213
+ [
214
+ "/",
215
+ "hierarchyAble"
216
+ ],
217
+ [
218
+ "/",
219
+ "isEdee"
220
+ ],
221
+ [
222
+ "/",
223
+ "isEder"
224
+ ],
225
+ [
226
+ "/",
227
+ "mathematical_operator"
228
+ ],
229
+ [
230
+ "/",
231
+ "object"
232
+ ],
233
+ [
234
+ "/",
235
+ "property"
236
+ ],
237
+ [
238
+ "/",
239
+ "queryable"
240
+ ],
241
+ [
242
+ "/",
243
+ "theAble"
244
+ ],
245
+ [
246
+ "a",
247
+ "articlePOS"
248
+ ],
249
+ [
250
+ "adjective",
251
+ "adjective"
252
+ ],
253
+ [
254
+ "all",
255
+ "quantifier"
256
+ ],
257
+ [
258
+ "articlePOS",
259
+ "articlePOS"
260
+ ],
261
+ [
262
+ "between",
263
+ "preposition"
264
+ ],
265
+ [
266
+ "canBeDoQuestion",
267
+ "canBeDoQuestion"
268
+ ],
269
+ [
270
+ "canBeQuestion",
271
+ "canBeQuestion"
272
+ ],
273
+ [
274
+ "concept",
275
+ "queryable"
276
+ ],
277
+ [
278
+ "concept",
279
+ "theAble"
280
+ ],
281
+ [
282
+ "condition",
283
+ "condition"
284
+ ],
285
+ [
286
+ "countable",
287
+ "hierarchyAble"
288
+ ],
289
+ [
290
+ "divideByExpression",
291
+ "mathematicalExpression"
292
+ ],
293
+ [
294
+ "divideByOperator",
295
+ "mathematicalOperator"
296
+ ],
297
+ [
298
+ "hasCountOfPieces",
299
+ "countable"
300
+ ],
301
+ [
302
+ "have",
303
+ "canBeDoQuestion"
304
+ ],
305
+ [
306
+ "have",
307
+ "canBeQuestion"
308
+ ],
309
+ [
310
+ "hierarchyAble",
311
+ "queryable"
312
+ ],
313
+ [
314
+ "highest",
315
+ "condition"
316
+ ],
317
+ [
318
+ "ifAble",
319
+ "ifAble"
320
+ ],
321
+ [
322
+ "is",
323
+ "canBeQuestion"
324
+ ],
325
+ [
326
+ "is",
327
+ "verby"
328
+ ],
329
+ [
330
+ "isEdee",
331
+ "isEdee"
332
+ ],
333
+ [
334
+ "isEder",
335
+ "isEder"
336
+ ],
337
+ [
338
+ "it",
339
+ "pronoun"
340
+ ],
341
+ [
342
+ "it",
343
+ "queryable"
344
+ ],
345
+ [
346
+ "it",
347
+ "thisitthat"
348
+ ],
349
+ [
350
+ "it",
351
+ "toAble"
352
+ ],
353
+ [
354
+ "lowest",
355
+ "condition"
356
+ ],
357
+ [
358
+ "mathematical",
359
+ "hierarchyAble"
360
+ ],
361
+ [
362
+ "mathematical",
363
+ "isEdee"
364
+ ],
365
+ [
366
+ "mathematical",
367
+ "isEder"
368
+ ],
369
+ [
370
+ "mathematical",
371
+ "object"
372
+ ],
373
+ [
374
+ "mathematical",
375
+ "operator_modifier"
376
+ ],
377
+ [
378
+ "mathematical",
379
+ "property"
380
+ ],
381
+ [
382
+ "mathematical",
383
+ "queryable"
384
+ ],
385
+ [
386
+ "mathematical",
387
+ "theAble"
388
+ ],
389
+ [
390
+ "mathematicalExpression",
391
+ "concept"
392
+ ],
393
+ [
394
+ "mathematicalExpression",
395
+ "number"
396
+ ],
397
+ [
398
+ "mathematicalOperator",
399
+ "mathematicalOperator"
400
+ ],
401
+ [
402
+ "mathematical_operator",
403
+ "adjective"
404
+ ],
405
+ [
406
+ "mathematical_operator",
407
+ "concept"
408
+ ],
409
+ [
410
+ "mathematical_operator",
411
+ "hierarchyAble"
412
+ ],
413
+ [
414
+ "mathematical_operator",
415
+ "isEdee"
416
+ ],
417
+ [
418
+ "mathematical_operator",
419
+ "isEder"
420
+ ],
421
+ [
422
+ "mathematical_operator",
423
+ "object"
424
+ ],
425
+ [
426
+ "mathematical_operator",
427
+ "operator"
428
+ ],
429
+ [
430
+ "mathematical_operator",
431
+ "property"
432
+ ],
433
+ [
434
+ "mathematical_operator",
435
+ "queryable"
436
+ ],
437
+ [
438
+ "mathematical_operator",
439
+ "theAble"
440
+ ],
441
+ [
442
+ "minusExpression",
443
+ "mathematicalExpression"
444
+ ],
445
+ [
446
+ "minusOperator",
447
+ "mathematicalOperator"
448
+ ],
449
+ [
450
+ "modifies",
451
+ "verby"
452
+ ],
453
+ [
454
+ "notAble",
455
+ "notAble"
456
+ ],
457
+ [
458
+ "noun",
459
+ "theAble"
460
+ ],
461
+ [
462
+ "number",
463
+ "quantifier"
464
+ ],
465
+ [
466
+ "number",
467
+ "queryable"
468
+ ],
469
+ [
470
+ "object",
471
+ "queryable"
472
+ ],
473
+ [
474
+ "object",
475
+ "theAble"
476
+ ],
477
+ [
478
+ "operator",
479
+ "concept"
480
+ ],
481
+ [
482
+ "operator",
483
+ "hierarchyAble"
484
+ ],
485
+ [
486
+ "operator",
487
+ "isEdee"
488
+ ],
489
+ [
490
+ "operator",
491
+ "isEder"
492
+ ],
493
+ [
494
+ "operator",
495
+ "object"
496
+ ],
497
+ [
498
+ "operator",
499
+ "property"
500
+ ],
501
+ [
502
+ "operator",
503
+ "queryable"
504
+ ],
505
+ [
506
+ "operator",
507
+ "theAble"
508
+ ],
509
+ [
510
+ "operator_modifier",
511
+ "operator_modifier"
512
+ ],
513
+ [
514
+ "orAble",
515
+ "ifAble"
516
+ ],
517
+ [
518
+ "plusExpression",
519
+ "mathematicalExpression"
520
+ ],
521
+ [
522
+ "plusOperator",
523
+ "mathematicalOperator"
524
+ ],
525
+ [
526
+ "preposition",
527
+ "preposition"
528
+ ],
529
+ [
530
+ "pronoun",
531
+ "pronoun"
532
+ ],
533
+ [
534
+ "property",
535
+ "queryable"
536
+ ],
537
+ [
538
+ "property",
539
+ "theAble"
540
+ ],
541
+ [
542
+ "property",
543
+ "unknown"
544
+ ],
545
+ [
546
+ "punctuation",
547
+ "punctuation"
548
+ ],
549
+ [
550
+ "quantifier",
551
+ "quantifier"
552
+ ],
553
+ [
554
+ "queryable",
555
+ "queryable"
556
+ ],
557
+ [
558
+ "questionMark",
559
+ "punctuation"
560
+ ],
561
+ [
562
+ "readonly",
563
+ "queryable"
564
+ ],
565
+ [
566
+ "reason",
567
+ "queryable"
568
+ ],
569
+ [
570
+ "reason",
571
+ "theAble"
572
+ ],
573
+ [
574
+ "that",
575
+ "thisitthat"
576
+ ],
577
+ [
578
+ "the",
579
+ "articlePOS"
580
+ ],
581
+ [
582
+ "theAble",
583
+ "theAble"
584
+ ],
585
+ [
586
+ "this",
587
+ "pronoun"
588
+ ],
589
+ [
590
+ "this",
591
+ "queryable"
592
+ ],
593
+ [
594
+ "this",
595
+ "thisitthat"
596
+ ],
597
+ [
598
+ "thisitthat",
599
+ "queryable"
600
+ ],
601
+ [
602
+ "timesExpression",
603
+ "mathematicalExpression"
604
+ ],
605
+ [
606
+ "timesOperator",
607
+ "mathematicalOperator"
608
+ ],
609
+ [
610
+ "to",
611
+ "preposition"
612
+ ],
613
+ [
614
+ "toAble",
615
+ "toAble"
616
+ ],
617
+ [
618
+ "type",
619
+ "property"
620
+ ],
621
+ [
622
+ "type",
623
+ "whatAble"
624
+ ],
625
+ [
626
+ "unknown",
627
+ "hierarchyAble"
628
+ ],
629
+ [
630
+ "unknown",
631
+ "notAble"
632
+ ],
633
+ [
634
+ "unknown",
635
+ "object"
636
+ ],
637
+ [
638
+ "unknown",
639
+ "queryable"
640
+ ],
641
+ [
642
+ "unknown",
643
+ "theAble"
644
+ ],
645
+ [
646
+ "verby",
647
+ "verby"
648
+ ],
649
+ [
650
+ "what",
651
+ "object"
652
+ ],
653
+ [
654
+ "what",
655
+ "queryable"
656
+ ],
657
+ [
658
+ "whatAble",
659
+ "queryable"
660
+ ],
661
+ [
662
+ "whose",
663
+ "object"
664
+ ],
665
+ [
666
+ "x",
667
+ "number"
668
+ ],
669
+ [
670
+ "xfx",
671
+ "queryable"
672
+ ],
673
+ [
674
+ "y",
675
+ "number"
676
+ ]
677
+ ],
678
+ "metadata": {
679
+ "opChoices": [
680
+ {
681
+ "op": [
682
+ "unknown",
683
+ 0
684
+ ],
685
+ "ops": [
686
+ [
687
+ "unknown",
688
+ 0
689
+ ],
690
+ [
691
+ "is",
692
+ 0
693
+ ],
694
+ [
695
+ "unknown",
696
+ 0
697
+ ]
698
+ ],
699
+ "counter": 1
700
+ },
701
+ {
702
+ "op": [
703
+ "unknown",
704
+ 0
705
+ ],
706
+ "ops": [
707
+ [
708
+ "is",
709
+ 0
710
+ ],
711
+ [
712
+ "unknown",
713
+ 0
714
+ ]
715
+ ],
716
+ "counter": 2
717
+ },
718
+ {
719
+ "op": [
720
+ "is",
721
+ 0
722
+ ],
723
+ "ops": [
724
+ [
725
+ "is",
726
+ 0
727
+ ]
728
+ ],
729
+ "counter": 3
730
+ },
731
+ {
732
+ "op": [
733
+ "is",
734
+ 1
735
+ ],
736
+ "ops": [
737
+ [
738
+ "is",
739
+ 1
740
+ ]
741
+ ],
742
+ "counter": 4
743
+ }
744
+ ]
745
+ },
746
+ "trace": "undefined",
747
+ "contexts": [
748
+ {
749
+ "number": "many",
750
+ "text": "formulas are concepts",
751
+ "marker": "is",
752
+ "word": "are",
753
+ "range": {
754
+ "start": 0,
755
+ "end": 20
756
+ },
757
+ "one": {
758
+ "number": "many",
759
+ "marker": "unknown",
760
+ "range": {
761
+ "start": 0,
762
+ "end": 20
763
+ },
764
+ "word": "formulas",
765
+ "text": "formulas",
766
+ "value": "formulas",
767
+ "unknown": true,
768
+ "dead": true,
769
+ "types": [
770
+ "unknown"
771
+ ],
772
+ "level": 1
773
+ },
774
+ "two": {
775
+ "marker": "unknown",
776
+ "range": {
777
+ "start": 13,
778
+ "end": 20
779
+ },
780
+ "word": "concepts",
781
+ "text": "concepts",
782
+ "value": "concepts",
783
+ "unknown": true,
784
+ "dead": true,
785
+ "types": [
786
+ "unknown"
787
+ ],
788
+ "level": 1,
789
+ "concept": true
790
+ },
791
+ "dead": true,
792
+ "level": 2,
793
+ "topLevel": true,
794
+ "touchedBy": [
795
+ "formulas#call2"
796
+ ]
797
+ }
798
+ ],
799
+ "generated": [
800
+ ""
801
+ ],
802
+ "paraphrases": [
803
+ "formulas are concepts"
804
+ ],
805
+ "paraphrasesParenthesized": [],
806
+ "generatedParenthesized": [],
807
+ "responses": [
808
+ ""
809
+ ],
810
+ "associations": [
811
+ [
812
+ [
813
+ "is",
814
+ 0
815
+ ],
816
+ [
817
+ "unknown",
818
+ 0
819
+ ]
820
+ ],
821
+ [
822
+ [
823
+ "is",
824
+ 0
825
+ ],
826
+ [
827
+ "unknown",
828
+ 0
829
+ ],
830
+ [
831
+ "unknown",
832
+ 1
833
+ ]
834
+ ],
835
+ [
836
+ [
837
+ "is",
838
+ 0
839
+ ],
840
+ [
841
+ "unknown",
842
+ 1
843
+ ]
844
+ ]
845
+ ],
846
+ "learned_contextual_priorities": [],
847
+ "query": "formulas are concepts",
848
+ "key": {
849
+ "query": "formulas are concepts"
850
+ }
851
+ },
852
+ {
853
+ "extraConfig": true,
854
+ "name": "formulas",
855
+ "operators": [
856
+ "([formula])",
857
+ "([solve] (equals/1) ([forVariable|for]) (variable))",
858
+ "(([formula]) [formulaForVariable|] ([forVariable|]) (variable))",
859
+ "([calculate] ([expression]))",
860
+ "(([expression]) [equals] ([expression]))"
861
+ ],
862
+ "priorities": [
863
+ {
864
+ "context": [
865
+ [
866
+ "mathematicalOperator",
867
+ 0
868
+ ],
869
+ [
870
+ "number",
871
+ 0
872
+ ]
873
+ ],
874
+ "choose": [
875
+ 0
876
+ ]
877
+ }
878
+ ],
879
+ "semantics": [
880
+ {
881
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:109"
882
+ }
883
+ ],
884
+ "bridges": [
885
+ {
886
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:120",
887
+ "id": "formulaForVariable",
888
+ "isA": [
889
+ "preposition",
890
+ "queryable"
891
+ ],
892
+ "convolution": true,
893
+ "bridge": "{ number: before[0].number, ...next(operator), what: before[0], equality: after[0], variable: after[1] }"
894
+ },
895
+ {
896
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:132",
897
+ "id": "solve",
898
+ "bridge": "{ ...next(operator), equality: after[0], variable: after[2] }"
899
+ },
900
+ {
901
+ "id": "forVariable",
902
+ "isA": [
903
+ "preposition"
904
+ ]
905
+ },
906
+ {
907
+ "id": "formula"
908
+ },
909
+ {
910
+ "id": "expression",
911
+ "children": [
912
+ "mathematicalExpression",
913
+ "number"
914
+ ],
915
+ "before": [
916
+ "verby"
917
+ ]
918
+ },
919
+ {
920
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:159",
921
+ "id": "calculate",
922
+ "isA": [
923
+ "verby"
924
+ ],
925
+ "bridge": "{ ...next(operator), expression: after[0] }",
926
+ "localHierarchy": [
927
+ [
928
+ "unknown",
929
+ "expression"
930
+ ]
931
+ ]
932
+ },
933
+ {
934
+ "where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:171",
935
+ "id": "equals",
936
+ "bridge": "{ ...next(operator), left: before[0], right: after[0] }",
937
+ "words": [
938
+ "="
939
+ ],
940
+ "after": [
941
+ "mathematicalOperator"
942
+ ],
943
+ "localHierarchy": [
944
+ [
945
+ "unknown",
946
+ "expression"
947
+ ]
948
+ ]
949
+ }
950
+ ]
951
+ }
952
+ ],
953
+ "fragments": [],
954
+ "semantics": [],
955
+ "associations": [
956
+ [
957
+ [
958
+ "is",
959
+ 0
960
+ ],
961
+ [
962
+ "unknown",
963
+ 0
964
+ ]
965
+ ],
966
+ [
967
+ [
968
+ "is",
969
+ 0
970
+ ],
971
+ [
972
+ "unknown",
973
+ 0
974
+ ],
975
+ [
976
+ "unknown",
977
+ 1
978
+ ]
979
+ ],
980
+ [
981
+ [
982
+ "is",
983
+ 0
984
+ ],
985
+ [
986
+ "unknown",
987
+ 1
988
+ ]
989
+ ]
990
+ ],
991
+ "learned_contextual_priorities": []
992
+ }