ekms 8.0.0-beta.78 → 8.0.0-beta.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/colors.instance.json +0 -28
- package/common/crew.instance.json +36 -0
- package/common/edible.instance.json +2 -58
- package/common/fastfood.instance.json +259 -979
- package/common/help.test.json +20 -26
- package/common/ordering.instance.json +0 -68
- package/common/ordinals.instance.json +2 -0
- package/common/ordinals.js +60 -0
- package/common/ordinals.test.json +306 -0
- package/common/pipboy.instance.json +0 -56
- package/common/reports.instance.json +1 -1
- package/main.js +2 -0
- package/package.json +6 -2
package/common/help.test.json
CHANGED
@@ -19,24 +19,6 @@
|
|
19
19
|
0
|
20
20
|
]
|
21
21
|
],
|
22
|
-
[
|
23
|
-
[
|
24
|
-
"help",
|
25
|
-
0
|
26
|
-
],
|
27
|
-
[
|
28
|
-
"km",
|
29
|
-
0
|
30
|
-
],
|
31
|
-
[
|
32
|
-
"list",
|
33
|
-
0
|
34
|
-
],
|
35
|
-
[
|
36
|
-
"withKM",
|
37
|
-
0
|
38
|
-
]
|
39
|
-
],
|
40
22
|
[
|
41
23
|
[
|
42
24
|
"help",
|
@@ -135,7 +117,7 @@
|
|
135
117
|
}
|
136
118
|
],
|
137
119
|
"generatedParenthesized": [
|
138
|
-
"( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n
|
120
|
+
"( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n)"
|
139
121
|
],
|
140
122
|
"metadata": {
|
141
123
|
"opChoices": [
|
@@ -249,6 +231,8 @@
|
|
249
231
|
"objects": {
|
250
232
|
"nameToUUID": {
|
251
233
|
"articles": "articles2",
|
234
|
+
"asking": "asking2",
|
235
|
+
"conjunction": "conjunction2",
|
252
236
|
"dialogues": "dialogues2",
|
253
237
|
"evaluate": "evaluate2",
|
254
238
|
"gdefaults": "gdefaults2",
|
@@ -264,6 +248,10 @@
|
|
264
248
|
"namespaced": {
|
265
249
|
"articles2": {
|
266
250
|
},
|
251
|
+
"asking2": {
|
252
|
+
},
|
253
|
+
"conjunction2": {
|
254
|
+
},
|
267
255
|
"dialogues2": {
|
268
256
|
"idSuffix": "",
|
269
257
|
"mentioned": [
|
@@ -362,11 +350,11 @@
|
|
362
350
|
"value": "help",
|
363
351
|
"word": "help"
|
364
352
|
},
|
365
|
-
"generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n
|
353
|
+
"generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n)",
|
366
354
|
"paraphrases": "help",
|
367
355
|
"paraphrasesParenthesized": "(help)",
|
368
356
|
"responses": [
|
369
|
-
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n
|
357
|
+
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n"
|
370
358
|
]
|
371
359
|
}
|
372
360
|
]
|
@@ -379,7 +367,7 @@
|
|
379
367
|
],
|
380
368
|
"query": "help with help and dialogues",
|
381
369
|
"responses": [
|
382
|
-
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n
|
370
|
+
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n"
|
383
371
|
]
|
384
372
|
},
|
385
373
|
{
|
@@ -407,7 +395,7 @@
|
|
407
395
|
}
|
408
396
|
],
|
409
397
|
"generatedParenthesized": [
|
410
|
-
"( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n
|
398
|
+
"( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
|
411
399
|
],
|
412
400
|
"metadata": {
|
413
401
|
"opChoices": [
|
@@ -429,6 +417,8 @@
|
|
429
417
|
"objects": {
|
430
418
|
"nameToUUID": {
|
431
419
|
"articles": "articles2",
|
420
|
+
"asking": "asking2",
|
421
|
+
"conjunction": "conjunction2",
|
432
422
|
"dialogues": "dialogues2",
|
433
423
|
"evaluate": "evaluate2",
|
434
424
|
"gdefaults": "gdefaults2",
|
@@ -444,6 +434,10 @@
|
|
444
434
|
"namespaced": {
|
445
435
|
"articles2": {
|
446
436
|
},
|
437
|
+
"asking2": {
|
438
|
+
},
|
439
|
+
"conjunction2": {
|
440
|
+
},
|
447
441
|
"dialogues2": {
|
448
442
|
"idSuffix": "",
|
449
443
|
"mentioned": [
|
@@ -495,11 +489,11 @@
|
|
495
489
|
"value": "help",
|
496
490
|
"word": "help"
|
497
491
|
},
|
498
|
-
"generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n
|
492
|
+
"generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
|
499
493
|
"paraphrases": "help",
|
500
494
|
"paraphrasesParenthesized": "(help)",
|
501
495
|
"responses": [
|
502
|
-
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n
|
496
|
+
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
|
503
497
|
]
|
504
498
|
}
|
505
499
|
]
|
@@ -512,7 +506,7 @@
|
|
512
506
|
],
|
513
507
|
"query": "help",
|
514
508
|
"responses": [
|
515
|
-
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n
|
509
|
+
" NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n NAME: asking\n DESCRIPTION: asking the user questions\n\n SAMPLE SENTENCES\n\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n whichOnesTestSetup apple banana pear\\npear\n whichOnesTestSetup apple banana pear\\ngoat\n whichOnesTestSetup apple banana pear\\nnevermind\n whichOnesTestSetup apple banana pear\\napple and pear\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n NAME: stm\n DESCRIPTION: short term memory\n\n SAMPLE SENTENCES\n\n remember m1\n previous memorable\n m1\n remember m1\\nevaluate the memorable\n the memorable before\n remember m1\\nremember m2\\nevaluate the memorable before\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: conjunction\n DESCRIPTION: framework for conjunction\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n\n NAME: evaluate\n DESCRIPTION: Explicit handling of evaluate\n\n SAMPLE SENTENCES\n\n evaluate value1\n\n NAME: articles\n DESCRIPTION: articles\n\n SAMPLE SENTENCES\n\n the theable\n a theable\n\n\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
|
516
510
|
]
|
517
511
|
}
|
518
512
|
]
|
@@ -2037,40 +2037,6 @@
|
|
2037
2037
|
0
|
2038
2038
|
]
|
2039
2039
|
],
|
2040
|
-
[
|
2041
|
-
[
|
2042
|
-
"if",
|
2043
|
-
0
|
2044
|
-
],
|
2045
|
-
[
|
2046
|
-
"like",
|
2047
|
-
0
|
2048
|
-
],
|
2049
|
-
[
|
2050
|
-
"love",
|
2051
|
-
0
|
2052
|
-
],
|
2053
|
-
[
|
2054
|
-
"orList",
|
2055
|
-
0
|
2056
|
-
],
|
2057
|
-
[
|
2058
|
-
"then",
|
2059
|
-
0
|
2060
|
-
],
|
2061
|
-
[
|
2062
|
-
"unknown",
|
2063
|
-
0
|
2064
|
-
],
|
2065
|
-
[
|
2066
|
-
"unknown",
|
2067
|
-
1
|
2068
|
-
],
|
2069
|
-
[
|
2070
|
-
"want",
|
2071
|
-
0
|
2072
|
-
]
|
2073
|
-
],
|
2074
2040
|
[
|
2075
2041
|
[
|
2076
2042
|
"if",
|
@@ -2462,40 +2428,6 @@
|
|
2462
2428
|
0
|
2463
2429
|
]
|
2464
2430
|
],
|
2465
|
-
[
|
2466
|
-
[
|
2467
|
-
"if",
|
2468
|
-
0
|
2469
|
-
],
|
2470
|
-
[
|
2471
|
-
"like",
|
2472
|
-
0
|
2473
|
-
],
|
2474
|
-
[
|
2475
|
-
"love",
|
2476
|
-
0
|
2477
|
-
],
|
2478
|
-
[
|
2479
|
-
"orList",
|
2480
|
-
0
|
2481
|
-
],
|
2482
|
-
[
|
2483
|
-
"then",
|
2484
|
-
0
|
2485
|
-
],
|
2486
|
-
[
|
2487
|
-
"unknown",
|
2488
|
-
0
|
2489
|
-
],
|
2490
|
-
[
|
2491
|
-
"unknown",
|
2492
|
-
1
|
2493
|
-
],
|
2494
|
-
[
|
2495
|
-
"want",
|
2496
|
-
0
|
2497
|
-
]
|
2498
|
-
],
|
2499
2431
|
[
|
2500
2432
|
[
|
2501
2433
|
"if",
|
@@ -0,0 +1,60 @@
|
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
|
+
const { defaultContextCheck } = require('./helpers')
|
3
|
+
const ordinals_tests = require('./ordinals.test.json')
|
4
|
+
const numbers = require('./numbers')
|
5
|
+
const pos = require('./pos')
|
6
|
+
|
7
|
+
let config = {
|
8
|
+
name: 'ordinals',
|
9
|
+
operators: [
|
10
|
+
"([ordinal])",
|
11
|
+
"([orderable])",
|
12
|
+
"((ordinal/*) [ordinalOnOrdered|] (orderable/*))",
|
13
|
+
],
|
14
|
+
bridges: [
|
15
|
+
{
|
16
|
+
id: "ordinal",
|
17
|
+
isA: ['number'],
|
18
|
+
bridge: "{ instance: false, ordinal: true, ...next(operator) }"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
id: "orderable",
|
22
|
+
bridge: "{ ...next(operator) }"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
id: "ordinalOnOrdered",
|
26
|
+
isA: ['adjective'],
|
27
|
+
convolution: true,
|
28
|
+
bridge: "{ ...after[0], ordinal: before[0], modifiers: append(['ordinal'], after[0].modifiers) }"
|
29
|
+
},
|
30
|
+
],
|
31
|
+
words: {
|
32
|
+
"literals": {
|
33
|
+
"first": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, instance: true }" }],
|
34
|
+
"1st": [{"id": "ordinal", "initial": "{ value: 1, ordinal: true, instance: true }" }],
|
35
|
+
"second": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, instance: true }" }],
|
36
|
+
"2nd": [{"id": "ordinal", "initial": "{ value: 2, ordinal: true, instance: true }" }],
|
37
|
+
"third": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, instance: true }" }],
|
38
|
+
"3rd": [{"id": "ordinal", "initial": "{ value: 3, ordinal: true, instance: true }" }],
|
39
|
+
},
|
40
|
+
patterns: [
|
41
|
+
{ "pattern": [{ type: 'digit' }, { repeat: true }, 'th'], defs: [{id: "ordinal", uuid: '1', initial: "{ value: int(substr(text, -2)), ordinal: true, instance: true }" }]},
|
42
|
+
],
|
43
|
+
},
|
44
|
+
};
|
45
|
+
|
46
|
+
knowledgeModule( {
|
47
|
+
config,
|
48
|
+
includes: [pos, numbers],
|
49
|
+
|
50
|
+
module,
|
51
|
+
description: 'talking about ordinals',
|
52
|
+
test: {
|
53
|
+
name: './ordinals.test.json',
|
54
|
+
contents: ordinals_tests,
|
55
|
+
checks: {
|
56
|
+
context: defaultContextCheck,
|
57
|
+
},
|
58
|
+
|
59
|
+
},
|
60
|
+
})
|
@@ -0,0 +1,306 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"associations": [
|
4
|
+
[
|
5
|
+
[
|
6
|
+
"orderable",
|
7
|
+
0
|
8
|
+
],
|
9
|
+
[
|
10
|
+
"ordinal",
|
11
|
+
0
|
12
|
+
]
|
13
|
+
]
|
14
|
+
],
|
15
|
+
"config": {
|
16
|
+
},
|
17
|
+
"contexts": [
|
18
|
+
{
|
19
|
+
"dead": true,
|
20
|
+
"default": true,
|
21
|
+
"level": 1,
|
22
|
+
"marker": "orderable",
|
23
|
+
"modifiers": [
|
24
|
+
"ordinal"
|
25
|
+
],
|
26
|
+
"ordinal": {
|
27
|
+
"dead": true,
|
28
|
+
"instance": true,
|
29
|
+
"level": 1,
|
30
|
+
"marker": "ordinal",
|
31
|
+
"ordinal": true,
|
32
|
+
"range": {
|
33
|
+
"end": 2,
|
34
|
+
"start": 0
|
35
|
+
},
|
36
|
+
"text": "1st",
|
37
|
+
"types": [
|
38
|
+
"ordinal"
|
39
|
+
],
|
40
|
+
"value": 1,
|
41
|
+
"word": "1st"
|
42
|
+
},
|
43
|
+
"range": {
|
44
|
+
"end": 12,
|
45
|
+
"start": 0
|
46
|
+
},
|
47
|
+
"text": "1st orderable",
|
48
|
+
"topLevel": true,
|
49
|
+
"types": [
|
50
|
+
"orderable"
|
51
|
+
],
|
52
|
+
"value": "orderable",
|
53
|
+
"word": "orderable"
|
54
|
+
}
|
55
|
+
],
|
56
|
+
"developerTest": false,
|
57
|
+
"generatedParenthesized": [
|
58
|
+
""
|
59
|
+
],
|
60
|
+
"metadata": {
|
61
|
+
"opChoices": [
|
62
|
+
{
|
63
|
+
"counter": 1,
|
64
|
+
"op": [
|
65
|
+
"ordinal",
|
66
|
+
0
|
67
|
+
],
|
68
|
+
"ops": [
|
69
|
+
[
|
70
|
+
"orderable",
|
71
|
+
0
|
72
|
+
],
|
73
|
+
[
|
74
|
+
"ordinal",
|
75
|
+
0
|
76
|
+
],
|
77
|
+
[
|
78
|
+
"ordinalOnOrdered",
|
79
|
+
0
|
80
|
+
]
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"counter": 2,
|
85
|
+
"op": [
|
86
|
+
"orderable",
|
87
|
+
0
|
88
|
+
],
|
89
|
+
"ops": [
|
90
|
+
[
|
91
|
+
"orderable",
|
92
|
+
0
|
93
|
+
],
|
94
|
+
[
|
95
|
+
"ordinalOnOrdered",
|
96
|
+
0
|
97
|
+
]
|
98
|
+
]
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"counter": 3,
|
102
|
+
"op": [
|
103
|
+
"ordinalOnOrdered",
|
104
|
+
0
|
105
|
+
],
|
106
|
+
"ops": [
|
107
|
+
[
|
108
|
+
"ordinalOnOrdered",
|
109
|
+
0
|
110
|
+
]
|
111
|
+
]
|
112
|
+
}
|
113
|
+
]
|
114
|
+
},
|
115
|
+
"objects": {
|
116
|
+
"nameToUUID": {
|
117
|
+
"gdefaults": "gdefaults2",
|
118
|
+
"numbers": "numbers2",
|
119
|
+
"ordinals": "ordinals1",
|
120
|
+
"pos": "pos2",
|
121
|
+
"punctuation": "punctuation2",
|
122
|
+
"sdefaults": "sdefaults2",
|
123
|
+
"tokenize": "tokenize2"
|
124
|
+
},
|
125
|
+
"namespaced": {
|
126
|
+
"gdefaults2": {
|
127
|
+
},
|
128
|
+
"numbers2": {
|
129
|
+
},
|
130
|
+
"ordinals1": {
|
131
|
+
},
|
132
|
+
"pos2": {
|
133
|
+
},
|
134
|
+
"punctuation2": {
|
135
|
+
},
|
136
|
+
"sdefaults2": {
|
137
|
+
},
|
138
|
+
"tokenize2": {
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"processed": [
|
142
|
+
{
|
143
|
+
"context": {
|
144
|
+
"dead": true,
|
145
|
+
"default": true,
|
146
|
+
"level": 1,
|
147
|
+
"marker": "orderable",
|
148
|
+
"modifiers": [
|
149
|
+
"ordinal"
|
150
|
+
],
|
151
|
+
"ordinal": {
|
152
|
+
"dead": true,
|
153
|
+
"instance": true,
|
154
|
+
"level": 1,
|
155
|
+
"marker": "ordinal",
|
156
|
+
"ordinal": true,
|
157
|
+
"range": {
|
158
|
+
"end": 2,
|
159
|
+
"start": 0
|
160
|
+
},
|
161
|
+
"text": "1st",
|
162
|
+
"types": [
|
163
|
+
"ordinal"
|
164
|
+
],
|
165
|
+
"value": 1,
|
166
|
+
"word": "1st"
|
167
|
+
},
|
168
|
+
"range": {
|
169
|
+
"end": 12,
|
170
|
+
"start": 0
|
171
|
+
},
|
172
|
+
"text": "1st orderable",
|
173
|
+
"topLevel": true,
|
174
|
+
"types": [
|
175
|
+
"orderable"
|
176
|
+
],
|
177
|
+
"value": "orderable",
|
178
|
+
"word": "orderable"
|
179
|
+
},
|
180
|
+
"generatedParenthesized": "",
|
181
|
+
"paraphrases": "1st orderable",
|
182
|
+
"paraphrasesParenthesized": "((1st) (orderable))",
|
183
|
+
"responses": [
|
184
|
+
""
|
185
|
+
]
|
186
|
+
}
|
187
|
+
]
|
188
|
+
},
|
189
|
+
"paraphrases": [
|
190
|
+
"1st orderable"
|
191
|
+
],
|
192
|
+
"paraphrasesParenthesized": [
|
193
|
+
"((1st) (orderable))"
|
194
|
+
],
|
195
|
+
"query": "1st orderable",
|
196
|
+
"responses": [
|
197
|
+
""
|
198
|
+
]
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"associations": [
|
202
|
+
],
|
203
|
+
"config": {
|
204
|
+
},
|
205
|
+
"contexts": [
|
206
|
+
{
|
207
|
+
"dead": true,
|
208
|
+
"instance": true,
|
209
|
+
"level": 1,
|
210
|
+
"marker": "ordinal",
|
211
|
+
"ordinal": true,
|
212
|
+
"range": {
|
213
|
+
"end": 2,
|
214
|
+
"start": 0
|
215
|
+
},
|
216
|
+
"text": "4th",
|
217
|
+
"topLevel": true,
|
218
|
+
"value": 4,
|
219
|
+
"word": "4th"
|
220
|
+
}
|
221
|
+
],
|
222
|
+
"developerTest": false,
|
223
|
+
"generatedParenthesized": [
|
224
|
+
""
|
225
|
+
],
|
226
|
+
"metadata": {
|
227
|
+
"opChoices": [
|
228
|
+
{
|
229
|
+
"counter": 1,
|
230
|
+
"op": [
|
231
|
+
"ordinal",
|
232
|
+
0
|
233
|
+
],
|
234
|
+
"ops": [
|
235
|
+
[
|
236
|
+
"ordinal",
|
237
|
+
0
|
238
|
+
]
|
239
|
+
]
|
240
|
+
}
|
241
|
+
]
|
242
|
+
},
|
243
|
+
"objects": {
|
244
|
+
"nameToUUID": {
|
245
|
+
"gdefaults": "gdefaults2",
|
246
|
+
"numbers": "numbers2",
|
247
|
+
"ordinals": "ordinals1",
|
248
|
+
"pos": "pos2",
|
249
|
+
"punctuation": "punctuation2",
|
250
|
+
"sdefaults": "sdefaults2",
|
251
|
+
"tokenize": "tokenize2"
|
252
|
+
},
|
253
|
+
"namespaced": {
|
254
|
+
"gdefaults2": {
|
255
|
+
},
|
256
|
+
"numbers2": {
|
257
|
+
},
|
258
|
+
"ordinals1": {
|
259
|
+
},
|
260
|
+
"pos2": {
|
261
|
+
},
|
262
|
+
"punctuation2": {
|
263
|
+
},
|
264
|
+
"sdefaults2": {
|
265
|
+
},
|
266
|
+
"tokenize2": {
|
267
|
+
}
|
268
|
+
},
|
269
|
+
"processed": [
|
270
|
+
{
|
271
|
+
"context": {
|
272
|
+
"dead": true,
|
273
|
+
"instance": true,
|
274
|
+
"level": 1,
|
275
|
+
"marker": "ordinal",
|
276
|
+
"ordinal": true,
|
277
|
+
"range": {
|
278
|
+
"end": 2,
|
279
|
+
"start": 0
|
280
|
+
},
|
281
|
+
"text": "4th",
|
282
|
+
"topLevel": true,
|
283
|
+
"value": 4,
|
284
|
+
"word": "4th"
|
285
|
+
},
|
286
|
+
"generatedParenthesized": "",
|
287
|
+
"paraphrases": "4th",
|
288
|
+
"paraphrasesParenthesized": "(4th)",
|
289
|
+
"responses": [
|
290
|
+
""
|
291
|
+
]
|
292
|
+
}
|
293
|
+
]
|
294
|
+
},
|
295
|
+
"paraphrases": [
|
296
|
+
"4th"
|
297
|
+
],
|
298
|
+
"paraphrasesParenthesized": [
|
299
|
+
"(4th)"
|
300
|
+
],
|
301
|
+
"query": "4th",
|
302
|
+
"responses": [
|
303
|
+
""
|
304
|
+
]
|
305
|
+
}
|
306
|
+
]
|
@@ -1711,20 +1711,6 @@
|
|
1711
1711
|
1
|
1712
1712
|
]
|
1713
1713
|
],
|
1714
|
-
[
|
1715
|
-
[
|
1716
|
-
"is",
|
1717
|
-
0
|
1718
|
-
],
|
1719
|
-
[
|
1720
|
-
"list",
|
1721
|
-
1
|
1722
|
-
],
|
1723
|
-
[
|
1724
|
-
"unknown",
|
1725
|
-
1
|
1726
|
-
]
|
1727
|
-
],
|
1728
1714
|
[
|
1729
1715
|
[
|
1730
1716
|
"is",
|
@@ -8342,20 +8328,6 @@
|
|
8342
8328
|
1
|
8343
8329
|
]
|
8344
8330
|
],
|
8345
|
-
[
|
8346
|
-
[
|
8347
|
-
"is",
|
8348
|
-
0
|
8349
|
-
],
|
8350
|
-
[
|
8351
|
-
"list",
|
8352
|
-
1
|
8353
|
-
],
|
8354
|
-
[
|
8355
|
-
"unknown",
|
8356
|
-
1
|
8357
|
-
]
|
8358
|
-
],
|
8359
8331
|
[
|
8360
8332
|
[
|
8361
8333
|
"is",
|
@@ -29736,34 +29708,6 @@
|
|
29736
29708
|
1
|
29737
29709
|
]
|
29738
29710
|
],
|
29739
|
-
[
|
29740
|
-
[
|
29741
|
-
"is",
|
29742
|
-
0
|
29743
|
-
],
|
29744
|
-
[
|
29745
|
-
"list",
|
29746
|
-
1
|
29747
|
-
],
|
29748
|
-
[
|
29749
|
-
"unknown",
|
29750
|
-
1
|
29751
|
-
]
|
29752
|
-
],
|
29753
|
-
[
|
29754
|
-
[
|
29755
|
-
"is",
|
29756
|
-
0
|
29757
|
-
],
|
29758
|
-
[
|
29759
|
-
"list",
|
29760
|
-
1
|
29761
|
-
],
|
29762
|
-
[
|
29763
|
-
"unknown",
|
29764
|
-
1
|
29765
|
-
]
|
29766
|
-
],
|
29767
29711
|
[
|
29768
29712
|
[
|
29769
29713
|
"is",
|