tpmkms_4wp 8.0.0-beta.0 → 8.0.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/common/animals.instance.json +103 -113
  2. package/common/characters.js +0 -1
  3. package/common/colors.instance.json +22140 -0
  4. package/common/colors.js +71 -0
  5. package/common/colors.test.json +4860 -0
  6. package/common/concept.js +2 -2
  7. package/common/crew.instance.json +4142 -3545
  8. package/common/crew.js +4 -2
  9. package/common/dialogues.js +34 -7
  10. package/common/dialogues.test.json +1053 -33
  11. package/common/dimension.instance.json +20 -30
  12. package/common/dimension.test.json +289 -312
  13. package/common/edible.instance.json +216 -156
  14. package/common/emotions.instance.json +64 -0
  15. package/common/fastfood.instance.json +1011 -386
  16. package/common/fastfood.js +1 -1
  17. package/common/fastfood.test.json +7941 -3647
  18. package/common/formulas.instance.json +4 -0
  19. package/common/formulas.test.json +1027 -955
  20. package/common/help.test.json +14 -10
  21. package/common/helpers/concept.js +29 -9
  22. package/common/helpers/dialogues.js +17 -1
  23. package/common/helpers/formulas.js +0 -14
  24. package/common/helpers/meta.js +0 -1
  25. package/common/helpers/properties.js +6 -13
  26. package/common/kirk.instance.json +4 -0
  27. package/common/length.instance.json +93 -63
  28. package/common/math.instance.json +26 -47
  29. package/common/meta.js +0 -2
  30. package/common/ordering.instance.json +76 -0
  31. package/common/people.instance.json +35 -60
  32. package/common/pipboy.instance.json +215 -229
  33. package/common/pokemon.instance.json +131 -82
  34. package/common/pressure.instance.json +38 -48
  35. package/common/properties.instance.json +4 -0
  36. package/common/properties.js +7 -7
  37. package/common/properties.test.json +17605 -4030
  38. package/common/punctuation.js +8 -0
  39. package/common/punctuation.test.json +233 -5
  40. package/common/reports.instance.json +12 -4
  41. package/common/reports.js +0 -2
  42. package/common/sizeable.js +7 -2
  43. package/common/spock.instance.json +4 -0
  44. package/common/stm.js +16 -5
  45. package/common/temperature.instance.json +45 -59
  46. package/common/testing.js +0 -1
  47. package/common/tokenize.js +2 -1
  48. package/common/tokenize.test.json +86 -1
  49. package/common/ui.instance.json +4 -0
  50. package/common/ui.js +0 -1
  51. package/common/weight.instance.json +62 -11
  52. package/common/weight.test.json +242 -238
  53. package/main.js +2 -0
  54. package/package.json +6 -2
@@ -120,7 +120,7 @@
120
120
  }
121
121
  ],
122
122
  "generatedParenthesized": [
123
- "( 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)"
123
+ "( 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)"
124
124
  ],
125
125
  "metadata": {
126
126
  "opChoices": [
@@ -219,10 +219,12 @@
219
219
  "pos": "pos2",
220
220
  "punctuation": "punctuation2",
221
221
  "sdefaults": "sdefaults2",
222
- "stm": "stm2"
222
+ "stm": "stm2",
223
+ "tokenize": "tokenize2"
223
224
  },
224
225
  "namespaced": {
225
226
  "dialogues2": {
227
+ "idSuffix": "",
226
228
  "mentioned": [
227
229
  ],
228
230
  "variables": {
@@ -245,6 +247,8 @@
245
247
  ],
246
248
  "variables": {
247
249
  }
250
+ },
251
+ "tokenize2": {
248
252
  }
249
253
  },
250
254
  "processed": [
@@ -312,11 +316,11 @@
312
316
  "value": "help",
313
317
  "word": "help"
314
318
  },
315
- "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)",
319
+ "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)",
316
320
  "paraphrases": "help",
317
321
  "paraphrasesParenthesized": "(help)",
318
322
  "responses": [
319
- " 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"
323
+ " 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"
320
324
  ]
321
325
  }
