ekms 8.0.0-beta.9 → 8.0.0-beta.90
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/animals.instance.json +2915 -1553
- package/common/animals.js +17 -20
- package/common/articles.js +103 -0
- package/common/articles.test.json +310 -0
- package/common/asking.instance.json +2 -0
- package/common/asking.js +253 -0
- package/common/asking.test.json +2290 -0
- package/common/avatar.js +6 -10
- package/common/characters.js +23 -29
- package/common/colors.instance.json +7487 -4114
- package/common/colors.js +5 -9
- package/common/colors.test.json +345 -780
- package/common/comparable.instance.json +1750 -0
- package/common/comparable.js +36 -28
- package/common/comparable.test.json +1196 -2
- package/common/concept.js +121 -119
- package/common/conjunction.instance.json +2 -0
- package/common/conjunction.js +104 -0
- package/common/conjunction.test.json +322 -0
- package/common/countable.js +20 -14
- package/common/countable.test.json +1050 -0
- package/common/crew.instance.json +13553 -7026
- package/common/crew.js +37 -42
- package/common/crew.test.json +714 -452
- package/common/currency.js +28 -46
- package/common/dialogues.js +150 -426
- package/common/dialogues.test.json +0 -786
- package/common/dimension.instance.json +491 -262
- package/common/dimension.js +22 -24
- package/common/dimension.test.json +508 -1702
- package/common/edible.instance.json +20446 -10806
- package/common/edible.js +4 -9
- package/common/emotions.instance.json +192 -124
- package/common/emotions.js +36 -39
- package/common/evaluate.instance.json +2 -0
- package/common/evaluate.js +53 -0
- package/common/evaluate.test.json +574 -0
- package/common/events.js +11 -15
- package/common/fastfood.instance.json +222642 -113618
- package/common/fastfood.js +76 -86
- package/common/fastfood.test.json +268 -90
- package/common/formulas.instance.json +443 -247
- package/common/formulas.js +20 -27
- package/common/gdefaults.js +40 -27
- package/common/help.js +9 -14
- package/common/help.test.json +65 -16
- package/common/helpers/concept.js +10 -7
- package/common/helpers/dialogues.js +5 -3
- package/common/helpers/properties.js +67 -64
- package/common/helpers.js +35 -24
- package/common/hierarchy.js +17 -25
- package/common/javascript.js +12 -19
- package/common/kirk.instance.json +583 -299
- package/common/kirk.js +6 -9
- package/common/length.instance.json +9005 -5001
- package/common/length.js +5 -9
- package/common/listener.js +48 -0
- package/common/listener.test.json +104 -0
- package/common/math.instance.json +406 -1178
- package/common/math.js +17 -21
- package/common/meta.js +24 -48
- package/common/nameable.instance.json +2 -0
- package/common/nameable.js +144 -0
- package/common/nameable.test.json +3191 -0
- package/common/negation.js +11 -7
- package/common/numbers.js +28 -32
- package/common/ordering.instance.json +443 -343
- package/common/ordering.js +81 -87
- package/common/ordinals.instance.json +2 -0
- package/common/ordinals.js +60 -0
- package/common/ordinals.test.json +306 -0
- package/common/people.instance.json +2210 -1150
- package/common/people.js +9 -14
- package/common/percentages.instance.json +2 -0
- package/common/percentages.js +53 -0
- package/common/percentages.test.json +751 -0
- package/common/pipboy.instance.json +11845 -6590
- package/common/pipboy.js +51 -62
- package/common/pokemon.instance.json +4300 -2285
- package/common/pokemon.js +8 -21
- package/common/pos.js +16 -14
- package/common/pressure.instance.json +2325 -1340
- package/common/pressure.js +5 -9
- package/common/properties.instance.json +148 -88
- package/common/properties.js +149 -160
- package/common/punctuation.js +16 -8
- package/common/reports.instance.json +1019 -551
- package/common/reports.js +77 -101
- package/common/reports.test.json +15623 -10458
- package/common/scorekeeper.js +19 -31
- package/common/sdefaults.js +17 -8
- package/common/sizeable.js +7 -11
- package/common/spock.instance.json +582 -298
- package/common/spock.js +6 -9
- package/common/stgame.js +20 -20
- package/common/stm.js +173 -31
- package/common/stm.test.json +1734 -1
- package/common/tell.js +15 -19
- package/common/temperature.instance.json +2430 -1429
- package/common/temperature.js +5 -9
- package/common/tester.js +15 -4
- package/common/testing.js +8 -12
- package/common/time.js +21 -26
- package/common/tokenize.js +6 -7
- package/common/ui.instance.json +150 -463
- package/common/ui.js +22 -33
- package/common/ui.test.json +641 -5357
- package/common/weight.instance.json +8034 -4503
- package/common/weight.js +5 -9
- package/common/yesno.js +6 -6
- package/main.js +20 -4
- package/package.json +37 -6
package/common/negation.js
CHANGED
@@ -1,33 +1,37 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { words, defaultContextCheck } = require('./helpers')
|
3
3
|
const gdefaults = require('./gdefaults')
|
4
|
+
const pos = require('./pos')
|
4
5
|
const negation_tests = require('./negation.test.json')
|
5
6
|
|
6
|
-
let
|
7
|
+
let config = {
|
7
8
|
name: 'negation',
|
8
9
|
operators: [
|
9
|
-
"([
|
10
|
+
"([negatable])",
|
11
|
+
"([not] (negatable/*))",
|
10
12
|
],
|
11
13
|
bridges: [
|
12
14
|
{
|
13
15
|
id: 'not',
|
14
16
|
bridge: '{ ...after[0], negated: operator, modifiers: append(["negated"], after[0].modifiers) }',
|
17
|
+
before: ['verb'],
|
18
|
+
localHierarchy: [['unknown', 'negatable']],
|
15
19
|
},
|
16
20
|
{ id: 'negatable', words: words('negatable') },
|
17
21
|
],
|
18
22
|
};
|
19
23
|
|
20
|
-
const createConfig = () => new Config(configStruct, module).add(gdefaults())
|
21
|
-
|
22
24
|
knowledgeModule( {
|
25
|
+
config,
|
26
|
+
includes: [gdefaults, pos],
|
27
|
+
|
23
28
|
module,
|
24
|
-
createConfig,
|
25
29
|
description: 'negation',
|
26
30
|
test: {
|
27
31
|
name: './negation.test.json',
|
28
32
|
contents: negation_tests,
|
29
33
|
checks: {
|
30
|
-
context: defaultContextCheck,
|
34
|
+
context: defaultContextCheck(),
|
31
35
|
},
|
32
36
|
},
|
33
37
|
})
|
package/common/numbers.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const numbers_tests = require('./numbers.test.json')
|
4
4
|
const gdefaults = require('./gdefaults')
|
5
|
+
const sdefaults = require('./sdefaults')
|
5
6
|
|
6
7
|
/*
|
7
8
|
TODO
|
@@ -9,39 +10,38 @@ const gdefaults = require('./gdefaults')
|
|
9
10
|
10 million 300 hundred and fifty
|
10
11
|
*/
|
11
12
|
|
12
|
-
let
|
13
|
+
let config = {
|
13
14
|
name: 'numbers',
|
14
15
|
operators: [
|
15
16
|
"([number])",
|
16
17
|
],
|
17
18
|
bridges: [
|
18
|
-
{ "id": "number", "level": 0, "bridge": "{ ...next(operator) }" },
|
19
|
+
{ "id": "number", "level": 0, "bridge": "{ instance: false, ...next(operator) }" },
|
19
20
|
],
|
20
21
|
debug: false,
|
21
22
|
version: '3',
|
22
23
|
words: {
|
23
24
|
"literals": {
|
24
|
-
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"tens": [{"id": "number", "initial": "{ value: 10, number: 'many', instance:true }" }],
|
25
|
+
"one": [{"id": "number", "initial": "{ value: 1, instance: true }" }],
|
26
|
+
"ones": [{"id": "number", "initial": "{ value: 1, number: 'many', instance: true }" }],
|
27
|
+
"two": [{"id": "number", "initial": "{ value: 2 , instance: true}" }],
|
28
|
+
"twos": [{"id": "number", "initial": "{ value: 2 , number: 'many', instance: true}" }],
|
29
|
+
"three": [{"id": "number", "initial": "{ value: 3, instance: true }" }],
|
30
|
+
"threes": [{"id": "number", "initial": "{ value: 3, number: 'many', instance: true }" }],
|
31
|
+
"four": [{"id": "number", "initial": "{ value: 4, instance: true }" }],
|
32
|
+
"fours": [{"id": "number", "initial": "{ value: 4, number: 'many', instance: true }" }],
|
33
|
+
"five": [{"id": "number", "initial": "{ value: 5, instance: true }" }],
|
34
|
+
"fives": [{"id": "number", "initial": "{ value: 5, number: 'many', instance: true }" }],
|
35
|
+
"six": [{"id": "number", "initial": "{ value: 6, instance: true }" }],
|
36
|
+
"sixes": [{"id": "number", "initial": "{ value: 6, number: 'many', instance: true }" }],
|
37
|
+
"seven": [{"id": "number", "initial": "{ value: 7, instance: true }" }],
|
38
|
+
"sevens": [{"id": "number", "initial": "{ value: 7, number: 'many', instance: true }" }],
|
39
|
+
"eight": [{"id": "number", "initial": "{ value: 8, instance: true }" }],
|
40
|
+
"eights": [{"id": "number", "initial": "{ value: 8, number: 'many', instance: true }" }],
|
41
|
+
"nine": [{"id": "number", "initial": "{ value: 9, instance: true }" }],
|
42
|
+
"nines": [{"id": "number", "initial": "{ value: 9, number: 'many', instance: true }" }],
|
43
|
+
"ten": [{"id": "number", "initial": "{ value: 10, instance: true }" }],
|
44
|
+
"tens": [{"id": "number", "initial": "{ value: 10, number: 'many', instance: true }" }],
|
45
45
|
},
|
46
46
|
patterns: [
|
47
47
|
{ "pattern": [{ type: 'digit' }, { repeat: true }], defs: [{id: "number", uuid: '1', initial: "{ value: int(text), instance: true }" }]},
|
@@ -83,21 +83,17 @@ let configStruct = {
|
|
83
83
|
],
|
84
84
|
};
|
85
85
|
|
86
|
-
const createConfig = () => {
|
87
|
-
const config = new Config(configStruct, module)
|
88
|
-
config.add(gdefaults())
|
89
|
-
return config
|
90
|
-
}
|
91
|
-
|
92
86
|
knowledgeModule( {
|
87
|
+
config,
|
88
|
+
includes: [gdefaults, sdefaults],
|
89
|
+
|
93
90
|
module,
|
94
|
-
createConfig,
|
95
91
|
description: 'talking about numbers',
|
96
92
|
test: {
|
97
93
|
name: './numbers.test.json',
|
98
94
|
contents: numbers_tests,
|
99
95
|
checks: {
|
100
|
-
context: defaultContextCheck,
|
96
|
+
context: defaultContextCheck(),
|
101
97
|
},
|
102
98
|
|
103
99
|
},
|