tpmkms_4wp 8.0.0-beta.0 → 8.0.0-beta.10
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +2634 -1477
- package/common/characters.js +0 -1
- package/common/colors.instance.json +25327 -0
- package/common/colors.js +71 -0
- package/common/colors.test.json +4860 -0
- package/common/concept.js +2 -2
- package/common/crew.instance.json +15918 -9384
- package/common/crew.js +4 -2
- package/common/crew.test.json +714 -452
- package/common/dialogues.js +36 -25
- package/common/dialogues.test.json +1053 -33
- package/common/dimension.instance.json +261 -290
- package/common/dimension.test.json +476 -687
- package/common/edible.instance.json +19462 -10130
- package/common/emotions.instance.json +125 -68
- package/common/fastfood.instance.json +219732 -110803
- package/common/fastfood.js +1 -1
- package/common/fastfood.test.json +7941 -3647
- package/common/formulas.instance.json +219 -249
- package/common/formulas.js +2 -2
- package/common/formulas.test.json +1027 -955
- package/common/help.test.json +20 -28
- package/common/helpers/concept.js +31 -10
- package/common/helpers/dialogues.js +17 -1
- package/common/helpers/formulas.js +0 -14
- package/common/helpers/meta.js +0 -1
- package/common/helpers/properties.js +6 -13
- package/common/kirk.instance.json +567 -289
- package/common/length.instance.json +5232 -4726
- package/common/math.instance.json +143 -1181
- package/common/math.js +4 -4
- package/common/meta.js +0 -2
- package/common/negation.instance.json +2 -0
- package/common/negation.js +38 -0
- package/common/negation.test.json +308 -0
- package/common/ordering.instance.json +298 -160
- package/common/people.instance.json +1930 -1068
- package/common/pipboy.instance.json +7868 -6548
- package/common/pokemon.instance.json +4074 -2152
- package/common/pressure.instance.json +1299 -1237
- package/common/properties.instance.json +109 -60
- package/common/properties.js +9 -7
- package/common/properties.test.json +17605 -4030
- package/common/punctuation.js +8 -0
- package/common/punctuation.test.json +233 -5
- package/common/reports.instance.json +566 -560
- package/common/reports.js +0 -2
- package/common/sizeable.js +7 -2
- package/common/spock.instance.json +567 -289
- package/common/stm.js +16 -5
- package/common/temperature.instance.json +1337 -1263
- package/common/testing.js +0 -1
- package/common/tokenize.js +2 -1
- package/common/tokenize.test.json +86 -1
- package/common/ui.instance.json +241 -258
- package/common/ui.js +0 -1
- package/common/weight.instance.json +4996 -4206
- package/common/weight.test.json +242 -238
- package/main.js +50 -45
- package/package.json +13 -6
package/common/stm.js
CHANGED
@@ -28,7 +28,12 @@ class API {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
mentioned(concept, value = undefined) {
|
31
|
-
|
31
|
+
// TODO value should perhaps have been called id as in concept id and then value could be value
|
32
|
+
if (value) {
|
33
|
+
concept = { ...concept, pullFromContext: false }
|
34
|
+
} else {
|
35
|
+
concept.pullFromContext = false
|
36
|
+
}
|
32
37
|
if (value) {
|
33
38
|
if (concept.marker == 'unknown') {
|
34
39
|
if (concept.value) {
|
@@ -37,6 +42,7 @@ class API {
|
|
37
42
|
}
|
38
43
|
concept.value = value
|
39
44
|
}
|
45
|
+
concept.fromSTM = true
|
40
46
|
this._objects.mentioned.unshift(concept)
|
41
47
|
}
|
42
48
|
|
@@ -44,7 +50,7 @@ class API {
|
|
44
50
|
// care about value first
|
45
51
|
for (let m of this._objects.mentioned) {
|
46
52
|
if (context.value && context.value == m.marker) {
|
47
|
-
return
|
53
|
+
return m
|
48
54
|
}
|
49
55
|
}
|
50
56
|
|
@@ -54,21 +60,22 @@ class API {
|
|
54
60
|
// care about marker second
|
55
61
|
for (let m of this._objects.mentioned) {
|
56
62
|
if (context.marker != 'unknown' && this.isA(m.marker, context.marker)) {
|
57
|
-
return
|
63
|
+
return m
|
58
64
|
}
|
59
65
|
// if (context.types && context.types.includes(m.marker)) {
|
60
66
|
if (context.types) {
|
61
67
|
for (let parent of context.types) {
|
62
68
|
if (parent != 'unknown' && this.isA(m.marker, parent)) {
|
63
|
-
return
|
69
|
+
return m
|
64
70
|
}
|
65
71
|
}
|
66
72
|
}
|
67
73
|
}
|
74
|
+
|
68
75
|
if (context.types && context.types.length == 1) {
|
69
76
|
for (let m of this._objects.mentioned) {
|
70
77
|
if (context.unknown) {
|
71
|
-
return
|
78
|
+
return m
|
72
79
|
}
|
73
80
|
}
|
74
81
|
}
|
@@ -101,6 +108,9 @@ let createConfig = () => {
|
|
101
108
|
mentioned: (context) => {
|
102
109
|
kms.stm.api.mentioned(context)
|
103
110
|
},
|
111
|
+
mentions: (context) => {
|
112
|
+
return kms.stm.api.mentions(context)
|
113
|
+
},
|
104
114
|
}))
|
105
115
|
})
|
106
116
|
config.api = api
|
@@ -118,6 +128,7 @@ knowledgeModule( {
|
|
118
128
|
contents: stm_tests,
|
119
129
|
checks: {
|
120
130
|
context: defaultContextCheck,
|
131
|
+
objects: ['mentioned'],
|
121
132
|
},
|
122
133
|
},
|
123
134
|
})
|