322
326
  ]
@@ -329,7 +333,7 @@
329
333
  ],
330
334
  "query": "help with help and dialogues",
331
335
  "responses": [
332
- " 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"
336
+ " 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"
333
337
  ]
334
338
  },
335
339
  {
@@ -356,9 +360,8 @@
356
360
  "word": "help"
357
361
  }
358
362
  ],
359
- "developerTest": false,
360
363
  "generatedParenthesized": [
361
- "( 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\n\n\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\n\n)"
364
+ "( 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\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\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
362
365
  ],
363
366
  "metadata": {
364
367
  "opChoices": [
@@ -391,6 +394,7 @@
391
394
  },
392
395
  "namespaced": {
393
396
  "dialogues2": {
397
+ "idSuffix": "",
394
398
  "mentioned": [
395
399
  ],
396
400
  "variables": {
@@ -436,11 +440,11 @@
436
440
  "value": "help",
437
441
  "word": "help"
438
442
  },
439
- "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\n\n\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\n\n)",
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\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\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
440
444
  "paraphrases": "help",
441
445
  "paraphrasesParenthesized": "(help)",
442
446
  "responses": [
443
- " 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\n\n\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\n\n"
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\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\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
444
448
  ]
445
449
  }
446
450
  ]
@@ -453,7 +457,7 @@
453
457
  ],
454
458
  "query": "help",
455
459
  "responses": [
456
- " 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\n\n\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\n\n"
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\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\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
457
461
  ]
458
462
  }
459
463
  ]
@@ -1,6 +1,6 @@
1
1
  const pluralize = require('pluralize')
2
2
  const deepEqual = require('deep-equal')
3
- const { chooseNumber } = require('../helpers.js')
3
+ const { chooseNumber, zip } = require('../helpers.js')
4
4
  const { compose, translationMapping, translationMappingToInstantiatorMappings } = require('./meta.js')
5
5
 
