tpmkms_4wp 8.0.0-beta.64 → 8.0.0-beta.66

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,38 @@
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
+ [
41
+ [
42
+ "help",
43
+ 0
44
+ ],
45
+ [
46
+ "list",
47
+ 0
48
+ ],
49
+ [
50
+ "withKM",
51
+ 0
52
+ ]
53
+ ],
22
54
  [
23
55
  [
24
56
  "help",
@@ -73,7 +105,8 @@
73
105
  "word": "help"
74
106
  },
75
107
  {
76
- "level": 0,
108
+ "dead": true,
109
+ "level": 1,
77
110
  "marker": "km",
78
111
  "range": {
79
112
  "end": 27,
@@ -138,7 +171,7 @@
138
171
  {
139
172
  "counter": 2,
140
173
  "op": [
141
- "list",
174
+ "km",
142
175
  0
143
176
  ],
144
177
  "ops": [
@@ -163,7 +196,7 @@
163
196
  {
164
197
  "counter": 3,
165
198
  "op": [
166
- "withKM",
199
+ "list",
167
200
  0
168
201
  ],
169
202
  "ops": [
@@ -171,6 +204,10 @@
171
204
  "help",
172
205
  0
173
206
  ],
207
+ [
208
+ "list",
209
+ 0
210
+ ],
174
211
  [
175
212
  "withKM",
176
213
  0
@@ -179,6 +216,23 @@
179
216
  },
180
217
  {
181
218
  "counter": 4,
219
+ "op": [
220
+ "withKM",
221
+ 0
222
+ ],
223
+ "ops": [
224
+ [
225
+ "help",
226
+ 0
227
+ ],
228
+ [
229
+ "withKM",
230
+ 0
231
+ ]
232
+ ]
233
+ },
234
+ {
235
+ "counter": 5,
182
236
  "op": [
183
237
  "help",
184
238
  0
@@ -280,7 +334,8 @@
280
334
  "word": "help"
281
335
  },
282
336
  {
283
- "level": 0,
337
+ "dead": true,
338
+ "level": 1,
284
339
  "marker": "km",
285
340
  "range": {
286
341
  "end": 27,
@@ -352,7 +407,7 @@
352
407
  }
353
408
  ],
354
409
  "generatedParenthesized": [
355
- "( 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\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: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: 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 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)"
356
411
  ],
357
412
  "metadata": {
358
413
  "opChoices": [
@@ -440,11 +495,11 @@
440
495
  "value": "help",
441
496
  "word": "help"
442
497
  },
443
- "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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\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: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: 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 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)",
444
499
  "paraphrases": "help",
445
500
  "paraphrasesParenthesized": "(help)",
446
501
  "responses": [
447
- " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\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: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: 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 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"
448
503
  ]
449
504
  }
450
505
  ]
@@ -457,7 +512,7 @@
457
512
  ],
458
513
  "query": "help",
459
514
  "responses": [
460
- " 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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\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: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
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 setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\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: 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 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"
461
516
  ]
462
517
  }
463
518
  ]
@@ -4,6 +4,8 @@ const helpers = require('./helpers')
4
4
  const stm = require('./stm')
5
5
  const nameable_tests = require('./nameable.test.json')
6
6
 
7
+ // TODO but "remember the m1\n call the m1 banana" <- the on the first one
8
+
7
9
  class API {
8
10
  initialize({ objects, km, kms }) {
9
11
  this.objects = objects
@@ -73,7 +75,8 @@ const api = new API()
73
75
  const config = {
74
76
  name: 'nameable',
75
77
  operators: [
76
- "([call] ([nameable]) (name))",
78
+ // "([call] ([nameable]) (name))",
79
+ "([call] ([nameable]) (!@<=endOfSentence)*)",
77
80
  { pattern: "([getNamesByType] (type))", development: true },
78
81
  { pattern: "([m1])", development: true },
79
82
  // { pattern: "([testPullFromContext] ([memorable]))", development: true }
@@ -103,12 +106,15 @@ const config = {
103
106
  {
104
107
  id: 'call',
105
108
  isA: ['verb'],
106
- bridge: "{ ...next(operator), nameable: after[0], name: after[1] }",
107
- generatorp: async ({context, g}) => `call ${await g(context.nameable)} ${await g(context.name)}`,
109
+ bridge: "{ ...next(operator), nameable: after[0], name: after[1:] }",
110
+ // bridge: "{ ...next(operator), nameable: after[0], name: after[1] }",
111
+ // generatorp: async ({context, g}) => `call ${await g(context.nameable)} ${await g(context.name)}`,
112
+ generatorp: async ({context, g, gs}) => `call ${await g(context.nameable)} ${await gs(context.name)}`,
108
113
  semantic: async ({config, context, api, e}) => {
109
114
  // TODO find report being referred to
110
115
  const nameable = (await e(context.nameable)).evalue
111
- const name = context.name.text
116
+ const name = context.name.map((n) => n.text).join(' ')
117
+ // const name = context.name.text
112
118
  config.addWord(name, { id: nameable.marker, initial: `{ value: "${name}", pullFromContext: true, nameable_named: true }` })
113
119
  api.setName(nameable, name)
114
120
  }
@@ -131,5 +137,8 @@ knowledgeModule( {
131
137
  context: [...defaultContextCheck, 'pullFromContext'],
132
138
  objects: ['mentioned', { km: 'stm' }],
133
139
  },
140
+ include: {
141
+ words: [ "peter james chunkington", "banana" ],
142
+ }
134
143
  },
135
144
  })