ekms 7.12.8-beta.5 → 7.12.8-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +89 -249
- package/common/animals.js +1 -1
- package/common/avatar.js +7 -5
- package/common/characters.js +12 -5
- package/common/crew.instance.json +289 -577
- package/common/crew.js +1 -1
- package/common/currency.js +0 -2
- package/common/dialogues.js +16 -14
- package/common/dimension.instance.json +13 -13
- package/common/dimension.js +1 -1
- package/common/edible.instance.json +293 -297
- package/common/edible.js +1 -1
- package/common/emotions.instance.json +29 -65
- package/common/emotions.js +1 -1
- package/common/fastfood.instance.json +517 -1473
- package/common/fastfood.js +1 -1
- package/common/formulas.instance.json +9 -9
- package/common/formulas.js +2 -2
- package/common/gdefaults.js +2 -0
- package/common/help.js +7 -2
- package/common/help.test.json +9 -5
- package/common/helpers.js +5 -0
- package/common/javascript.js +8 -6
- package/common/kirk.instance.json +1 -1
- package/common/kirk.js +1 -1
- package/common/length.instance.json +49 -229
- package/common/length.js +1 -1
- package/common/math.instance.json +21 -41
- package/common/math.js +1 -1
- package/common/meta.instance.json +1 -1
- package/common/meta.js +35 -10
- package/common/numbers.js +28 -24
- package/common/ordering.instance.json +37 -101
- package/common/ordering.js +1 -1
- package/common/people.instance.json +50 -78
- package/common/people.js +1 -1
- package/common/pipboy.instance.json +197 -201
- package/common/pipboy.js +1 -1
- package/common/pokemon.instance.json +41 -97
- package/common/pokemon.js +1 -1
- package/common/pressure.instance.json +13 -33
- package/common/pressure.js +1 -1
- package/common/properties.instance.json +21 -49
- package/common/properties.js +13 -8
- package/common/reports.instance.json +7 -63
- package/common/reports.js +9 -7
- package/common/scorekeeper.instance.json +1 -1
- package/common/scorekeeper.js +9 -7
- package/common/spock.instance.json +1 -1
- package/common/spock.js +1 -1
- package/common/tell.js +4 -2
- package/common/temperature.instance.json +17 -133
- package/common/temperature.js +1 -1
- package/common/time.js +36 -20
- package/common/time.test.json +66 -44
- package/common/tokenize.js +46 -0
- package/common/tokenize.test.json +2 -0
- package/common/ui.instance.json +1 -1
- package/common/weight.instance.json +33 -201
- package/common/weight.js +1 -1
- package/main.js +2 -0
- package/package.json +7 -3
package/common/time.test.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
0
|
8
8
|
],
|
9
9
|
[
|
10
|
-
"
|
10
|
+
"number",
|
11
11
|
0
|
12
12
|
]
|
13
13
|
]
|
@@ -21,17 +21,18 @@
|
|
21
21
|
"determined": true,
|
22
22
|
"hour": {
|
23
23
|
"dead": true,
|
24
|
-
"
|
24
|
+
"instance": true,
|
25
25
|
"level": 1,
|
26
|
-
"marker": "
|
26
|
+
"marker": "number",
|
27
27
|
"range": {
|
28
28
|
"end": 0,
|
29
29
|
"start": 0
|
30
30
|
},
|
31
31
|
"text": "2",
|
32
32
|
"types": [
|
33
|
-
"
|
33
|
+
"number"
|
34
34
|
],
|
35
|
+
"value": 2,
|
35
36
|
"word": "2"
|
36
37
|
},
|
37
38
|
"level": 1,
|
@@ -53,7 +54,7 @@
|
|
53
54
|
{
|
54
55
|
"counter": 1,
|
55
56
|
"op": [
|
56
|
-
"
|
57
|
+
"number",
|
57
58
|
0
|
58
59
|
],
|
59
60
|
"ops": [
|
@@ -62,7 +63,7 @@
|
|
62
63
|
0
|
63
64
|
],
|
64
65
|
[
|
65
|
-
"
|
66
|
+
"number",
|
66
67
|
0
|
67
68
|
]
|
68
69
|
]
|
@@ -87,6 +88,7 @@
|
|
87
88
|
"dialogues": "dialogues2",
|
88
89
|
"gdefaults": "gdefaults2",
|
89
90
|
"meta": "meta2",
|
91
|
+
"numbers": "numbers2",
|
90
92
|
"pos": "pos2",
|
91
93
|
"punctuation": "punctuation2",
|
92
94
|
"sdefaults": "sdefaults2",
|
@@ -105,6 +107,8 @@
|
|
105
107
|
},
|
106
108
|
"meta2": {
|
107
109
|
},
|
110
|
+
"numbers2": {
|
111
|
+
},
|
108
112
|
"pos2": {
|
109
113
|
},
|
110
114
|
"punctuation2": {
|
@@ -131,17 +135,18 @@
|
|
131
135
|
"determined": true,
|
132
136
|
"hour": {
|
133
137
|
"dead": true,
|
134
|
-
"
|
138
|
+
"instance": true,
|
135
139
|
"level": 1,
|
136
|
-
"marker": "
|
140
|
+
"marker": "number",
|
137
141
|
"range": {
|
138
142
|
"end": 0,
|
139
143
|
"start": 0
|
140
144
|
},
|
141
145
|
"text": "2",
|
142
146
|
"types": [
|
143
|
-
"
|
147
|
+
"number"
|
144
148
|
],
|
149
|
+
"value": 2,
|
145
150
|
"word": "2"
|
146
151
|
},
|
147
152
|
"level": 1,
|
@@ -156,7 +161,7 @@
|
|
156
161
|
},
|
157
162
|
"generatedParenthesized": "",
|
158
163
|
"paraphrases": "2 pm",
|
159
|
-
"paraphrasesParenthesized": "(2 pm)",
|
164
|
+
"paraphrasesParenthesized": "((2) pm)",
|
160
165
|
"responses": [
|
161
166
|
""
|
162
167
|
]
|
@@ -167,7 +172,7 @@
|
|
167
172
|
"2 pm"
|
168
173
|
],
|
169
174
|
"paraphrasesParenthesized": [
|
170
|
-
"(2 pm)"
|
175
|
+
"((2) pm)"
|
171
176
|
],
|
172
177
|
"query": "2 pm",
|
173
178
|
"responses": [
|
@@ -182,15 +187,15 @@
|
|
182
187
|
0
|
183
188
|
],
|
184
189
|
[
|
185
|
-
"
|
190
|
+
"info",
|
186
191
|
0
|
187
192
|
],
|
188
193
|
[
|
189
|
-
"
|
194
|
+
"is",
|
190
195
|
0
|
191
196
|
],
|
192
197
|
[
|
193
|
-
"
|
198
|
+
"number",
|
194
199
|
0
|
195
200
|
],
|
196
201
|
[
|
@@ -216,15 +221,15 @@
|
|
216
221
|
0
|
217
222
|
],
|
218
223
|
[
|
219
|
-
"
|
224
|
+
"info",
|
220
225
|
0
|
221
226
|
],
|
222
227
|
[
|
223
|
-
"
|
228
|
+
"is",
|
224
229
|
0
|
225
230
|
],
|
226
231
|
[
|
227
|
-
"
|
232
|
+
"number",
|
228
233
|
0
|
229
234
|
],
|
230
235
|
[
|
@@ -246,11 +251,11 @@
|
|
246
251
|
0
|
247
252
|
],
|
248
253
|
[
|
249
|
-
"
|
254
|
+
"is",
|
250
255
|
0
|
251
256
|
],
|
252
257
|
[
|
253
|
-
"
|
258
|
+
"number",
|
254
259
|
0
|
255
260
|
],
|
256
261
|
[
|
@@ -264,11 +269,11 @@
|
|
264
269
|
0
|
265
270
|
],
|
266
271
|
[
|
267
|
-
"
|
272
|
+
"is",
|
268
273
|
0
|
269
274
|
],
|
270
275
|
[
|
271
|
-
"
|
276
|
+
"number",
|
272
277
|
0
|
273
278
|
],
|
274
279
|
[
|
@@ -286,11 +291,11 @@
|
|
286
291
|
0
|
287
292
|
],
|
288
293
|
[
|
289
|
-
"
|
294
|
+
"is",
|
290
295
|
0
|
291
296
|
],
|
292
297
|
[
|
293
|
-
"
|
298
|
+
"number",
|
294
299
|
0
|
295
300
|
],
|
296
301
|
[
|
@@ -405,17 +410,18 @@
|
|
405
410
|
"determined": true,
|
406
411
|
"hour": {
|
407
412
|
"dead": true,
|
408
|
-
"
|
413
|
+
"instance": true,
|
409
414
|
"level": 1,
|
410
|
-
"marker": "
|
415
|
+
"marker": "number",
|
411
416
|
"range": {
|
412
417
|
"end": 25,
|
413
418
|
"start": 25
|
414
419
|
},
|
415
420
|
"text": "2",
|
416
421
|
"types": [
|
417
|
-
"
|
422
|
+
"number"
|
418
423
|
],
|
424
|
+
"value": 2,
|
419
425
|
"word": "2"
|
420
426
|
},
|
421
427
|
"level": 1,
|
@@ -497,15 +503,15 @@
|
|
497
503
|
0
|
498
504
|
],
|
499
505
|
[
|
500
|
-
"
|
506
|
+
"info",
|
501
507
|
0
|
502
508
|
],
|
503
509
|
[
|
504
|
-
"
|
510
|
+
"is",
|
505
511
|
0
|
506
512
|
],
|
507
513
|
[
|
508
|
-
"
|
514
|
+
"number",
|
509
515
|
0
|
510
516
|
],
|
511
517
|
[
|
@@ -538,15 +544,15 @@
|
|
538
544
|
0
|
539
545
|
],
|
540
546
|
[
|
541
|
-
"
|
547
|
+
"info",
|
542
548
|
0
|
543
549
|
],
|
544
550
|
[
|
545
|
-
"
|
551
|
+
"is",
|
546
552
|
0
|
547
553
|
],
|
548
554
|
[
|
549
|
-
"
|
555
|
+
"number",
|
550
556
|
0
|
551
557
|
],
|
552
558
|
[
|
@@ -575,11 +581,11 @@
|
|
575
581
|
0
|
576
582
|
],
|
577
583
|
[
|
578
|
-
"
|
584
|
+
"is",
|
579
585
|
0
|
580
586
|
],
|
581
587
|
[
|
582
|
-
"
|
588
|
+
"number",
|
583
589
|
0
|
584
590
|
],
|
585
591
|
[
|
@@ -608,11 +614,11 @@
|
|
608
614
|
0
|
609
615
|
],
|
610
616
|
[
|
611
|
-
"
|
617
|
+
"is",
|
612
618
|
0
|
613
619
|
],
|
614
620
|
[
|
615
|
-
"
|
621
|
+
"number",
|
616
622
|
0
|
617
623
|
],
|
618
624
|
[
|
@@ -628,7 +634,7 @@
|
|
628
634
|
{
|
629
635
|
"counter": 5,
|
630
636
|
"op": [
|
631
|
-
"
|
637
|
+
"number",
|
632
638
|
0
|
633
639
|
],
|
634
640
|
"ops": [
|
@@ -637,11 +643,11 @@
|
|
637
643
|
0
|
638
644
|
],
|
639
645
|
[
|
640
|
-
"
|
646
|
+
"is",
|
641
647
|
0
|
642
648
|
],
|
643
649
|
[
|
644
|
-
"
|
650
|
+
"number",
|
645
651
|
0
|
646
652
|
],
|
647
653
|
[
|
@@ -712,6 +718,7 @@
|
|
712
718
|
"dialogues": "dialogues2",
|
713
719
|
"gdefaults": "gdefaults2",
|
714
720
|
"meta": "meta2",
|
721
|
+
"numbers": "numbers2",
|
715
722
|
"pos": "pos2",
|
716
723
|
"punctuation": "punctuation2",
|
717
724
|
"sdefaults": "sdefaults2",
|
@@ -730,6 +737,8 @@
|
|
730
737
|
},
|
731
738
|
"meta2": {
|
732
739
|
},
|
740
|
+
"numbers2": {
|
741
|
+
},
|
733
742
|
"pos2": {
|
734
743
|
},
|
735
744
|
"punctuation2": {
|
@@ -793,17 +802,18 @@
|
|
793
802
|
"determined": true,
|
794
803
|
"hour": {
|
795
804
|
"dead": true,
|
796
|
-
"
|
805
|
+
"instance": true,
|
797
806
|
"level": 1,
|
798
|
-
"marker": "
|
807
|
+
"marker": "number",
|
799
808
|
"range": {
|
800
809
|
"end": 25,
|
801
810
|
"start": 25
|
802
811
|
},
|
803
812
|
"text": "2",
|
804
813
|
"types": [
|
805
|
-
"
|
814
|
+
"number"
|
806
815
|
],
|
816
|
+
"value": 2,
|
807
817
|
"word": "2"
|
808
818
|
},
|
809
819
|
"level": 1,
|
@@ -869,7 +879,7 @@
|
|
869
879
|
},
|
870
880
|
"generatedParenthesized": "",
|
871
881
|
"paraphrases": "tell me when the time is 2 pm",
|
872
|
-
"paraphrasesParenthesized": "(tell (me) when ((the (time)) is (2 pm)))",
|
882
|
+
"paraphrasesParenthesized": "(tell (me) when ((the (time)) is ((2) pm)))",
|
873
883
|
"responses": [
|
874
884
|
""
|
875
885
|
]
|
@@ -880,7 +890,7 @@
|
|
880
890
|
"tell me when the time is 2 pm"
|
881
891
|
],
|
882
892
|
"paraphrasesParenthesized": [
|
883
|
-
"(tell (me) when ((the (time)) is (2 pm)))"
|
893
|
+
"(tell (me) when ((the (time)) is ((2) pm)))"
|
884
894
|
],
|
885
895
|
"query": "tell me when the time is 2 pm",
|
886
896
|
"responses": [
|
@@ -1386,6 +1396,7 @@
|
|
1386
1396
|
"dialogues": "dialogues2",
|
1387
1397
|
"gdefaults": "gdefaults2",
|
1388
1398
|
"meta": "meta2",
|
1399
|
+
"numbers": "numbers2",
|
1389
1400
|
"pos": "pos2",
|
1390
1401
|
"punctuation": "punctuation2",
|
1391
1402
|
"sdefaults": "sdefaults2",
|
@@ -1404,6 +1415,8 @@
|
|
1404
1415
|
},
|
1405
1416
|
"meta2": {
|
1406
1417
|
},
|
1418
|
+
"numbers2": {
|
1419
|
+
},
|
1407
1420
|
"pos2": {
|
1408
1421
|
},
|
1409
1422
|
"punctuation2": {
|
@@ -2122,6 +2135,7 @@
|
|
2122
2135
|
"dialogues": "dialogues2",
|
2123
2136
|
"gdefaults": "gdefaults2",
|
2124
2137
|
"meta": "meta2",
|
2138
|
+
"numbers": "numbers2",
|
2125
2139
|
"pos": "pos2",
|
2126
2140
|
"punctuation": "punctuation2",
|
2127
2141
|
"sdefaults": "sdefaults2",
|
@@ -2140,6 +2154,8 @@
|
|
2140
2154
|
},
|
2141
2155
|
"meta2": {
|
2142
2156
|
},
|
2157
|
+
"numbers2": {
|
2158
|
+
},
|
2143
2159
|
"pos2": {
|
2144
2160
|
},
|
2145
2161
|
"punctuation2": {
|
@@ -2531,6 +2547,7 @@
|
|
2531
2547
|
"dialogues": "dialogues2",
|
2532
2548
|
"gdefaults": "gdefaults2",
|
2533
2549
|
"meta": "meta2",
|
2550
|
+
"numbers": "numbers2",
|
2534
2551
|
"pos": "pos2",
|
2535
2552
|
"punctuation": "punctuation2",
|
2536
2553
|
"sdefaults": "sdefaults2",
|
@@ -2549,6 +2566,8 @@
|
|
2549
2566
|
},
|
2550
2567
|
"meta2": {
|
2551
2568
|
},
|
2569
|
+
"numbers2": {
|
2570
|
+
},
|
2552
2571
|
"pos2": {
|
2553
2572
|
},
|
2554
2573
|
"punctuation2": {
|
@@ -2905,6 +2924,7 @@
|
|
2905
2924
|
"dialogues": "dialogues2",
|
2906
2925
|
"gdefaults": "gdefaults2",
|
2907
2926
|
"meta": "meta2",
|
2927
|
+
"numbers": "numbers2",
|
2908
2928
|
"pos": "pos2",
|
2909
2929
|
"punctuation": "punctuation2",
|
2910
2930
|
"sdefaults": "sdefaults2",
|
@@ -2923,6 +2943,8 @@
|
|
2923
2943
|
},
|
2924
2944
|
"meta2": {
|
2925
2945
|
},
|
2946
|
+
"numbers2": {
|
2947
|
+
},
|
2926
2948
|
"pos2": {
|
2927
2949
|
},
|
2928
2950
|
"punctuation2": {
|
@@ -0,0 +1,46 @@
|
|
1
|
+
const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
|
+
const { defaultContextCheck } = require('./helpers')
|
3
|
+
const tokenize_tests = require('./tokenize.test.json')
|
4
|
+
|
5
|
+
let configStruct = {
|
6
|
+
name: 'tokenize',
|
7
|
+
operators: [
|
8
|
+
"([unknown])",
|
9
|
+
],
|
10
|
+
bridges: [
|
11
|
+
{ id: "unknown", level: 0, bridge: "{ ...next(operator), unknown: true, dead: true }" },
|
12
|
+
{ id: "unknown", level: 1, bridge: "{ ...next(operator) }" },
|
13
|
+
],
|
14
|
+
words: {
|
15
|
+
patterns: [
|
16
|
+
{ pattern: [{ type: 'space' }, { repeat: true }], defs: [ { remove: true } ] },
|
17
|
+
{ pattern: [{ type: 'alphanumeric' }, { repeat: true }], defs: [ { id: 'unknown', initial: "{ value: text, unknown: true }" } ] },
|
18
|
+
],
|
19
|
+
hierarchy: [
|
20
|
+
{ child: ' ', parent: 'space' },
|
21
|
+
..."0123456789".split("").map((digit) => { return { child: digit, parent: 'digit' } }),
|
22
|
+
{ child: 'lower', parent: 'letter' },
|
23
|
+
{ child: 'upper', parent: 'letter' },
|
24
|
+
...'abcdefghijklmnopqrstuvwxyz'.split("").map((letter) => { return { child: letter, parent: 'lower' } }),
|
25
|
+
...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split("").map((letter) => { return { child: letter, parent: 'upper' } }),
|
26
|
+
{ child: 'letter', parent: 'alphanumeric' },
|
27
|
+
{ child: 'digit', parent: 'alphanumeric' },
|
28
|
+
...`~!@#$%^&*()_+-=[]{}\\|;:,<>/?'"`.split("").map((punctuation) => { return { child: punctuation, parent: 'punctuation' } }),
|
29
|
+
],
|
30
|
+
},
|
31
|
+
};
|
32
|
+
|
33
|
+
createConfig = () => new Config(configStruct, module)
|
34
|
+
|
35
|
+
knowledgeModule( {
|
36
|
+
module,
|
37
|
+
createConfig,
|
38
|
+
description: 'tokenize',
|
39
|
+
test: {
|
40
|
+
name: './tokenize.test.json',
|
41
|
+
contents: tokenize_tests,
|
42
|
+
checks: {
|
43
|
+
context: defaultContextCheck,
|
44
|
+
},
|
45
|
+
},
|
46
|
+
})
|
package/common/ui.instance.json
CHANGED