ekms 7.12.4 → 7.12.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -233,6 +233,10 @@
233
233
  "crew",
234
234
  "isEder"
235
235
  ],
236
+ [
237
+ "crew",
238
+ "member_modifier"
239
+ ],
236
240
  [
237
241
  "crew",
238
242
  "object"
@@ -649,6 +653,10 @@
649
653
  "member",
650
654
  "theAble"
651
655
  ],
656
+ [
657
+ "member_modifier",
658
+ "member_modifier"
659
+ ],
652
660
  [
653
661
  "modifies",
654
662
  "verby"
@@ -797,6 +805,10 @@
797
805
  "photon",
798
806
  "theAble"
799
807
  ],
808
+ [
809
+ "photon",
810
+ "torpedo_modifier"
811
+ ],
800
812
  [
801
813
  "photon_torpedo",
802
814
  "adjective"
@@ -985,6 +997,10 @@
985
997
  "thisitthat",
986
998
  "queryable"
987
999
  ],
1000
+ [
1001
+ "to",
1002
+ "preposition"
1003
+ ],
988
1004
  [
989
1005
  "toAble",
990
1006
  "toAble"
@@ -1025,6 +1041,10 @@
1025
1041
  "torpedo",
1026
1042
  "weapon"
1027
1043
  ],
