tpmkms_4wp 8.9.1-beta.2 → 8.9.1-beta.20

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 (79) hide show
  1. package/common/animals.instance.json +260 -68
  2. package/common/articles.js +20 -4
  3. package/common/articles.test.json +338 -0
  4. package/common/asking.js +2 -2
  5. package/common/asking.test.json +41 -0
  6. package/common/avatar.js +1 -1
  7. package/common/characters.js +1 -1
  8. package/common/colors.instance.json +280 -129
  9. package/common/comparable.instance.json +60 -12
  10. package/common/comparable.js +2 -2
  11. package/common/concept.js +1 -1
  12. package/common/conjunction.js +1 -1
  13. package/common/countable.js +3 -9
  14. package/common/countable.test.json +0 -586
  15. package/common/crew.instance.json +604 -380
  16. package/common/currency.js +2 -2
  17. package/common/dialogues.js +28 -11
  18. package/common/dimension.instance.json +16 -8
  19. package/common/dimension.js +2 -2
  20. package/common/edible.instance.json +512 -278
  21. package/common/emotions.instance.json +20 -4
  22. package/common/errors.js +3 -1
  23. package/common/events.js +1 -1
  24. package/common/fastfood.instance.json +2138 -1357
  25. package/common/fastfood.js +4 -4
  26. package/common/formulas.instance.json +16 -5
  27. package/common/formulas.js +1 -1
  28. package/common/formulas.test.json +461 -10
  29. package/common/gdefaults.js +22 -14
  30. package/common/help.js +4 -4
  31. package/common/help.test.json +4 -4
  32. package/common/helpers/concept.js +5 -5
  33. package/common/helpers/conjunction.js +1 -1
  34. package/common/helpers/formulas.js +4 -4
  35. package/common/helpers/frankenhash.js +4 -4
  36. package/common/helpers/meta.js +4 -4
  37. package/common/helpers/ordering.js +2 -2
  38. package/common/helpers/properties.js +17 -17
  39. package/common/helpers.js +17 -1
  40. package/common/hierarchy.js +3 -3
  41. package/common/javascript.js +1 -1
  42. package/common/kirk.instance.json +20 -4
  43. package/common/length.instance.json +240 -80
  44. package/common/math.instance.json +16 -5
  45. package/common/math.js +1 -1
  46. package/common/meta.js +5 -5
  47. package/common/negation.js +1 -1
  48. package/common/numbers.js +1 -1
  49. package/common/ordering.instance.json +41 -63
  50. package/common/ordinals.js +9 -3
  51. package/common/ordinals.test.json +327 -0
  52. package/common/people.instance.json +160 -32
  53. package/common/people.js +1 -1
  54. package/common/percentages.js +1 -1
  55. package/common/pipboy.instance.json +282 -252
  56. package/common/pipboy.js +6 -6
  57. package/common/pokemon.instance.json +260 -57
  58. package/common/pos.js +16 -6
  59. package/common/pressure.instance.json +64 -23
  60. package/common/properties.instance.json +20 -4
  61. package/common/properties.js +5 -5
  62. package/common/punctuation.js +1 -1
  63. package/common/reports.instance.json +34 -12
  64. package/common/reports.js +8 -8
  65. package/common/scorekeeper.js +5 -5
  66. package/common/sdefaults.js +2 -2
  67. package/common/sizeable.js +2 -2
  68. package/common/spock.instance.json +20 -4
  69. package/common/stm.js +6 -6
  70. package/common/tell.js +1 -1
  71. package/common/temperature.instance.json +64 -24
  72. package/common/tester.js +1 -1
  73. package/common/ui.instance.json +21 -5
  74. package/common/weight.instance.json +192 -64
  75. package/common/wp.instance.json +6378 -463
  76. package/common/wp.js +188 -41
  77. package/common/wp.test.json +109609 -3828
  78. package/common/yesno.js +1 -1
  79. package/package.json +11 -6