6
6
  class API {
@@ -31,13 +31,25 @@ class API {
31
31
  // for example, "crew member" or "photon torpedo"
32
32
  // TODO account for modifier a complex phrase for example "hot (chicken strips)"
33
33
  kindOfConcept({ config, modifiers, object }) {
34
- const objectId = pluralize.singular(object)
34
+ // TODO make the modifiers objects then below for add words for modifiers only do if !unknown
35
+ // const objectId = pluralize.singular(object)
36
+ const objectId = this.args.kms.dialogues.api.toScopedId(object)
37
+
35
38
  // const modifierIds = modifiers.map( (modifier) => pluralize.singular(modifier) )
36
- const modifierIds = modifiers
37
- const modifiersObjectId = `${modifierIds.join("_")}_${objectId}`
39
+ const modifierIds = modifiers.map( (modifier) => this.args.kms.dialogues.api.toScopedId(modifier) )
40
+ const modifiersObjectId = `${modifiers.join("_")}_${objectId}`
38
41
 
39
- const objectSingular = pluralize.singular(object)
40
- const objectPlural = pluralize.plural(object)
42
+ const toWord = (object) => {
43
+ if (typeof object == 'string') {
44
+ return object
45
+ }
46
+ return object.text
47
+ }
48
+ const objectWord = toWord(object)
49
+ // const objectWord = object
50
+ // TODO call evaluator to pick up overrides
51
+ const objectSingular = pluralize.singular(objectWord)
52
+ const objectPlural = pluralize.plural(objectWord)
41
53
  // config.addOperator({ pattern: `(${modifierIds.map((modifierId) => `(${modifierId}/*)`).join(' ')} [${modifiersObjectId}] (${objectId}/0))`, allowDups: true })
42
54
  config.addOperator({ pattern: `(${modifierIds.map((modifierId) => `(${modifierId}/*)`).join(' ')} [${modifiersObjectId}] (${objectId}/*))`, allowDups: true })
43
55
  // config.addOperator({ pattern: `(<${modifierId}|> ([${objectId}|]))`, allowDups: true })
@@ -59,10 +71,18 @@ class API {
59
71
  config.addOperator({ pattern: `([${objectId}|])`, allowDups: true })
60
72
  }
61
73
 
74
+ if (object.unknown) {
75
+ config.addWord(objectSingular, { id: objectId, initial: `{ value: '${objectId}', number: 'one' }`})
76
+ config.addWord(objectPlural, { id: objectId, initial: `{ value: '${objectId}', number: 'many' }`})
77
+ }
62
78
 
63
- config.addWord(objectSingular, { id: objectId, initial: `{ value: '${objectId}', number: 'one' }`})
64
- config.addWord(objectPlural, { id: objectId, initial: `{ value: '${objectId}', number: 'many' }`})
65
- modifierIds.forEach((modifierId) => config.addWord(modifierId, { id: modifierId, initial: `{ value: '${modifierId}' }`}))
79
+ zip(modifiers, modifierIds).forEach(([modifierWord, modifierId]) => {
80
+ // config.addWord(modifier, { id: modifierId, initial: `{ value: '${modifierId}' }`})
81
+ // TODO call evaluator to pick up overrides
82
+ config.addWord(pluralize.singular(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'one' }`})
83
+ config.addWord(pluralize.plural(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'many' }`})
84
+ })
85
+ // modifierds.forEach((modifierId) => config.addWord(modifierId, { id: modifierId, initial: `{ value: '${modifierId}' }`}))
66
86
 
67
87
  modifierIds.forEach((modifierId) => config.addBridge({ id: modifierId, level: 0, bridge: `{ ...next(operator), value: '${modifierId}' }`, allowDups: true }))
68
88
  config.addBridge({ id: objectId, level: 0, bridge: `{ ...next(operator), value: '${objectId}' }`, allowDups: true })
@@ -4,6 +4,21 @@ const { indent, focus } = require('../helpers')
4
4
  class API {
5
5
  initialize({ objects }) {
6
6
  this._objects = objects
7
+ this._objects.idSuffix = ''
8
+ }
9
+
10
+ setIdSuffix(idSuffix) {
11
+ this._objects.idSuffix = idSuffix
12
+ }
13
+
14
+ toScopedId(context) {
15
+ if (typeof context == 'string') {
16
+ return pluralize.singular(context) + this._objects.idSuffix
17
+ } else {
18
+ const { unknown, value, word } = context;
19
+ // return unknown ? pluralize.singular(word) + this._objects.idSuffix : pluralize.singular(value || word)
20
+ return unknown ? pluralize.singular(word) + this._objects.idSuffix : value || pluralize.singular(word)
21
+ }
7
22
  }
8
23
 
9
24
  warningNotEvaluated(log, value) {
@@ -64,7 +79,8 @@ class API {
64
79
  if (!value) {
65
80
  return
66
81
  }
67
- const concept = pluralize.singular(value)
82
+ // const concept = pluralize.singular(value)
83
+ const concept = this.toScopedId(context)
68
84
  if (config.exists(concept)) {
69
85
  return concept
70
86
  }
@@ -42,11 +42,9 @@ const unify = (rule, value) => {
42
42
 
43
43
  const f = (values, variable) => (value) => {
44
44
  if (!value) {
45
- debugger
46
45
  throw new Error("Value not present")
47
46
  }
48
47
  if (values[variable] && values[variable] != value) {
49
- debugger
50
48
  throw new Error("Variable already set to different value")
51
49
  }
52
50
  values[variable] = value
@@ -80,18 +78,6 @@ function solveFor(expression, variable, isVariable = (expression) => typeof expr
80
78
  return c1.value == c2.value
81
79
  }
82
80
 
83
- /*
84
- for (let rule of rules) {
85
- debugger
86
- const body = unify(rule, expression)
87
- const lVars = getVariables(body.left, isVariable)
88
- const rVars = getVariables(body.right, isVariable)
89
- if (lVars.length == 1 && sameVar(lVars[0], variable) && !rVars.some((c) => sameVar(c, variable))) {
90
- return body
91
- }
92
- }
93
- */
94
-
95
81
  const lVars = getVariables(expression.left, isVariable)
96
82
  const rVars = getVariables(expression.right, isVariable)
97
83
  if (lVars.length == 1 && sameVar(lVars[0], variable) && !rVars.some((c) => sameVar(c, variable))) {
@@ -104,7 +104,6 @@ const translationMappingToInstantiatorMappings = (translationMapping, from , to
104
104
  match: ({context}) => context[tm.to],
105
105
  apply: ({context}) => {
106
106
  // Object.assign(context[tm.to], from[tm.from])
107
- // debugger;
108
107
  context[tm.to] = from[tm.from]
109
108
  if (context[tm.to]) {
110
109
  context[tm.to].instantiated = true
@@ -81,7 +81,6 @@ class API {
81
81
  match: ({context}) => context[tm.to],
82
82
  apply: ({context}) => {
83
83
  // Object.assign(context[tm.to], from[tm.from])
84
- // debugger;
85
84
  context[tm.to] = from[tm.from]
86
85
  if (context[tm.to]) {
87
86
  context[tm.to].instantiated = true
@@ -501,12 +500,6 @@ class API {
501
500
  for (let argument of context.focusable || []) {
502
501
  const value = api.toValue(context[argument])
503
502
  if (value) {
504
- /*
505
- if (value == 'cleo') {
506
- debugger;
507
- hierarchy.isA()
508
- }
509
- */
510
503
  const minimas = hierarchy.minima(context[argument].types)
511
504
  for (let type of minimas) {
512
505
  if (config.exists(value)) {
@@ -689,7 +682,7 @@ class API {
689
682
  }
690
683
 
691
684
  getPropertyDirectly(object, property, g) {
692
- if (property == 'properties') {
685
+ if (property == 'property') {
693
686
  const objectProps = this.propertiesFH.getValue([object])
694
687
  const values = []
695
688
  for (let key of Object.keys(objectProps)) {
@@ -734,7 +727,7 @@ class API {
734
727
  }
735
728
 
736
729
  knownObject(object) {
737
- if (object == 'properties') {
730
+ if (object == 'property') {
738
731
  return object
739
732
  }
740
733
  if ((object || {}).value) {
@@ -746,7 +739,7 @@ class API {
746
739
  }
747
740
 
748
741
  hasProperty(object, property) {
749
- if (property == 'properties') {
742
+ if (property == 'property') {
750
743
  return true;
751
744
  }
752
745
 
@@ -773,8 +766,9 @@ class API {
773
766
  knownProperty(object, property) {
774
767
  object = this.toValue(object)
775
768
  property = this.toValue(property)
776
- if (property == 'properties') {
777
- return true;
769
+ if (property == 'property') {
770
+ const objectProps = this.propertiesFH.getValue([object])
771
+ return !_.isEmpty(objectProps)
778
772
  }
779
773
 
780
774
  // go up the hierarchy
@@ -916,7 +910,6 @@ class API {
916
910
  }
917
911
 
918
912
  set config(config) {
919
- debugger
920
913
  this._config = config
921
914
  /*
922
915
  const toJSON = (h) => {
@@ -353,6 +353,10 @@
353
353
  "dog",
354
354
  "theAble"
355
355
  ],
356
+ [
357
+ "doubleQuote",
358
+ "queryable"
359
+ ],
356
360
  [
357
361
  "eagle",
358
362
  "bird"