ekms 8.0.0-beta.57 → 8.0.0-beta.58

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,11 @@
1
1
  const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require("./dialogues")
4
+ const concept = require("./concept")
4
5
  const numbers = require("./numbers")
5
6
  const comparable_tests = require('./comparable.test.json')
7
+ const comparable_instance = require('./comparable.instance.json')
8
+
6
9
 
7
10
  let config = {
8
11
  name: 'comparable',
@@ -11,8 +14,7 @@ let config = {
11
14
  "(([condition/1]) <compare|> ([comparable]))",
12
15
  "([highest])",
13
16
  "([lowest])",
14
- "((comparable/*) <ascending>)",
15
- "((comparable/*) <descending>)",
17
+ // "((comparable/*) <sortOrdering|>)",
16
18
  ],
17
19
  bridges: [
18
20
  {
@@ -41,8 +43,9 @@ let config = {
41
43
  id: "highest",
42
44
  bridge: "{ ...next(operator) }"
43
45
  },
46
+ /*
44
47
  {
45
- id: "ascending",
48
+ id: "sortOrdering",
46
49
  isA: ['adjective'],
47
50
  bridge: "{ ...next(before[0]), ordering: 'ascending', ascending: operator, postModifiers: append(['ascending'], before[0].postModifiers) }"
48
51
  },
@@ -51,12 +54,38 @@ let config = {
51
54
  isA: ['adjective'],
52
55
  bridge: "{ ...next(before[0]), ordering: 'descending', descending: operator, postModifiers: append(['descending'], before[0].postModifiers) }"
53
56
  },
57
+ */
54
58
  ],
55
59
  };
56
60
 
61
+ const template = {
62
+ configs: [
63
+ "sort modifies ordering",
64
+ "ascending is a sort ordering",
65
+ "descending is a sort ordering",
66
+ {
67
+ operators: [
68
+ "((comparable/*) [sortOrdering] (<sort_ordering/*))",
69
+ ],
70
+ bridges: [
71
+ {
72
+ id: 'sortOrdering',
73
+ convolution: true,
74
+ before: ['verb'],
75
+ bridge: "{ ...next(before[0]), ordering: after[0].value, sortOrder: after[0], postModifiers: append(['sortOrder'], before[0].postModifiers) }",
76
+ },
77
+ ],
78
+ }
79
+ ],
80
+ }
81
+
57
82
  knowledgeModule({
58
83
  config,
59
- includes: [dialogues, numbers],
84
+ includes: [dialogues, numbers, concept],
85
+ template: {
86
+ template,
87
+ instance: comparable_instance
88
+ },
60
89
 
61
90
  module,
62
91
  description: 'Comparable things',
@@ -133,6 +133,46 @@
133
133
  "articlePOS",
134
134
  false
135
135
  ],
136
+ [
137
+ "ascending",
138
+ "hierarchyAble",
139
+ false
140
+ ],
141
+ [
142
+ "ascending",
143
+ "isEdee",
144
+ false
145
+ ],
146
+ [
147
+ "ascending",
148
+ "isEder",
149
+ false
150
+ ],
151
+ [
152
+ "ascending",
153
+ "object",
154
+ false
155
+ ],
156
+ [
157
+ "ascending",
158
+ "property",
159
+ false
160
+ ],
161
+ [
162
+ "ascending",
163
+ "queryable",
164
+ false
165
+ ],
166
+ [
167
+ "ascending",
168
+ "sort_ordering",
169
+ false
170
+ ],
171
+ [
172
+ "ascending",
173
+ "theAble",
174
+ false
175
+ ],
136
176
  [
137
177
  "between",
138
178
  "preposition",
@@ -173,6 +213,46 @@
173
213
  "hierarchyAble",
174
214
  false
175
215
  ],
216
+ [
217
+ "descending",
218
+ "hierarchyAble",
219
+ false
220
+ ],
221
+ [
222
+ "descending",
223
+ "isEdee",
224
+ false
225
+ ],
226
+ [
227
+ "descending",
228
+ "isEder",
229
+ false
230
+ ],
231
+ [
232
+ "descending",
233
+ "object",
234
+ false
235
+ ],
236
+ [
237
+ "descending",
238
+ "property",
239
+ false
240
+ ],
241
+ [
242
+ "descending",
243
+ "queryable",
244
+ false
245
+ ],
246
+ [
247
+ "descending",
248
+ "sort_ordering",
249
+ false
250
+ ],
251
+ [
252
+ "descending",
253
+ "theAble",
254
+ false
255
+ ],
176
256
  [
177
257
  "divideByExpression",
178
258
  "mathematicalExpression",
@@ -533,6 +613,51 @@
533
613
  "ifAble",
534
614
  false
535
615
  ],
616
+ [
617
+ "ordering",
618
+ "concept",
619
+ false
620
+ ],
621
+ [
622
+ "ordering",
623
+ "hierarchyAble",
624
+ false
625
+ ],
626
+ [
627
+ "ordering",
628
+ "isEdee",
629
+ false
630
+ ],
631
+ [
632
+ "ordering",
633
+ "isEder",
634
+ false
635
+ ],
636
+ [
637
+ "ordering",
638
+ "object",
639
+ false
640
+ ],
641
+ [
642
+ "ordering",
643
+ "property",
644
+ false
645
+ ],
646
+ [
647
+ "ordering",
648
+ "queryable",
649
+ false
650
+ ],
651
+ [
652
+ "ordering",
653
+ "theAble",
654
+ false
655
+ ],
656
+ [
657
+ "ordering_modifier",
658
+ "ordering_modifier",
659
+ false
660
+ ],
536
661
  [
537
662
  "plusExpression",
538
663
  "mathematicalExpression",
@@ -608,6 +733,96 @@
608
733
  "verb",
609
734
  false
610
735
  ],
736
+ [
737
+ "sort",
738
+ "hierarchyAble",
739
+ false
740
+ ],
741
+ [
742
+ "sort",
743
+ "isEdee",
744
+ false
745
+ ],
746
+ [
747
+ "sort",
748
+ "isEder",
749
+ false
750
+ ],
751
+ [
752
+ "sort",
753
+ "object",
754
+ false
755
+ ],
756
+ [
757
+ "sort",
758
+ "ordering_modifier",
759
+ false
760
+ ],
761
+ [
762
+ "sort",
763
+ "property",
764
+ false
765
+ ],
766
+ [
767
+ "sort",
768
+ "queryable",
769
+ false
770
+ ],
771
+ [
772
+ "sort",
773
+ "theAble",
774
+ false
775
+ ],
776
+ [
777
+ "sort_ordering",
778
+ "adjective",
779
+ true
780
+ ],
781
+ [
782
+ "sort_ordering",
783
+ "concept",
784
+ false
785
+ ],
786
+ [
787
+ "sort_ordering",
788
+ "hierarchyAble",
789
+ false
790
+ ],
791
+ [
792
+ "sort_ordering",
793
+ "isEdee",
794
+ false
795
+ ],
796
+ [
797
+ "sort_ordering",
798
+ "isEder",
799
+ false
800
+ ],
801
+ [
802
+ "sort_ordering",
803
+ "object",
804
+ false
805
+ ],
806
+ [
807
+ "sort_ordering",
808
+ "ordering",
809
+ false
810
+ ],
811
+ [
812
+ "sort_ordering",
813
+ "property",
814
+ false
815
+ ],
816
+ [
817
+ "sort_ordering",
818
+ "queryable",
819
+ false
820
+ ],
821
+ [
822
+ "sort_ordering",
823
+ "theAble",
824
+ false
825
+ ],
611
826
  [
612
827
  "stm_before",
613
828
  "adjective",
@@ -134,6 +134,46 @@
134
134
  "articlePOS",
135
135
  false
136
136
  ],
137
+ [
138
+ "ascending",
139
+ "hierarchyAble",
140
+ false
141
+ ],
142
+ [
143
+ "ascending",
144
+ "isEdee",
145
+ false
146
+ ],
147
+ [
148
+ "ascending",
149
+ "isEder",
150
+ false
151
+ ],
152
+ [
153
+ "ascending",
154
+ "object",
155
+ false
156
+ ],
157
+ [
158
+ "ascending",
159
+ "property",
160
+ false
161
+ ],
162
+ [
163
+ "ascending",
164
+ "queryable",
165
+ false
166
+ ],
167
+ [
168
+ "ascending",
169
+ "sort_ordering",
170
+ false
171
+ ],
172
+ [
173
+ "ascending",
174
+ "theAble",
175
+ false
176
+ ],
137
177
  [
138
178
  "between",
139
179
  "preposition",
@@ -169,6 +209,46 @@
169
209
  "hierarchyAble",
170
210
  false
171
211
  ],
212
+ [
213
+ "descending",
214
+ "hierarchyAble",
215
+ false
216
+ ],
217
+ [
218
+ "descending",
219
+ "isEdee",
220
+ false
221
+ ],
222
+ [
223
+ "descending",
224
+ "isEder",
225
+ false
226
+ ],
227
+ [
228
+ "descending",
229
+ "object",
230
+ false
231
+ ],
232
+ [
233
+ "descending",
234
+ "property",
235
+ false
236
+ ],
237
+ [
238
+ "descending",
239
+ "queryable",
240
+ false
241
+ ],
242
+ [
243
+ "descending",
244
+ "sort_ordering",
245
+ false
246
+ ],
247
+ [
248
+ "descending",
249
+ "theAble",
250
+ false
251
+ ],
172
252
  [
173
253
  "divideByExpression",
174
254
  "mathematicalExpression",
@@ -459,6 +539,51 @@
459
539
  "ifAble",
460
540
  false
461
541
  ],
542
+ [
543
+ "ordering",
544
+ "concept",
545
+ false
546
+ ],
547
+ [
548
+ "ordering",
549
+ "hierarchyAble",
550
+ false
551
+ ],
552
+ [
553
+ "ordering",
554
+ "isEdee",
555
+ false
556
+ ],
557
+ [
558
+ "ordering",
559
+ "isEder",
560
+ false
561
+ ],
562
+ [
563
+ "ordering",
564
+ "object",
565
+ false
566
+ ],
567
+ [
568
+ "ordering",
569
+ "property",
570
+ false
571
+ ],
572
+ [
573
+ "ordering",
574
+ "queryable",
575
+ false
576
+ ],
577
+ [
578
+ "ordering",
579
+ "theAble",
580
+ false
581
+ ],
582
+ [
583
+ "ordering_modifier",
584
+ "ordering_modifier",
585
+ false
586
+ ],
462
587
  [
463
588
  "plusExpression",
464
589
  "mathematicalExpression",
@@ -534,6 +659,96 @@
534
659
  "verb",
535
660
  false
536
661
  ],
662
+ [
663
+ "sort",
664
+ "hierarchyAble",
665
+ false
666
+ ],
667
+ [
668
+ "sort",
669
+ "isEdee",
670
+ false
671
+ ],
672
+ [
673
+ "sort",
674
+ "isEder",
675
+ false
676
+ ],
677
+ [
678
+ "sort",
679
+ "object",
680
+ false
681
+ ],
682
+ [
683
+ "sort",
684
+ "ordering_modifier",
685
+ false
686
+ ],
687
+ [
688
+ "sort",
689
+ "property",
690
+ false
691
+ ],
692
+ [
693
+ "sort",
694
+ "queryable",
695
+ false
696
+ ],
697
+ [
698
+ "sort",
699
+ "theAble",
700
+ false
701
+ ],
702
+ [
703
+ "sort_ordering",
704
+ "adjective",
705
+ true
706
+ ],
707
+ [
708
+ "sort_ordering",
709
+ "concept",
710
+ false
711
+ ],
712
+ [
713
+ "sort_ordering",
714
+ "hierarchyAble",
715
+ false
716
+ ],
717
+ [
718
+ "sort_ordering",
719
+ "isEdee",
720
+ false
721
+ ],
722
+ [
723
+ "sort_ordering",
724
+ "isEder",
725
+ false
726
+ ],
727
+ [
728
+ "sort_ordering",
729
+ "object",
730
+ false
731
+ ],
732
+ [
733
+ "sort_ordering",
734
+ "ordering",
735
+ false
736
+ ],
737
+ [
738
+ "sort_ordering",
739
+ "property",
740
+ false
741
+ ],
742
+ [
743
+ "sort_ordering",
744
+ "queryable",
745
+ false
746
+ ],
747
+ [
748
+ "sort_ordering",
749
+ "theAble",
750
+ false
751
+ ],
537
752
  [
538
753
  "stm_before",
539
754
  "adjective",