@@ -40,7 +40,7 @@ class API {
40
40
 
41
41
  const api = new API()
42
42
 
43
- let config = {
43
+ const config = {
44
44
  name: 'currency',
45
45
  operators: [
46
46
  "(([number]) [currency])",
@@ -98,7 +98,7 @@ const initializer = ({config, objects, apis, addWord, addGenerator, baseConfig,
98
98
  addWord(word, def)
99
99
  }
100
100
  unitWords = api.getUnitWords();
101
- for (let words of unitWords) {
101
+ for (const words of unitWords) {
102
102
  addGenerator({
103
103
  match: ({context}) => context.marker == 'currency' && context.units == words.units && context.value == 1 && context.isAbstract,
104
104
  apply: ({context, g}) => words.one, uuid
@@ -36,8 +36,17 @@ const warningSameNotEvaluated = (log, one) => {
36
36
  log(indent(message, 4))
37
37
  }
38
38
 
39
+ const listorama = (type) => {
40
+ return [
41
+ { context: [[type, 0], ['list', 0], [type, 0]], choose: 0 },
42
+ { context: [[type, 1], ['list', 0], [type, 0]], choose: 0 },
43
+ { context: [[type, 1], ['list', 0], [type, 1]], choose: 0 },
44
+ ]
45
+ }
46
+
47
+
39
48
  // TODO implement what / what did you say ...
40
- let config = {
49
+ const config = {
41
50
  name: 'dialogues',
42
51
  operators: [
43
52
  "(<thatVerb|that> (verb/0))",
@@ -101,28 +110,36 @@ let config = {
101
110
  positive: [
102
111
  // [['is', 0], ['unknown', 1]],
103
112
  // [['isEd', 0], ['means', 0]],
113
+ // [['unknown', 0], ['list', 0], ['unknown', 0]],
104
114
  [['thatVerb', 0], ['verb', 0]],
105
115
  [['isEdee', 0], ['isEd', 0], ['isEder', 0], ['by', 0]],
106
116
  [['isEdee', 0], ['isEd', 0], ['isEdAble', 0]],
107
117
  [['unknown', 1], ['isEd', 0], ['isEdAble', 0]],
108
118
  [['unknown', 0], ['isEd', 0], ['isEdAble', 0]],
109
119
  [["isEd",0],["unknown",1],["isEdAble",0]],
110
-
120
+ // ...listorama('unknown'),
121
+ // ...listorama('queryable'),
111
122
  ]
112
123
  },
113
124
  bridges: [
114
125
  {
115
126
  id: 'thatVerb',
116
127
  before: ['verb'],
117
- bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], conditions: append(after[0].conditions, [bridge]) }' } }",
128
+ // bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], generate: append(before[0].generate, concatm(\"thatClause.\", operator.generate)), thatClause: bridge, conditions: append(after[0].conditions, [bridge]) }' } }",
129
+ // bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { before: [\"verb\"] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], generate: concatm(\"thatClause.\", bridge.generate), thatClause: bridge, conditions: append(bridge.subject.conditions, [bridge]) }' } }",
130
+ bridge: "{ ...after[0], verb: after[0], that: operator, generate: ['that', 'verb'], localPriorities: { actLike: [\"subordinatedVerb\", 0] }, bridge_override: { operator: after[0].marker, bridge: '{ ...bridge.subject, postModifiers: [\"conditions\"], modifiers: [], generate: concatm(\"thatClause.\", bridge.generate), thatClause: bridge, conditions: append(bridge.subject.conditions, [bridge]) }' } }",
118
131
  },
119
132
 
120
133
  {
121
134
  id: 'queryable',
122
- children: [
123
- 'negatable'
124
- ],
135
+ children: [ 'negatable' ],
125
136
  },
137
+ /*
138
+ {
139
+ id: 'queryable',
140
+ level: 1,
141
+ },
142
+ */
126
143
  {
127
144
  id: 'makeObject',
128
145
  bridge: "{ ...next(operator), object: after[0] }",
@@ -334,7 +351,7 @@ let config = {
334
351
  { "context": [["isEdAble",0], ["isEd",0],], "choose": [0] },
335
352
  { "context": [['a', 0], ['is', 0], ['does', 0], ], "choose": [0] },
336
353
  { "context": [['isEd', 0], ['means', 0], ], "choose": [0] },
337
- { "context": [['articlePOS', 0], ['isEdAble', 0], ], "choose": [0] },
354
+ { "context": [['article', 0], ['isEdAble', 0], ], "choose": [0] },
338
355
  { "context": [['isEdAble', 0], ['is', 0], ], "choose": [0] },
339
356
  { "context": [['isEdAble', 0], ['is', 1], ], "choose": [0] },
340
357
  ],
@@ -344,8 +361,8 @@ let config = {
344
361
  ['this', 'pronoun'],
345
362
  ['questionMark', 'punctuation'],
346
363
  // ['questionMark', 'isEd'],
347
- ['a', 'articlePOS'],
348
- ['the', 'articlePOS'],
364
+ ['a', 'article'],
365
+ ['the', 'article'],
349
366
  ['unknown', 'theAble'],
350
367
  ['theAble', 'queryable'],
351
368
  ['unknown', 'queryable'],
@@ -658,7 +675,7 @@ let config = {
658
675
  // km('dialogues').api.mentioned(concept)
659
676
  // TODO wtf is the next line?
660
677
  value = JSON.parse(JSON.stringify(value))
661
- let instance = await e(value)
678
+ const instance = await e(value)
662
679
  if (false && instance.evalue) {
663
680
  km('stm').api.mentioned({ context: value })
664
681
  }
@@ -793,7 +810,7 @@ const initializer = ({objects, config, isModule}) => {
793
810
  return api('dialogues').toScopedId(context)
794
811
  },
795
812
  addWords: (id, word, additional) => {
796
- for (let props of words(word, { ...additional })) {
813
+ for (const props of words(word, { ...additional })) {
797
814
  config.addWord(props.word, { id, initial: JSON.stringify(props) })
798
815
  }
799
816
  },
@@ -123,7 +123,7 @@
123
123
  "hierarchy": [
124
124
  [
125
125
  "a",
126
- "articlePOS",
126
+ "article",
127
127
  false
128
128
  ],
129
129
  [
@@ -137,8 +137,8 @@
137
137
  false
138
138
  ],
139
139
  [
140
- "articlePOS",
141
- "articlePOS",
140
+ "article",
141
+ "article",
142
142
  false
143
143
  ],
144
144
  [
@@ -261,6 +261,11 @@
261
261
  "theAble",
262
262
  false
263
263
  ],
264
+ [
265
+ "distributable",
266
+ "queryable",
267
+ false
268
+ ],
264
269
  [
265
270
  "divideByExpression",
266
271
  "mathematicalExpression",
@@ -276,6 +281,11 @@
276
281
  "queryable",
277
282
  false
278
283
  ],
284
+ [
285
+ "each",
286
+ "article",
287
+ false
288
+ ],
279
289
  [
280
290
  "evaluate",
281
291
  "verb",
@@ -283,7 +293,7 @@
283
293
  ],
284
294
  [
285
295
  "every",
286
- "quantifier",
296
+ "article",
287
297
  false
288
298
  ],
289
299
  [
@@ -863,7 +873,7 @@
863
873
  ],
864
874
  [
865
875
  "the",
866
- "articlePOS",
876
+ "article",
867
877
  false
868
878
  ],
869
879
  [
@@ -1122,7 +1132,6 @@
1122
1132
  },
1123
1133
  "types": [
1124
1134
  "list",
1125
- "queryable",
1126
1135
  "unknown"
1127
1136
  ],
1128
1137
  "listable": true,
@@ -1139,7 +1148,6 @@
1139
1148
  "end": 8
1140
1149
  },
1141
1150
  "types": [
1142
- "queryable",
1143
1151
  "unknown"
1144
1152
  ],
1145
1153
  "dead": true,
@@ -1156,7 +1164,6 @@
1156
1164
  "end": 17
1157
1165
  },
1158
1166
  "types": [
1159
- "queryable",
1160
1167
  "unknown"
1161
1168
  ],
1162
1169
  "dead": true,
@@ -1184,6 +1191,7 @@
1184
1191
  },
1185
1192
  "dead": true,
1186
1193
  "level": 2,
1194
+ "context_index": 1,
1187
1195
  "topLevel": true,
1188
1196
  "touchedBy": [
1189
1197
  "dimension#call2"
@@ -40,7 +40,7 @@ class API {
40
40
  })
41
41
 
42
42
  // for example, celcius and fahrenheit
43
- for (let unit of units) {
43
+ for (const unit of units) {
44
44
  config.addOperator(`([${unit}])`)
45
45
  config.addBridge({
46
46
  id: unit,
@@ -52,7 +52,7 @@ class API {
52
52
 
53
53
  const api = new API()
54
54
 
55
- let config = {
55
+ const config = {
56
56
  name: 'dimension',
57
57
  operators: [
58
58
  "([dimension])",