tpmkms_4wp 8.9.0-beta.19 → 8.9.0-beta.3

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.
Files changed (40) hide show
  1. package/common/animals.instance.json +0 -65
  2. package/common/articles.js +0 -4
  3. package/common/colors.instance.json +0 -71
  4. package/common/comparable.instance.json +0 -15
  5. package/common/conjunction.js +18 -27
  6. package/common/countable.js +2 -8
  7. package/common/countable.test.json +0 -586
  8. package/common/crew.instance.json +176 -130
  9. package/common/dialogues.js +11 -7
  10. package/common/dimension.instance.json +0 -10
  11. package/common/edible.instance.json +0 -376
  12. package/common/emotions.instance.json +0 -8
  13. package/common/fastfood.instance.json +924 -1437
  14. package/common/formulas.instance.json +0 -10
  15. package/common/helpers/dialogues.js +8 -14
  16. package/common/helpers/properties.js +2 -2
  17. package/common/helpers.js +0 -29
  18. package/common/hierarchy.js +5 -5
  19. package/common/hierarchy.test.json +0 -1491
  20. package/common/kirk.instance.json +0 -5
  21. package/common/length.instance.json +0 -150
  22. package/common/math.instance.json +0 -10
  23. package/common/meta.js +3 -5
  24. package/common/ordering.instance.json +0 -10
  25. package/common/people.instance.json +4 -169
  26. package/common/pipboy.instance.json +28 -198
  27. package/common/pokemon.instance.json +0 -65
  28. package/common/pressure.instance.json +0 -40
  29. package/common/properties.instance.json +0 -5
  30. package/common/reports.instance.json +1 -21
  31. package/common/spock.instance.json +0 -5
  32. package/common/temperature.instance.json +0 -40
  33. package/common/ui.instance.json +0 -10
  34. package/common/ui.js +1 -0
  35. package/common/weight.instance.json +0 -120
  36. package/common/wp.instance.json +954 -28870
  37. package/common/wp.js +10 -147
  38. package/common/wp.test.json +698 -28243
  39. package/package.json +2 -3
  40. package/common/helpers/conjunction.js +0 -75
@@ -268,11 +268,6 @@
268
268
  "verb",
269
269
  false
270
270
  ],
271
- [
272
- "every",
273
- "quantifier",
274
- false
275
- ],
276
271
  [
277
272
  "hasCountOfPieces",
278
273
  "countable",
@@ -473,11 +468,6 @@
473
468
  "verb",
474
469
  false
475
470
  ],
