tpmkms_4wp 8.0.0-beta.42 → 8.0.0-beta.44
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.js +17 -20
- package/common/articles.js +6 -11
- package/common/avatar.js +5 -9
- package/common/characters.js +22 -26
- package/common/colors.instance.json +28 -0
- package/common/colors.js +4 -8
- package/common/comparable.js +5 -9
- package/common/concept.js +120 -124
- package/common/countable.js +5 -9
- package/common/crew.js +36 -41
- package/common/currency.js +25 -43
- package/common/dialogues.js +46 -49
- package/common/dimension.instance.json +8 -8
- package/common/dimension.js +7 -13
- package/common/edible.instance.json +112 -0
- package/common/edible.js +3 -8
- package/common/emotions.js +35 -38
- package/common/evaluate.js +5 -11
- package/common/events.js +6 -10
- package/common/fastfood.instance.json +401 -317
- package/common/fastfood.js +53 -63
- package/common/formulas.instance.json +10 -10
- package/common/formulas.js +7 -14
- package/common/gdefaults.js +8 -10
- package/common/help.js +7 -12
- package/common/hierarchy.js +8 -12
- package/common/javascript.js +7 -14
- package/common/kirk.js +5 -8
- package/common/length.js +4 -8
- package/common/listener.js +5 -11
- package/common/math.instance.json +16 -16
- package/common/math.js +6 -10
- package/common/meta.js +5 -22
- package/common/nameable.js +6 -13
- package/common/negation.js +5 -5
- package/common/numbers.js +5 -9
- package/common/ordering.instance.json +68 -0
- package/common/ordering.js +80 -86
- package/common/people.js +8 -12
- package/common/percentages.js +5 -9
- package/common/pipboy.instance.json +84 -28
- package/common/pipboy.js +7 -15
- package/common/pokemon.js +7 -20
- package/common/pos.js +4 -5
- package/common/pressure.js +4 -8
- package/common/properties.js +6 -12
- package/common/punctuation.js +5 -5
- package/common/reports.instance.json +1 -1
- package/common/reports.js +9 -14
- package/common/scorekeeper.js +8 -12
- package/common/sdefaults.js +4 -5
- package/common/sizeable.js +5 -9
- package/common/spock.js +5 -8
- package/common/stgame.js +18 -23
- package/common/stm.js +9 -15
- package/common/tell.js +9 -13
- package/common/temperature.instance.json +0 -112
- package/common/temperature.js +4 -8
- package/common/tester.js +1 -1
- package/common/testing.js +5 -9
- package/common/time.js +18 -23
- package/common/tokenize.js +4 -5
- package/common/ui.js +6 -12
- package/common/weight.js +4 -8
- package/common/yesno.js +5 -5
- package/package.json +2 -2
package/common/temperature.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const dimension = require('./dimension.js')
|
4
4
|
const temperature_tests = require('./temperature.test.json')
|
@@ -14,16 +14,12 @@ const template = {
|
|
14
14
|
],
|
15
15
|
}
|
16
16
|
|
17
|
-
const createConfig = async () => {
|
18
|
-
const config = new Config({ name: 'temperature' }, module)
|
19
|
-
await config.add(dimension)
|
20
|
-
return config
|
21
|
-
}
|
22
|
-
|
23
17
|
knowledgeModule({
|
18
|
+
config: { name: 'temperature' },
|
19
|
+
includes: [dimension],
|
20
|
+
|
24
21
|
module,
|
25
22
|
description: 'Weight dimension',
|
26
|
-
createConfig,
|
27
23
|
test: {
|
28
24
|
name: './temperature.test.json',
|
29
25
|
contents: temperature_tests,
|
package/common/tester.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const tester_tests = require('./tester.test.json')
|
4
4
|
const ArgumentParser = require('argparse').ArgumentParser
|
package/common/testing.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const testing_tests = require('./testing.test.json')
|
4
4
|
const gdefaults = require('./gdefaults')
|
5
5
|
|
6
|
-
|
6
|
+
const config = {
|
7
7
|
name: 'testing',
|
8
8
|
operators: [
|
9
9
|
{ pattern: "([testingEvaluate] ([testingValue]))" },
|
@@ -30,16 +30,12 @@ let configStruct = {
|
|
30
30
|
],
|
31
31
|
};
|
32
32
|
|
33
|
-
const createConfig = async () => {
|
34
|
-
const config = new Config(configStruct, module)
|
35
|
-
await config.add(gdefaults)
|
36
|
-
return config
|
37
|
-
}
|
38
|
-
|
39
33
|
knowledgeModule({
|
34
|
+
config,
|
35
|
+
includes: [gdefaults],
|
36
|
+
|
40
37
|
module,
|
41
38
|
description: 'code for testing',
|
42
|
-
createConfig,
|
43
39
|
test: {
|
44
40
|
name: './testing.test.json',
|
45
41
|
contents: testing_tests
|
package/common/time.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const tell = require('./tell')
|
4
4
|
const countable = require('./countable')
|
@@ -14,7 +14,7 @@ const pad = (v, l) => {
|
|
14
14
|
|
15
15
|
class API {
|
16
16
|
// gets the contexts for doing the happening
|
17
|
-
semantics({context,
|
17
|
+
semantics({context, args, kms}) {
|
18
18
|
const api = kms.time.api
|
19
19
|
const values = args({ types: ['ampm', 'time'], properties: ['one', 'two'] })
|
20
20
|
const ampm = context[values[0]]
|
@@ -36,9 +36,8 @@ class API {
|
|
36
36
|
initialize() {
|
37
37
|
}
|
38
38
|
}
|
39
|
-
const api = new API()
|
40
39
|
|
41
|
-
const
|
40
|
+
const config = {
|
42
41
|
name: 'time',
|
43
42
|
operators: [
|
44
43
|
"([time])",
|
@@ -170,31 +169,27 @@ const configStruct = {
|
|
170
169
|
],
|
171
170
|
};
|
172
171
|
|
173
|
-
const
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
format: 12 // or 24
|
184
|
-
});
|
185
|
-
config.addSemantic({
|
186
|
-
match: ({context, hierarchy, args}) => context.happening && context.marker == 'is' && args({ types: ['ampm', 'time'], properties: ['one', 'two'] }),
|
187
|
-
apply: api.semantics
|
188
|
-
})
|
172
|
+
const initializer = ({api, config, objects, kms, isModule}) => {
|
173
|
+
if (!isModule) {
|
174
|
+
kms.time.api.newDate = () => new Date("December 25, 1995 1:59:58 pm" )
|
175
|
+
}
|
176
|
+
Object.assign(objects, {
|
177
|
+
format: 12 // or 24
|
178
|
+
});
|
179
|
+
config.addSemantic({
|
180
|
+
match: ({context, hierarchy, args}) => context.happening && context.marker == 'is' && args({ types: ['ampm', 'time'], properties: ['one', 'two'] }),
|
181
|
+
apply: api.semantics
|
189
182
|
})
|
190
|
-
await config.restart_auto_rebuild()
|
191
|
-
return config
|
192
183
|
}
|
193
184
|
|
194
185
|
knowledgeModule({
|
186
|
+
config,
|
187
|
+
includes: [tell, numbers, countable],
|
188
|
+
api: () => new API(),
|
189
|
+
initializer,
|
190
|
+
|
195
191
|
module,
|
196
192
|
description: 'Time related concepts',
|
197
|
-
createConfig,
|
198
193
|
test: {
|
199
194
|
name: './time.test.json',
|
200
195
|
contents: time_tests,
|
package/common/tokenize.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const tokenize_tests = require('./tokenize.test.json')
|
4
4
|
|
5
|
-
|
5
|
+
const config = {
|
6
6
|
name: 'tokenize',
|
7
7
|
operators: [
|
8
8
|
"([unknown])",
|
@@ -31,11 +31,10 @@ let configStruct = {
|
|
31
31
|
},
|
32
32
|
};
|
33
33
|
|
34
|
-
createConfig = async () => new Config(configStruct, module)
|
35
|
-
|
36
34
|
knowledgeModule( {
|
35
|
+
config,
|
36
|
+
|
37
37
|
module,
|
38
|
-
createConfig,
|
39
38
|
description: 'tokenize',
|
40
39
|
test: {
|
41
40
|
name: './tokenize.test.json',
|
package/common/ui.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const dialogues = require('./dialogues')
|
4
4
|
const math = require('./math')
|
@@ -39,7 +39,7 @@ class API {
|
|
39
39
|
again
|
40
40
|
stop/start listening
|
41
41
|
*/
|
42
|
-
const
|
42
|
+
const config = {
|
43
43
|
name: 'ui',
|
44
44
|
operators: [
|
45
45
|
"([select])",
|
@@ -183,21 +183,15 @@ const template = {
|
|
183
183
|
],
|
184
184
|
}
|
185
185
|
|
186
|
-
const createConfig = async () => {
|
187
|
-
const config = new Config(configStruct, module)
|
188
|
-
config.stop_auto_rebuild()
|
189
|
-
await config.add(dialogues, math)
|
190
|
-
await config.setApi(new API())
|
191
|
-
await config.restart_auto_rebuild()
|
192
|
-
return config
|
193
|
-
}
|
194
|
-
|
195
186
|
// const config = createConfig()
|
196
187
|
|
197
188
|
knowledgeModule({
|
189
|
+
config,
|
190
|
+
includes: [dialogues, math],
|
191
|
+
api: () => new API(),
|
192
|
+
|
198
193
|
module,
|
199
194
|
description: 'Control a ui with speech',
|
200
|
-
createConfig,
|
201
195
|
test: {
|
202
196
|
name: './ui.test.json',
|
203
197
|
contents: ui_tests,
|
package/common/weight.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const dimension = require('./dimension.js')
|
4
4
|
const weight_tests = require('./weight.test.json')
|
@@ -34,16 +34,12 @@ const template = {
|
|
34
34
|
],
|
35
35
|
}
|
36
36
|
|
37
|
-
const createConfig = async () => {
|
38
|
-
const config = new Config({ name: 'weight' }, module)
|
39
|
-
await config.add(dimension)
|
40
|
-
return config
|
41
|
-
}
|
42
|
-
|
43
37
|
knowledgeModule({
|
38
|
+
config: { name: 'weight' },
|
39
|
+
includes: [dimension],
|
40
|
+
|
44
41
|
module,
|
45
42
|
description: 'Weight dimension',
|
46
|
-
createConfig,
|
47
43
|
test: {
|
48
44
|
name: './weight.test.json',
|
49
45
|
contents: weight_tests,
|
package/common/yesno.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const gdefaults = require('./gdefaults')
|
4
4
|
const yesno_tests = require('./yesno.test.json')
|
5
5
|
|
6
|
-
let
|
6
|
+
let config = {
|
7
7
|
name: 'yesno',
|
8
8
|
operators: [
|
9
9
|
"([yes])",
|
@@ -22,11 +22,11 @@ let configStruct = {
|
|
22
22
|
],
|
23
23
|
};
|
24
24
|
|
25
|
-
const createConfig = async () => new Config(configStruct, module).add(gdefaults)
|
26
|
-
|
27
25
|
knowledgeModule( {
|
26
|
+
config,
|
27
|
+
includes: [gdefaults],
|
28
|
+
|
28
29
|
module,
|
29
|
-
createConfig,
|
30
30
|
description: 'yesno',
|
31
31
|
test: {
|
32
32
|
name: './yesno.test.json',
|
package/package.json
CHANGED
@@ -294,8 +294,8 @@
|
|
294
294
|
"table": "^6.7.1",
|
295
295
|
"base-64": "^1.0.0",
|
296
296
|
"argparse": "^2.0.1",
|
297
|
-
"theprogrammablemind_4wp": "8.0.0-beta.
|
297
|
+
"theprogrammablemind_4wp": "8.0.0-beta.44"
|
298
298
|
},
|
299
|
-
"version": "8.0.0-beta.
|
299
|
+
"version": "8.0.0-beta.44",
|
300
300
|
"license": "UNLICENSED"
|
301
301
|
}
|