1044
+ [
1045
+ "torpedo_modifier",
1046
+ "torpedo_modifier"
1047
+ ],
1028
1048
  [
1029
1049
  "type",
1030
1050
  "property"
package/common/stm.js CHANGED
@@ -40,23 +40,27 @@ class API {
40
40
  this._objects.mentioned.unshift(concept)
41
41
  }
42
42
 
43
- mentions(context) {
43
+ mentions(context, useHierarchy=true) {
44
44
  // care about value first
45
45
  for (let m of this._objects.mentioned) {
46
46
  if (context.value && context.value == m.marker) {
47
- return m
47
+ return { ...m, fromSTM: true }
48
48
  }
49
49
  }
50
+
51
+ if (!useHierarchy) {
52
+ return
53
+ }
50
54
  // care about marker second
51
55
  for (let m of this._objects.mentioned) {
52
56
  if (context.marker != 'unknown' && this.isA(m.marker, context.marker)) {
53
- return m
57
+ return { ...m, fromSTM: true }
54
58
  }
55
59
  // if (context.types && context.types.includes(m.marker)) {
56
60
  if (context.types) {
57
61
  for (let parent of context.types) {
58
62
  if (parent != 'unknown' && this.isA(m.marker, parent)) {
59
- return m
63
+ return { ...m, fromSTM: true }
60
64
  }
61
65
  }
62
66
  }
@@ -64,7 +68,7 @@ class API {
64
68
  if (context.types && context.types.length == 1) {
65
69
  for (let m of this._objects.mentioned) {
66
70
  if (context.unknown) {
67
- return m
71
+ return { ...m, fromSTM: true }
68
72
  }
69
73
  }
70
74
  }
@@ -74,7 +78,7 @@ class API {
74
78
  if (!name) {
75
79
  return
76
80
  }
77
- let valueNew = this.mentions({ marker: name, value: name }) || name
81
+ let valueNew = this.mentions({ marker: name, value: name }, false) || name
78
82
  if (valueNew && valueNew.value) {
79
83
  valueNew = valueNew.value
80
84
  }
@@ -90,7 +94,18 @@ const api = new API()
90
94
 
91
95
  let createConfig = () => {
92
96
  const config = new Config({ name: 'stm' }, module)
97
+ config.stop_auto_rebuild()
98
+
99
+ config.initializer( ({config}) => {
100
+ config.addArgs(({kms}) => ({
101
+ mentioned: (context) => {
102
+ kms.stm.api.mentioned(context)
103
+ },
104
+ }))
105
+ })
93
106
  config.api = api
107
+
108
+ config.restart_auto_rebuild()
94
109
  return config
95
110
  }
96
111
 
@@ -364,6 +364,10 @@
364
364
  "mathematical",
365
365
  "object"
366
366
  ],
367
+ [
368
+ "mathematical",
369
+ "operator_modifier"
370
+ ],
367
371
  [
368
372
  "mathematical",
369
373
  "property"
@@ -504,6 +508,10 @@
504
508
  "operator",
505
509
  "theAble"
506
510
  ],
511
+ [
512
+ "operator_modifier",
513
+ "operator_modifier"
514
+ ],
507
515
  [
508
516
  "orAble",
509
517
  "ifAble"
@@ -600,6 +608,10 @@
600
608
  "timesOperator",
601
609
  "mathematicalOperator"
602
610
  ],
611
+ [
612
+ "to",
613
+ "preposition"
614
+ ],
603
615
  [
604
616
  "toAble",
605
617
  "toAble"
@@ -1288,6 +1300,10 @@
1288
1300
  "mathematical",
1289
1301
  "object"
1290
1302
  ],
1303
+ [
1304
+ "mathematical",
1305
+ "operator_modifier"
1306
+ ],
1291
1307
  [
1292
1308
  "mathematical",
1293
1309
  "property"
@@ -1428,6 +1444,10 @@
1428
1444
  "operator",
1429
1445
  "theAble"
1430
1446
  ],
1447
+ [
1448
+ "operator_modifier",
1449
+ "operator_modifier"
1450
+ ],
1431
1451
  [
1432
1452
  "orAble",
1433
1453
  "ifAble"
@@ -1556,6 +1576,10 @@
1556
1576
  "timesOperator",
1557
1577
  "mathematicalOperator"
1558
1578
  ],
1579
+ [
1580
+ "to",
1581
+ "preposition"
1582
+ ],
1559
1583
  [
1560
1584
  "toAble",
1561
1585
  "toAble"
@@ -2167,6 +2191,36 @@
2167
2191
  1
2168
2192
  ]
2169
2193
  ],
2194
+ [
2195
+ [
2196
+ "is",
2197
+ 0
2198
+ ],
2199
+ [
2200
+ "list",
2201
+ 0
2202
+ ],
2203
+ [
2204
+ "propertyOf",
2205
+ 0
2206
+ ],
2207
+ [
2208
+ "temperature",
2209
+ 0
2210
+ ],
2211
+ [
2212
+ "unit",
2213
+ 0
2214
+ ],
2215
+ [
2216
+ "unknown",
2217
+ 0
2218
+ ],
2219
+ [
2220
+ "unknown",
2221
+ 1
2222
+ ]
2223
+ ],
2170
2224
  [
2171
2225
  [
2172
2226
  "is",
@@ -2768,6 +2822,10 @@
2768
2822
  "mathematical",
2769
2823
  "object"
2770
2824
  ],
2825
+ [
2826
+ "mathematical",
2827
+ "operator_modifier"
2828
+ ],
2771
2829
  [
2772
2830
  "mathematical",
2773
2831
  "property"
@@ -2908,6 +2966,10 @@
2908
2966
  "operator",
2909
2967
  "theAble"
2910
2968
  ],
2969
+ [
2970
+ "operator_modifier",
2971
+ "operator_modifier"
2972
+ ],
2911
2973
  [
2912
2974
  "orAble",
2913
2975
  "ifAble"
@@ -3036,6 +3098,10 @@
3036
3098
  "timesOperator",
3037
3099
  "mathematicalOperator"
3038
3100
  ],
3101
+ [
3102
+ "to",
3103
+ "preposition"
3104
+ ],
3039
3105
  [
3040
3106
  "toAble",
3041
3107
  "toAble"
@@ -3612,36 +3678,6 @@
3612
3678
  0
3613
3679
  ]
3614
3680
  ],
3615
- [
3616
- [
3617
- "celcius",
3618
- 0
3619
- ],
3620
- [
3621
- "divideByOperator",
3622
- 0
3623
- ],
3624
- [
3625
- "equals",
3626
- 0
3627
- ],
3628
- [
3629
- "fahrenheit",
3630
- 0
3631
- ],
3632
- [
3633
- "number",
3634
- 0
3635
- ],
3636
- [
3637
- "plusOperator",
3638
- 0
3639
- ],
3640
- [
3641
- "timesOperator",
3642
- 0
3643
- ]
3644
- ],
3645
3681
  [
3646
3682
  [
3647
3683
  "celcius",
@@ -4193,6 +4229,10 @@
4193
4229
  "mathematical",
4194
4230
  "object"
4195
4231
  ],
4232
+ [
4233
+ "mathematical",
4234
+ "operator_modifier"
4235
+ ],
4196
4236
  [
4197
4237
  "mathematical",
4198
4238
  "property"
@@ -4333,6 +4373,10 @@
4333
4373
  "operator",
4334
4374
  "theAble"
4335
4375
  ],
4376
+ [
4377
+ "operator_modifier",
4378
+ "operator_modifier"
4379
+ ],
4336
4380
  [
4337
4381
  "orAble",
4338
4382
  "ifAble"
@@ -4461,6 +4505,10 @@
4461
4505
  "timesOperator",
4462
4506
  "mathematicalOperator"
4463
4507
  ],
4508
+ [
4509
+ "to",
4510
+ "preposition"
4511
+ ],
4464
4512
  [
4465
4513
  "toAble",
4466
4514
  "toAble"
@@ -5125,48 +5173,6 @@
5125
5173
  0
5126
5174
  ]
5127
5175
  ],
5128
- [
5129
- [
5130
- "celcius",
5131
- 0
5132
- ],
5133
- [
5134
- "divideByOperator",
5135
- 0
5136
- ],
5137
- [
5138
- "equals",
5139
- 0
5140
- ],
5141
- [
5142
- "fahrenheit",
5143
- 0
5144
- ],
5145
- [
5146
- "leftParenthesis",
5147
- 0
5148
- ],
5149
- [
5150
- "minusOperator",
5151
- 0
5152
- ],
5153
- [
5154
- "number",
5155
- 0
5156
- ],
5157
- [
5158
- "plusOperator",
5159
- 0
5160
- ],
5161
- [
5162
- "rightParenthesis",
5163
- 0
5164
- ],
5165
- [
5166
- "timesOperator",
5167
- 0
5168
- ]
5169
- ],
5170
5176
  [
5171
5177
  [
5172
5178
  "celcius",
@@ -5295,32 +5301,6 @@
5295
5301
  0
5296
5302
  ]
5297
5303
  ],
5298
- [
5299
- [
5300
- "celcius",
5301
- 0
5302
- ],
5303
- [
5304
- "divideByOperator",
5305
- 0
5306
- ],
5307
- [
5308
- "equals",
5309
- 0
5310
- ],
5311
- [
5312
- "number",
5313
- 0
5314
- ],
5315
- [
5316
- "plusOperator",
5317
- 0
5318
- ],
5319
- [
5320
- "timesOperator",
5321
- 0
5322
- ]
5323
- ],
5324
5304
  [
5325
5305
  [
5326
5306
  "celcius",
@@ -5536,78 +5516,6 @@
5536
5516
  0
5537
5517
  ]
5538
5518
  ],
5539
- [
5540
- [
5541
- "celcius",
5542
- 0
5543
- ],
5544
- [
5545
- "divideByOperator",
5546
- 0
5547
- ],
5548
- [
5549
- "equals",
5550
- 0
5551
- ],
5552
- [
5553
- "fahrenheit",
5554
- 0
5555
- ],
5556
- [
5557
- "leftParenthesis",
5558
- 0
5559
- ],
5560
- [
5561
- "minusOperator",
5562
- 0
5563
- ],
5564
- [
5565
- "number",
5566
- 0
5567
- ],
5568
- [
5569
- "plusOperator",
5570
- 0
5571
- ],
5572
- [
5573
- "rightParenthesis",
5574
- 0
5575
- ],
5576
- [
5577
- "timesOperator",
5578
- 0
5579
- ]
5580
- ],
5581
- [
5582
- [
5583
- "celcius",
5584
- 0
5585
- ],
5586
- [
5587
- "divideByOperator",
5588
- 0
5589
- ],
5590
- [
5591
- "equals",
5592
- 0
5593
- ],
5594
- [
5595
- "fahrenheit",
5596
- 0
5597
- ],
5598
- [
5599
- "number",
5600
- 0
5601
- ],
5602
- [
5603
- "plusOperator",
5604
- 0
5605
- ],
5606
- [
5607
- "timesOperator",
5608
- 0
5609
- ]
5610
- ],
5611
5519
  [
5612
5520
  [
5613
5521
  "celcius",
@@ -5805,10 +5713,6 @@
5805
5713
  "equals",
5806
5714
  0
5807
5715
  ],
5808
- [
5809
- "number",
5810
- 0
5811
- ],
5812
5716
  [
5813
5717
  "plusOperator",
5814
5718
  0
@@ -5841,10 +5745,6 @@
5841
5745
  ]
5842
5746
  ],
5843
5747
  [
5844
- [
5845
- "celcius",
5846
- 0
5847
- ],
5848
5748
  [
5849
5749
  "divideByOperator",
5850
5750
  0
@@ -5856,10 +5756,6 @@
5856
5756
  [
5857
5757
  "plusOperator",
5858
5758
  0
5859
- ],
5860
- [
5861
- "timesOperator",
5862
- 0
5863
5759
  ]
5864
5760
  ],
5865
5761
  [
@@ -5888,6 +5784,10 @@
5888
5784
  [
5889
5785
  "plusOperator",
5890
5786
  0
5787
+ ],
5788
+ [
5789
+ "timesOperator",
5790
+ 0
5891
5791
  ]
5892
5792
  ],
5893
5793
  [
@@ -5909,10 +5809,6 @@
5909
5809
  ]
5910
5810
  ],
5911
5811
  [
5912
- [
5913
- "divideByOperator",
5914
- 0
5915
- ],
5916
5812
  [
5917
5813
  "equals",
5918
5814
  0
@@ -5920,10 +5816,6 @@
5920
5816
  [
5921
5817
  "plusOperator",
5922
5818
  0
5923
- ],
5924
- [
5925
- "timesOperator",
5926
- 0
5927
5819
  ]
5928
5820
  ],
5929
5821
  [
@@ -5938,11 +5830,27 @@
5938
5830
  ],
5939
5831
  [
5940
5832
  [
5941
- "equals",
5833
+ "is",
5942
5834
  0
5943
5835
  ],
5944
5836
  [
5945
- "plusOperator",
5837
+ "list",
5838
+ 0
5839
+ ],
5840
+ [
5841
+ "propertyOf",
5842
+ 0
5843
+ ],
5844
+ [
5845
+ "temperature",
5846
+ 0
5847
+ ],
5848
+ [
5849
+ "unit",
5850
+ 0
5851
+ ],
5852
+ [
5853
+ "unknown",
5946
5854
  0
5947
5855
  ]
5948
5856
  ],
@@ -5970,6 +5878,10 @@
5970
5878
  [
5971
5879
  "unknown",
5972
5880
  0
5881
+ ],
5882
+ [
5883
+ "unknown",
5884
+ 1
5973
5885
  ]
5974
5886
  ],
5975
5887
  [
@@ -284,6 +284,10 @@
284
284
  "mathematical",
285
285
  "object"
286
286
  ],
287
+ [
288
+ "mathematical",
289
+ "operator_modifier"
290
+ ],
287
291
  [
288
292
  "mathematical",
289
293
  "property"
@@ -424,6 +428,10 @@
424
428
  "operator",
425
429
  "theAble"
426
430
  ],
431
+ [
432
+ "operator_modifier",
433
+ "operator_modifier"
434
+ ],
427
435
  [
428
436
  "orAble",
429
437
  "ifAble"
@@ -532,6 +540,10 @@
532
540
  "timesOperator",
533
541
  "mathematicalOperator"
534
542
  ],
543
+ [
544
+ "to",
545
+ "preposition"
546
+ ],
535
547
  [
536
548
  "toAble",
537
549
  "toAble"