tpmkms_4wp 8.0.0-beta.31 → 8.0.0-beta.33
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +325 -0
- package/common/articles.js +108 -0
- package/common/articles.test.json +310 -0
- package/common/colors.instance.json +340 -0
- package/common/crew.instance.json +525 -0
- package/common/dialogues.js +66 -102
- package/common/dimension.instance.json +20 -0
- package/common/edible.instance.json +650 -28
- package/common/emotions.instance.json +25 -0
- package/common/evaluate.instance.json +2 -0
- package/common/evaluate.js +55 -0
- package/common/evaluate.test.json +574 -0
- package/common/fastfood.instance.json +1989 -329
- package/common/formulas.instance.json +20 -0
- package/common/gdefaults.js +6 -6
- package/common/help.test.json +16 -4
- package/common/helpers.js +1 -1
- package/common/kirk.instance.json +20 -0
- package/common/length.instance.json +300 -0
- package/common/math.instance.json +25 -0
- package/common/nameable.instance.json +2 -0
- package/common/nameable.js +137 -0
- package/common/nameable.test.json +1545 -0
- package/common/ordering.instance.json +50 -0
- package/common/people.instance.json +165 -0
- package/common/pipboy.instance.json +340 -0
- package/common/pokemon.instance.json +265 -0
- package/common/pressure.instance.json +80 -0
- package/common/properties.instance.json +25 -0
- package/common/reports.instance.json +41 -1
- package/common/spock.instance.json +20 -0
- package/common/stm.js +109 -3
- package/common/stm.test.json +1702 -1
- package/common/temperature.instance.json +192 -0
- package/common/ui.instance.json +20 -0
- package/common/weight.instance.json +240 -0
- package/main.js +6 -0
- package/package.json +13 -2
@@ -0,0 +1,108 @@
|
|
1
|
+
const { Config, knowledgeModule, where, stableId } = require('./runtime').theprogrammablemind
|
2
|
+
const gdefaults = require('./gdefaults.js')
|
3
|
+
const pos = require('./pos.js')
|
4
|
+
const { defaultContextCheck } = require('./helpers')
|
5
|
+
const tests = require('./articles.test.json')
|
6
|
+
|
7
|
+
let configStruct = {
|
8
|
+
name: 'articles',
|
9
|
+
operators: [
|
10
|
+
"([thisitthat|])",
|
11
|
+
"([it])",
|
12
|
+
"([this])",
|
13
|
+
"([that])",
|
14
|
+
"([queryable])",
|
15
|
+
/*
|
16
|
+
"(<what> ([whatAble|]))",
|
17
|
+
"([what:optional])",
|
18
|
+
*/
|
19
|
+
"(<the|> ([theAble]))",
|
20
|
+
"(<a|a,an> ([theAble|]))",
|
21
|
+
],
|
22
|
+
bridges: [
|
23
|
+
// { id: "what", level: 0, optional: "{ ...next(operator), query: ['what'], determined: true }", bridge: "{ ...after, query: ['what'], modifiers: ['what'], what: operator }" },
|
24
|
+
// { id: "whatAble", level: 0, bridge: "{ ...next(operator) }" },
|
25
|
+
{
|
26
|
+
id: 'the',
|
27
|
+
level: 0,
|
28
|
+
bridge: '{ ...after[0], focusableForPhrase: true, pullFromContext: true, concept: true, wantsValue: true, determiner: "the", modifiers: append(["determiner"], after[0].modifiers)}'
|
29
|
+
},
|
30
|
+
{
|
31
|
+
id: "a",
|
32
|
+
level: 0,
|
33
|
+
// bridge: "{ ...after[0], pullFromContext: false, instance: true, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
|
34
|
+
bridge: "{ ...after[0], pullFromContext: false, concept: true, number: 'one', wantsValue: true, determiner: operator, modifiers: append(['determiner'], after[0].modifiers) }"
|
35
|
+
},
|
36
|
+
{ id: "queryable" },
|
37
|
+
{
|
38
|
+
id: "theAble",
|
39
|
+
children: ['noun'],
|
40
|
+
bridge: "{ ...next(operator) }"
|
41
|
+
},
|
42
|
+
|
43
|
+
{
|
44
|
+
id: "thisitthat",
|
45
|
+
level: 0,
|
46
|
+
isA: ['queryable'],
|
47
|
+
before: ['verby'],
|
48
|
+
bridge: "{ ...next(operator) }"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
id: "it",
|
52
|
+
level: 0,
|
53
|
+
isA: ['thisitthat'],
|
54
|
+
bridge: "{ ...next(operator), pullFromContext: true, unknown: true, determined: true }"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: "this",
|
58
|
+
level: 0,
|
59
|
+
isA: ['thisitthat'],
|
60
|
+
bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
id: "that",
|
64
|
+
level: 0,
|
65
|
+
isA: ['thisitthat'],
|
66
|
+
bridge: "{ ...next(operator), unknown: true, pullFromContext: true }"
|
67
|
+
},
|
68
|
+
],
|
69
|
+
words: {
|
70
|
+
"literals": {
|
71
|
+
"the": [{"id": "the", "initial": "{ modifiers: [] }" }],
|
72
|
+
}
|
73
|
+
},
|
74
|
+
hierarchy: [
|
75
|
+
['it', 'pronoun'],
|
76
|
+
['this', 'pronoun'],
|
77
|
+
// ['questionMark', 'isEd'],
|
78
|
+
['a', 'articlePOS'],
|
79
|
+
['the', 'articlePOS'],
|
80
|
+
['it', 'queryable'],
|
81
|
+
// ['it', 'toAble'],
|
82
|
+
['this', 'queryable'],
|
83
|
+
],
|
84
|
+
|
85
|
+
};
|
86
|
+
|
87
|
+
const createConfig = async () => {
|
88
|
+
const config = new Config(configStruct, module)
|
89
|
+
config.stop_auto_rebuild()
|
90
|
+
await config.add(pos, gdefaults)
|
91
|
+
await config.restart_auto_rebuild()
|
92
|
+
return config
|
93
|
+
}
|
94
|
+
|
95
|
+
knowledgeModule( {
|
96
|
+
module,
|
97
|
+
description: 'articles',
|
98
|
+
createConfig, newWay: true,
|
99
|
+
test: {
|
100
|
+
name: './articles.test.json',
|
101
|
+
contents: tests,
|
102
|
+
checks: {
|
103
|
+
objects: ['onNevermindWasCalled', 'nevermindType', 'idSuffix'],
|
104
|
+
context: defaultContextCheck,
|
105
|
+
},
|
106
|
+
|
107
|
+
},
|
108
|
+
})
|
@@ -0,0 +1,310 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"associations": [
|
4
|
+
[
|
5
|
+
[
|
6
|
+
"the",
|
7
|
+
0
|
8
|
+
],
|
9
|
+
[
|
10
|
+
"theAble",
|
11
|
+
0
|
12
|
+
]
|
13
|
+
]
|
14
|
+
],
|
15
|
+
"config": {
|
16
|
+
},
|
17
|
+
"contexts": [
|
18
|
+
{
|
19
|
+
"concept": true,
|
20
|
+
"dead": true,
|
21
|
+
"default": true,
|
22
|
+
"determiner": "the",
|
23
|
+
"focusableForPhrase": true,
|
24
|
+
"level": 1,
|
25
|
+
"marker": "theAble",
|
26
|
+
"modifiers": [
|
27
|
+
"determiner"
|
28
|
+
],
|
29
|
+
"pullFromContext": true,
|
30
|
+
"range": {
|
31
|
+
"end": 10,
|
32
|
+
"start": 0
|
33
|
+
},
|
34
|
+
"text": "the theable",
|
35
|
+
"topLevel": true,
|
36
|
+
"types": [
|
37
|
+
"theAble"
|
38
|
+
],
|
39
|
+
"value": "theAble",
|
40
|
+
"wantsValue": true,
|
41
|
+
"word": "theable"
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"developerTest": false,
|
45
|
+
"generatedParenthesized": [
|
46
|
+
""
|
47
|
+
],
|
48
|
+
"metadata": {
|
49
|
+
"opChoices": [
|
50
|
+
{
|
51
|
+
"counter": 1,
|
52
|
+
"op": [
|
53
|
+
"theAble",
|
54
|
+
0
|
55
|
+
],
|
56
|
+
"ops": [
|
57
|
+
[
|
58
|
+
"the",
|
59
|
+
0
|
60
|
+
],
|
61
|
+
[
|
62
|
+
"theAble",
|
63
|
+
0
|
64
|
+
]
|
65
|
+
]
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"counter": 2,
|
69
|
+
"op": [
|
70
|
+
"the",
|
71
|
+
0
|
72
|
+
],
|
73
|
+
"ops": [
|
74
|
+
[
|
75
|
+
"the",
|
76
|
+
0
|
77
|
+
]
|
78
|
+
]
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
"objects": {
|
83
|
+
"nameToUUID": {
|
84
|
+
"articles": "articles1",
|
85
|
+
"gdefaults": "gdefaults2",
|
86
|
+
"pos": "pos2",
|
87
|
+
"tokenize": "tokenize2"
|
88
|
+
},
|
89
|
+
"namespaced": {
|
90
|
+
"articles1": {
|
91
|
+
},
|
92
|
+
"gdefaults2": {
|
93
|
+
},
|
94
|
+
"pos2": {
|
95
|
+
},
|
96
|
+
"tokenize2": {
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"processed": [
|
100
|
+
{
|
101
|
+
"context": {
|
102
|
+
"concept": true,
|
103
|
+
"dead": true,
|
104
|
+
"default": true,
|
105
|
+
"determiner": "the",
|
106
|
+
"focusableForPhrase": true,
|
107
|
+
"level": 1,
|
108
|
+
"marker": "theAble",
|
109
|
+
"modifiers": [
|
110
|
+
"determiner"
|
111
|
+
],
|
112
|
+
"pullFromContext": true,
|
113
|
+
"range": {
|
114
|
+
"end": 10,
|
115
|
+
"start": 0
|
116
|
+
},
|
117
|
+
"text": "the theable",
|
118
|
+
"topLevel": true,
|
119
|
+
"types": [
|
120
|
+
"theAble"
|
121
|
+
],
|
122
|
+
"value": "theAble",
|
123
|
+
"wantsValue": true,
|
124
|
+
"word": "theable"
|
125
|
+
},
|
126
|
+
"generatedParenthesized": "",
|
127
|
+
"paraphrases": "the theable",
|
128
|
+
"paraphrasesParenthesized": "(the (theable))",
|
129
|
+
"responses": [
|
130
|
+
""
|
131
|
+
]
|
132
|
+
}
|
133
|
+
]
|
134
|
+
},
|
135
|
+
"paraphrases": [
|
136
|
+
"the theable"
|
137
|
+
],
|
138
|
+
"paraphrasesParenthesized": [
|
139
|
+
"(the (theable))"
|
140
|
+
],
|
141
|
+
"query": "the theable",
|
142
|
+
"responses": [
|
143
|
+
""
|
144
|
+
]
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"associations": [
|
148
|
+
[
|
149
|
+
[
|
150
|
+
"a",
|
151
|
+
0
|
152
|
+
],
|
153
|
+
[
|
154
|
+
"theAble",
|
155
|
+
0
|
156
|
+
]
|
157
|
+
]
|
158
|
+
],
|
159
|
+
"config": {
|
160
|
+
},
|
161
|
+
"contexts": [
|
162
|
+
{
|
163
|
+
"concept": true,
|
164
|
+
"dead": true,
|
165
|
+
"default": true,
|
166
|
+
"determiner": {
|
167
|
+
"default": true,
|
168
|
+
"level": 0,
|
169
|
+
"marker": "a",
|
170
|
+
"range": {
|
171
|
+
"end": 0,
|
172
|
+
"start": 0
|
173
|
+
},
|
174
|
+
"text": "a",
|
175
|
+
"word": "a"
|
176
|
+
},
|
177
|
+
"level": 1,
|
178
|
+
"marker": "theAble",
|
179
|
+
"modifiers": [
|
180
|
+
"determiner"
|
181
|
+
],
|
182
|
+
"number": "one",
|
183
|
+
"pullFromContext": false,
|
184
|
+
"range": {
|
185
|
+
"end": 8,
|
186
|
+
"start": 0
|
187
|
+
},
|
188
|
+
"text": "a theable",
|
189
|
+
"topLevel": true,
|
190
|
+
"types": [
|
191
|
+
"theAble"
|
192
|
+
],
|
193
|
+
"value": "theAble",
|
194
|
+
"wantsValue": true,
|
195
|
+
"word": "theable"
|
196
|
+
}
|
197
|
+
],
|
198
|
+
"developerTest": false,
|
199
|
+
"generatedParenthesized": [
|
200
|
+
""
|
201
|
+
],
|
202
|
+
"metadata": {
|
203
|
+
"opChoices": [
|
204
|
+
{
|
205
|
+
"counter": 1,
|
206
|
+
"op": [
|
207
|
+
"theAble",
|
208
|
+
0
|
209
|
+
],
|
210
|
+
"ops": [
|
211
|
+
[
|
212
|
+
"a",
|
213
|
+
0
|
214
|
+
],
|
215
|
+
[
|
216
|
+
"theAble",
|
217
|
+
0
|
218
|
+
]
|
219
|
+
]
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"counter": 2,
|
223
|
+
"op": [
|
224
|
+
"a",
|
225
|
+
0
|
226
|
+
],
|
227
|
+
"ops": [
|
228
|
+
[
|
229
|
+
"a",
|
230
|
+
0
|
231
|
+
]
|
232
|
+
]
|
233
|
+
}
|
234
|
+
]
|
235
|
+
},
|
236
|
+
"objects": {
|
237
|
+
"nameToUUID": {
|
238
|
+
"articles": "articles1",
|
239
|
+
"gdefaults": "gdefaults2",
|
240
|
+
"pos": "pos2",
|
241
|
+
"tokenize": "tokenize2"
|
242
|
+
},
|
243
|
+
"namespaced": {
|
244
|
+
"articles1": {
|
245
|
+
},
|
246
|
+
"gdefaults2": {
|
247
|
+
},
|
248
|
+
"pos2": {
|
249
|
+
},
|
250
|
+
"tokenize2": {
|
251
|
+
}
|
252
|
+
},
|
253
|
+
"processed": [
|
254
|
+
{
|
255
|
+
"context": {
|
256
|
+
"concept": true,
|
257
|
+
"dead": true,
|
258
|
+
"default": true,
|
259
|
+
"determiner": {
|
260
|
+
"default": true,
|
261
|
+
"level": 0,
|
262
|
+
"marker": "a",
|
263
|
+
"range": {
|
264
|
+
"end": 0,
|
265
|
+
"start": 0
|
266
|
+
},
|
267
|
+
"text": "a",
|
268
|
+
"word": "a"
|
269
|
+
},
|
270
|
+
"level": 1,
|
271
|
+
"marker": "theAble",
|
272
|
+
"modifiers": [
|
273
|
+
"determiner"
|
274
|
+
],
|
275
|
+
"number": "one",
|
276
|
+
"pullFromContext": false,
|
277
|
+
"range": {
|
278
|
+
"end": 8,
|
279
|
+
"start": 0
|
280
|
+
},
|
281
|
+
"text": "a theable",
|
282
|
+
"topLevel": true,
|
283
|
+
"types": [
|
284
|
+
"theAble"
|
285
|
+
],
|
286
|
+
"value": "theAble",
|
287
|
+
"wantsValue": true,
|
288
|
+
"word": "theable"
|
289
|
+
},
|
290
|
+
"generatedParenthesized": "",
|
291
|
+
"paraphrases": "a theable",
|
292
|
+
"paraphrasesParenthesized": "((a) (theable))",
|
293
|
+
"responses": [
|
294
|
+
""
|
295
|
+
]
|
296
|
+
}
|
297
|
+
]
|
298
|
+
},
|
299
|
+
"paraphrases": [
|
300
|
+
"a theable"
|
301
|
+
],
|
302
|
+
"paraphrasesParenthesized": [
|
303
|
+
"((a) (theable))"
|
304
|
+
],
|
305
|
+
"query": "a theable",
|
306
|
+
"responses": [
|
307
|
+
""
|
308
|
+
]
|
309
|
+
}
|
310
|
+
]
|