ekms 8.9.0-beta.1 → 8.9.0-beta.11

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.
@@ -268,6 +268,11 @@
268
268
  "verb",
269
269
  false
270
270
  ],
271
+ [
272
+ "every",
273
+ "quantifier",
274
+ false
275
+ ],
271
276
  [
272
277
  "hasCountOfPieces",
273
278
  "countable",
@@ -15,9 +15,15 @@ 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 } = context;
18
+ const { unknown, value, word, raw_text } = context;
19
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)
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)
21
27
  }
22
28
  }
23
29
 
@@ -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,6 +163,34 @@ 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
+
166
194
  module.exports = {
167
195
  defaultContextCheck,
168
196
  defaultContextCheckProperties,
@@ -178,4 +206,5 @@ module.exports = {
178
206
  propertyToArray,
179
207
  wordNumber,
180
208
  requiredArgument,
209
+ isA,
181
210
  }
@@ -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
- oneConcept = api.makeObject({config, context: oneConcept})
256
- twoConcept = api.makeObject({config, context: twoConcept})
257
- api.rememberIsA(oneConcept, twoConcept)
255
+ oneConceptId = api.makeObject({config, context: oneConcept})
256
+ twoConceptId = api.makeObject({config, context: twoConcept})
257
+ api.rememberIsA(oneConceptId, twoConceptId)
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: {