tpmkms_4wp 8.9.1-beta.0 → 8.9.1-beta.1
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.
- package/common/dialogues.js +3 -1
- package/common/pos.js +3 -0
- package/common/wp.js +23 -7
- package/common/wp.test.json +322 -366
- package/package.json +2 -2
package/common/dialogues.js
CHANGED
@@ -101,6 +101,7 @@ let config = {
|
|
101
101
|
positive: [
|
102
102
|
// [['is', 0], ['unknown', 1]],
|
103
103
|
// [['isEd', 0], ['means', 0]],
|
104
|
+
[['thatVerb', 0], ['verb', 0]],
|
104
105
|
[['isEdee', 0], ['isEd', 0], ['isEder', 0], ['by', 0]],
|
105
106
|
[['isEdee', 0], ['isEd', 0], ['isEdAble', 0]],
|
106
107
|
[['unknown', 1], ['isEd', 0], ['isEdAble', 0]],
|
@@ -112,7 +113,7 @@ let config = {
|
|
112
113
|
bridges: [
|
113
114
|
{
|
114
115
|
id: 'thatVerb',
|
115
|
-
|
116
|
+
before: ['verb'],
|
116
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: [\"condition\"], condition: bridge }' } }",
|
117
118
|
},
|
118
119
|
|
@@ -326,6 +327,7 @@ let config = {
|
|
326
327
|
|
327
328
|
floaters: ['query'],
|
328
329
|
priorities: [
|
330
|
+
{ "context": [['is', 0], ['means', 0], ], "choose": [0] },
|
329
331
|
{ "context": [['is', 0], ['means', 0], ], "choose": [0] },
|
330
332
|
{ "context": [["what",0], ["does",0],], "choose": [0] },
|
331
333
|
{ "context": [["is",0], ["is",1],], "choose": [0] },
|
package/common/pos.js
CHANGED
@@ -7,6 +7,7 @@ let config = {
|
|
7
7
|
name: 'pos',
|
8
8
|
operators: [
|
9
9
|
"([adjective])",
|
10
|
+
"([adverb])",
|
10
11
|
"([articlePOS])",
|
11
12
|
"([preposition])",
|
12
13
|
"([pronoun])",
|
@@ -17,6 +18,7 @@ let config = {
|
|
17
18
|
],
|
18
19
|
bridges: [
|
19
20
|
{ "id": "adjective" },
|
21
|
+
{ "id": "adverb" },
|
20
22
|
{ "id": "articlePOS" },
|
21
23
|
{ "id": "preposition" },
|
22
24
|
{ "id": "pronoun" },
|
@@ -30,6 +32,7 @@ let config = {
|
|
30
32
|
{ "context": [['endOfSentence', 0], ['verb', 0], ], "choose": [1] },
|
31
33
|
{ "context": [['pronoun', 0], ['ingVerb', 0], ], "choose": [0] },
|
32
34
|
{ "context": [['preposition', 0], ['ingVerb', 0], ], "choose": [0] },
|
35
|
+
{ "context": [['adverb', 0], ['ingVerb', 0], ], "choose": [0] },
|
33
36
|
{ "context": [['preposition', 0], ['adjective', 0], ], "choose": [1] },
|
34
37
|
{ "context": [['preposition', 0], ['articlePOS', 0], ], "choose": [1] },
|
35
38
|
{ "context": [['adjective', 0], ['ingVerb', 0], ], "choose": [0] },
|
package/common/wp.js
CHANGED
@@ -92,9 +92,14 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
|
|
92
92
|
scope = 'all'
|
93
93
|
} else if (context.element.condition) {
|
94
94
|
const condition = context.element.condition
|
95
|
-
if (condition.marker == '
|
95
|
+
if (condition.marker == 'wordComparisonWith_wp') {
|
96
|
+
// with or not with that is the question
|
96
97
|
const letters = condition.letters.letters.text
|
97
98
|
conditions.push({ comparison: condition.comparison, letters })
|
99
|
+
} else if (condition.marker == 'wordComparison_wp') {
|
100
|
+
// with or not with that is the question
|
101
|
+
const letters = condition.letters.text
|
102
|
+
conditions.push({ comparison: condition.comparison, letters })
|
98
103
|
}
|
99
104
|
} else {
|
100
105
|
scope = context.element.quantity.quantity
|
@@ -116,33 +121,44 @@ template = {
|
|
116
121
|
'uppercase means capitalize',
|
117
122
|
'italicize means italic',
|
118
123
|
'italicized means italic',
|
119
|
-
// 'start end and contain are
|
124
|
+
// 'start end and contain are wordComparisonWiths',
|
120
125
|
// 'styles are negatable',
|
121
126
|
"resetIdSuffix",
|
122
127
|
{
|
123
128
|
operators: [
|
124
129
|
"([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|
125
130
|
"((style_wp/*) [applyStyle_wp] ([statefulElement_wp|]))",
|
126
|
-
"((word_wp/*) [
|
131
|
+
"((word_wp/*) [wordComparisonWith_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
|
132
|
+
"((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
|
127
133
|
],
|
128
134
|
bridges: [
|
129
135
|
{
|
130
|
-
id: '
|
136
|
+
id: 'wordComparisonWith_wp',
|
131
137
|
parents: ['verb'],
|
132
138
|
words: [
|
133
139
|
{ word: 'start', comparison: 'prefix' },
|
134
140
|
{ word: 'starts', comparison: 'prefix', },
|
135
141
|
{ word: 'end', comparison: 'suffix' },
|
136
142
|
{ word: 'ends', comparison: 'suffix' },
|
143
|
+
],
|
144
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[0], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
145
|
+
},
|
146
|
+
{
|
147
|
+
id: 'wordComparison_wp',
|
148
|
+
parents: ['verb'],
|
149
|
+
words: [
|
137
150
|
{ word: 'contain', comparison: 'include' },
|
138
151
|
{ word: 'contains', comparison: 'include' },
|
139
152
|
{ word: 'include', comparison: 'include' },
|
140
153
|
{ word: 'includes', comparison: 'include' },
|
141
154
|
],
|
142
|
-
|
155
|
+
optional: {
|
156
|
+
1: "{ marker: 'a' }",
|
157
|
+
},
|
158
|
+
bridge: "{ ...next(operator), element: before[0], subject: before[0], letters: after[1], verb: operator, generate: ['element', 'verb', 'letters'] }",
|
143
159
|
},
|
144
160
|
{
|
145
|
-
id: '
|
161
|
+
id: 'comparisonWith_wp',
|
146
162
|
parents: ['preposition'],
|
147
163
|
optional: {
|
148
164
|
1: "{ marker: 'a' }",
|
@@ -204,7 +220,7 @@ template = {
|
|
204
220
|
],
|
205
221
|
priorities: [
|
206
222
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|
207
|
-
{ "context": [['
|
223
|
+
{ "context": [['comparisonWith_wp',0], ['unknown', 0], ['list', 1]], ordered: true, choose: [0] },
|
208
224
|
],
|
209
225
|
},
|
210
226
|
// "([changeState_wp|make] ([statefulElement_wp]) ([stateValue_wp|]))",
|