476
- [
477
- "negatable",
478
- "queryable",
479
- false
480
- ],
481
471
  [
482
472
  "noun",
483
473
  "theAble",
@@ -15,15 +15,9 @@ class API {
15
15
  if (typeof context == 'string') {
16
16
  return pluralize.singular(context) + this._objects.idSuffix
17
17
  } else {
18
- const { unknown, value, word, raw_text } = context;
18
+ const { unknown, value, word } = context;
19
19
  // return unknown ? pluralize.singular(word) + this._objects.idSuffix : pluralize.singular(value || word)
20
- return unknown ? pluralize.singular(raw_text || word) + this._objects.idSuffix : value || pluralize.singular(word)
21
- /*
22
- if (raw_text && raw_text !== word) {
23
- debugger
24
- }
25
- */
26
- //return unknown ? pluralize.singular(word) + this._objects.idSuffix : value || pluralize.singular(word)
20
+ return unknown ? pluralize.singular(word) + this._objects.idSuffix : value || pluralize.singular(word)
27
21
  }
28
22
  }
29
23
 
@@ -77,7 +71,7 @@ class API {
77
71
  }
78
72
 
79
73
  // word is for one or many
80
- makeObject({config, context, types=[], source_value=undefined, doPluralize=true} = {}) {
74
+ makeObject({config, context, types=[], doPluralize=true} = {}) {
81
75
  /*
82
76
  if (!context.unknown) {
83
77
  return context.value
@@ -89,9 +83,9 @@ class API {
89
83
  }
90
84
  // const concept = pluralize.singular(value)
91
85
  const concept = this.toScopedId(context)
92
- if (config.exists(concept)) {
93
- return concept
94
- }
86
+ if (config.exists(concept)) {
87
+ return concept
88
+ }
95
89
 
96
90
  // TODO handle the general case
97
91
  const fixUps = (concept) => {
@@ -102,9 +96,9 @@ class API {
102
96
  }
103
97
  // config.addOperator({ pattern: `(["${fixUps(concept)}"])`, allowDups: true })
104
98
  config.addOperator({ pattern: `(["${concept}"])`, allowDups: true })
105
- config.addBridge({ id: concept, level: 0, bridge: `{ ...next(operator), value: '${source_value || concept}' }` , allowDups: true })
99
+ config.addBridge({ id: concept, level: 0, bridge: `{ ...next(operator), value: '${concept}' }` , allowDups: true })
106
100
  const addConcept = (word, number) => {
107
- config.addWord(word, { id: concept, initial: `{ value: "${source_value || concept}", number: "${number}" }` } )
101
+ config.addWord(word, { id: concept, initial: `{ value: "${concept}", number: "${number}" }` } )
108
102
  const baseTypes = [
109
103
  'theAble',
110
104
  'queryable',
@@ -230,8 +230,8 @@ class API {
230
230
  // config.addBridge({ id: "owner", level: 0, bridge: "{ ...next(operator) }"})
231
231
 
232
232
  {
233
- const whoIsWhatVerbedBy = `${before[0].tag}var is ${after[0].tag}var ${edAble.word} by`
234
- const thisIsVerbedByThat = `${after[0].tag}var is ${edAble.word} by ${before[0].tag}var`
233
+ const whoIsWhatVerbedBy = `${before[0].tag}Var is ${after[0].tag}Var ${edAble.word} by`
234
+ const thisIsVerbedByThat = `${after[0].tag}Var is ${edAble.word} by ${before[0].tag}Var`
235
235
 
236
236
  // greg32 check this out
237
237
  // config.addFragments([whoIsWhatVerbedBy])
package/common/helpers.js CHANGED
@@ -163,34 +163,6 @@ const defaultContextCheck = (properties = []) => {
163
163
  ]
164
164
  }
165
165
 
166
- const isA = (hierarchy) => (child, parent, { strict=false } = {}) => {
167
- if (!child || !parent) {
168
- return false
169
- }
170
-
171
- if (strict) {
172
- if (child.marker) {
173
- child = child.marker
174
- }
175
- if (parent.marker) {
176
- parent = parent.marker
177
- }
178
- return hierarchy.isA(child, parent)
179
- } else {
180
- if (hierarchy.isA(child.marker || child, parent.marker || parent)) {
181
- return true
182
- }
183
- for (const childT of child.types || [child]) {
184
- for (const parentT of parent.types || [parent]) {
185
- if (hierarchy.isA(childT, parentT)) {
186
- return true
187
- }
188
- }
189
- }
190
- return false
191
- }
192
- }
193
-
194
166
  module.exports = {
195
167
  defaultContextCheck,
196
168
  defaultContextCheckProperties,
@@ -206,5 +178,4 @@ module.exports = {
206
178
  propertyToArray,
207
179
  wordNumber,
208
180
  requiredArgument,
209
- isA,
210
181
  }
@@ -252,9 +252,9 @@ let config = {
252
252
  const twoConcepts = asList(context.same);
253
253
  for (let oneConcept of oneConcepts.value) {
254
254
  for (let twoConcept of twoConcepts.value) {
255
- oneConceptId = api.makeObject({config, context: oneConcept})
256
- twoConceptId = api.makeObject({config, context: twoConcept})
257
- api.rememberIsA(oneConceptId, twoConceptId)
255
+ oneConcept = api.makeObject({config, context: oneConcept})
256
+ twoConcept = api.makeObject({config, context: twoConcept})
257
+ api.rememberIsA(oneConcept, twoConcept)
258
258
  context.sameWasProcessed = true
259
259
  }
260
260
  }
@@ -305,8 +305,8 @@ knowledgeModule( {
305
305
  checks: {
306
306
  objects: ['children', 'concept', 'parents', 'properties'],
307
307
  checks: {
308
- context: defaultContextCheck(),
309
- },
308
+ context: defaultContextCheck(),
309
+ },
310
310
 
311
311
  },
312
312
  includes: {