tpmkms_4wp 9.4.4 → 9.4.5-beta.0
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/characters.js +0 -3
- package/common/crew.instance.json +72 -36
- package/common/dates.instance.json +2 -0
- package/common/dates.js +1 -0
- package/common/edible.instance.json +507 -1246
- package/common/fastfood.instance.json +727 -3480
- package/common/gdefaults.js +9 -1
- package/common/javascript.js +0 -5
- package/common/latin.instance.json +2 -0
- package/common/latin.js +78 -0
- package/common/latin.test.json +1331 -0
- package/common/percentages.js +1 -0
- package/common/properties.js +1 -1
- package/common/reminders.instance.json +1 -1
- package/common/reports.instance.json +2 -2
- package/common/reports.js +4 -1
- package/common/reports.test.json +5547 -4514
- package/common/scorekeeper.js +0 -5
- package/common/temperature.instance.json +0 -84
- package/common/time.js +0 -9
- package/common/tokenize.js +18 -2
- package/main.js +2 -0
- package/package.json +12 -2
package/common/gdefaults.js
CHANGED
@@ -248,7 +248,15 @@ const initializer = ({config}) => {
|
|
248
248
|
return args.gp(context[key])
|
249
249
|
}
|
250
250
|
}
|
251
|
-
|
251
|
+
if (Array.isArray(interpolate)) {
|
252
|
+
const strings = []
|
253
|
+
for (const element of interpolate) {
|
254
|
+
strings.push(await args.g(element))
|
255
|
+
}
|
256
|
+
return strings.join(" ")
|
257
|
+
} else {
|
258
|
+
return await helpers.processTemplateString(interpolate, evaluator)
|
259
|
+
}
|
252
260
|
}
|
253
261
|
}
|
254
262
|
})
|
package/common/javascript.js
CHANGED
@@ -20,11 +20,6 @@ const config = {
|
|
20
20
|
words: {
|
21
21
|
"literals": {
|
22
22
|
"=": [{"id": "assignment", "initial": "{ value: 1 }" }],
|
23
|
-
/*
|
24
|
-
" ([0-9]+)": [{"id": "number", "initial": "{ value: int(group[0]) }" }],
|
25
|
-
"one": [{"id": "number", "initial": "{ value: 1 }" }],
|
26
|
-
"ten": [{"id": "number", "initial": "{ value: 10 }" }],
|
27
|
-
*/
|
28
23
|
}
|
29
24
|
},
|
30
25
|
|
package/common/latin.js
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
|
+
const { defaultContextCheck } = require('./helpers')
|
3
|
+
const gdefaults = require("./gdefaults")
|
4
|
+
const latin_tests = require('./latin.test.json')
|
5
|
+
|
6
|
+
/*
|
7
|
+
marcus est vir
|
8
|
+
marcus vir est
|
9
|
+
vir marcus est -> if vir is know to be a category and marcus is not that overides ordering
|
10
|
+
|
11
|
+
estne
|
12
|
+
marcus quintus iuliaque
|
13
|
+
*/
|
14
|
+
const config = {
|
15
|
+
name: 'latin',
|
16
|
+
operators: [
|
17
|
+
"((hierarchy/*) [queryMarker])",
|
18
|
+
"([hierarchiable])",
|
19
|
+
"((hierarchiable) [hierarchy|] (hierarchiable))",
|
20
|
+
"((hierarchiable) (hierarchiable) [hierarchy|])",
|
21
|
+
"([hierarchy|] (hierarchiable) (hierarchiable))",
|
22
|
+
],
|
23
|
+
bridges: [
|
24
|
+
{
|
25
|
+
id: "queryMarker",
|
26
|
+
bridge: "{ ...before[0], question: true }",
|
27
|
+
separators: '|',
|
28
|
+
before: ['hierarchy'],
|
29
|
+
},
|
30
|
+
{ id: "hierarchiable" },
|
31
|
+
{
|
32
|
+
id: "hierarchy",
|
33
|
+
localHierarchy: [['unknown', 'hierarchiable']],
|
34
|
+
bridge: "{ ...next(operator), child: arguments[0], parent: arguments[1], question: less_than(indexes.operator, indexes.arguments[0]), interpolate: all }",
|
35
|
+
words: [
|
36
|
+
{ word: 'sum', number: 'singular', person: 'first' },
|
37
|
+
{ word: 'es', number: 'singular', person: 'second' },
|
38
|
+
{ word: 'est', number: 'singular', person: 'third' },
|
39
|
+
{ word: 'sumus', number: 'plural', person: 'first' },
|
40
|
+
{ word: 'estis', number: 'plural', person: 'second' },
|
41
|
+
{ word: 'sunt', number: 'plural', person: 'third' },
|
42
|
+
]
|
43
|
+
},
|
44
|
+
],
|
45
|
+
words: {
|
46
|
+
literals: {
|
47
|
+
"ne": [
|
48
|
+
{
|
49
|
+
id: 'queryMarker',
|
50
|
+
initial: { value: 'queryMarker' },
|
51
|
+
}
|
52
|
+
],
|
53
|
+
},
|
54
|
+
/*
|
55
|
+
patterns: [
|
56
|
+
{
|
57
|
+
pattern: ["ne"],
|
58
|
+
defs: [ { id: "queryMarker", uuid: '1', }, ],
|
59
|
+
},
|
60
|
+
],
|
61
|
+
*/
|
62
|
+
},
|
63
|
+
};
|
64
|
+
|
65
|
+
knowledgeModule( {
|
66
|
+
config,
|
67
|
+
includes: [gdefaults],
|
68
|
+
|
69
|
+
module,
|
70
|
+
description: 'machina quis scriptum latinum intellegit et agit',
|
71
|
+
test: {
|
72
|
+
name: './latin.test.json',
|
73
|
+
contents: latin_tests,
|
74
|
+
checks: {
|
75
|
+
context: [defaultContextCheck()],
|
76
|
+
},
|
77
|
+
},
|
78
|
+
})
|