tpmkms_4wp 7.12.2-beta.3 → 7.12.2-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/common/avatar.js +5 -4
- package/common/crew.test.json +45 -45
- package/common/dialogues.js +8 -2
- package/common/dimension.js +2 -2
- package/common/dimension.test.json +204 -158
- package/common/edible.instance.json +2 -2
- package/common/edible.test.json +34 -4
- package/common/fastfood.instance.json +486 -326
- package/common/fastfood.test.json +686 -2164
- package/common/formulas.test.json +25 -85
- package/common/gdefaults.js +2 -1
- package/common/hierarchy.js +2 -2
- package/common/math.js +12 -1
- package/common/math.test.json +127 -543
- package/common/people.instance.json +46 -14
- package/common/people.test.json +118 -56
- package/common/pipboy.test.json +1800 -86
- package/common/pokemon.test.json +1658 -4
- package/common/properties.test.json +198 -90
- package/common/reports.instance.json +1 -1
- package/common/scorekeeper.test.json +46 -46
- package/common/temperature.instance.json +54 -30
- package/common/weight.test.json +22 -22
- package/package.json +2 -5
package/common/avatar.js
CHANGED
@@ -22,8 +22,9 @@ let configStruct = {
|
|
22
22
|
],
|
23
23
|
|
24
24
|
words: {
|
25
|
-
|
26
|
-
"
|
25
|
+
// TODO use pronoun
|
26
|
+
"my": [{ id: 'objectPrefix', initial: "{ variable: true, value: 'other', possessive: true }" }],
|
27
|
+
"your": [{ id: 'objectPrefix', initial: "{ variable: true, value: 'self', possessive: true }" }],
|
27
28
|
"you": [{ id: 'self', initial: "{ variable: true, value: 'self' }" }],
|
28
29
|
"i": [{ id: 'self', initial: "{ variable: true, value: 'speaker' }" }],
|
29
30
|
},
|
@@ -39,14 +40,14 @@ let configStruct = {
|
|
39
40
|
notes: 'paraphrase: add possession ending for your/my',
|
40
41
|
priority: -1,
|
41
42
|
where: where(),
|
42
|
-
match: ({context}) => !context.isResponse && context.possessive && ['self', 'other'].includes(context.value),
|
43
|
+
match: ({context}) => !(context.isResponse || context.audience == 'other' || context.responding) && context.possessive && ['self', 'other'].includes(context.value),
|
43
44
|
apply: ({context, g}) => { return { "self": "your", "other": "my" }[context.value] },
|
44
45
|
},
|
45
46
|
{
|
46
47
|
notes: 'not paraphrase: add possession ending for your/my',
|
47
48
|
priority: -1,
|
48
49
|
where: where(),
|
49
|
-
match: ({context}) => context.isResponse && context.possessive && ['self', 'other'].includes(context.value),
|
50
|
+
match: ({context}) => (context.isResponse || context.audience == 'other' || context.responding) && context.possessive && ['self', 'other'].includes(context.value),
|
50
51
|
apply: ({context, g}) => { return { "self": "my", "other": "your" }[context.value] },
|
51
52
|
},
|
52
53
|
],
|
package/common/crew.test.json
CHANGED
@@ -2413,7 +2413,7 @@
|
|
2413
2413
|
],
|
2414
2414
|
"generatedParenthesized": [
|
2415
2415
|
"",
|
2416
|
-
"(((status) is ((not armed))))"
|
2416
|
+
"((((the (status)) of (the (phasers))) is ((not armed))))"
|
2417
2417
|
],
|
2418
2418
|
"metadata": {
|
2419
2419
|
"opChoices": [
|
@@ -4171,12 +4171,12 @@
|
|
4171
4171
|
},
|
4172
4172
|
"word": "is"
|
4173
4173
|
},
|
4174
|
-
"generatedParenthesized": "(((status) is ((not armed))))",
|
4174
|
+
"generatedParenthesized": "((((the (status)) of (the (phasers))) is ((not armed))))",
|
4175
4175
|
"paraphrases": "what is the status of the phasers?",
|
4176
4176
|
"paraphrasesParenthesized": "(((what) is ((the (status)) of (the (phasers))))?)",
|
4177
4177
|
"responses": [
|
4178
4178
|
"",
|
4179
|
-
"status is not armed"
|
4179
|
+
"the status of the phasers is not armed"
|
4180
4180
|
]
|
4181
4181
|
},
|
4182
4182
|
{
|
@@ -4232,7 +4232,7 @@
|
|
4232
4232
|
"paraphrasesParenthesized": "(disarm (the (phasers)))",
|
4233
4233
|
"responses": [
|
4234
4234
|
"",
|
4235
|
-
"status is not armed"
|
4235
|
+
"the status of the phasers is not armed"
|
4236
4236
|
]
|
4237
4237
|
},
|
4238
4238
|
{
|
@@ -4771,7 +4771,7 @@
|
|
4771
4771
|
"query": "disarm the phasers what is the status of the phasers",
|
4772
4772
|
"responses": [
|
4773
4773
|
"",
|
4774
|
-
"status is not armed"
|
4774
|
+
"the status of the phasers is not armed"
|
4775
4775
|
]
|
4776
4776
|
},
|
4777
4777
|
{
|
@@ -9922,7 +9922,7 @@
|
|
9922
9922
|
],
|
9923
9923
|
"generatedParenthesized": [
|
9924
9924
|
"",
|
9925
|
-
"(((status) is ((armed))))"
|
9925
|
+
"((((the (status)) of (the (photon) (torpedoes))) is ((armed))))"
|
9926
9926
|
],
|
9927
9927
|
"metadata": {
|
9928
9928
|
"opChoices": [
|
@@ -11864,11 +11864,11 @@
|
|
11864
11864
|
},
|
11865
11865
|
"word": "is"
|
11866
11866
|
},
|
11867
|
-
"generatedParenthesized": "(((status) is ((armed))))",
|
11867
|
+
"generatedParenthesized": "((((the (status)) of (the (photon) (torpedoes))) is ((armed))))",
|
11868
11868
|
"paraphrases": "what is the status of the photon torpedoes?",
|
11869
11869
|
"paraphrasesParenthesized": "(((what) is ((the (status)) of (the (photon) (torpedoes))))?)",
|
11870
11870
|
"responses": [
|
11871
|
-
"status is armed"
|
11871
|
+
"the status of the photon torpedoes is armed"
|
11872
11872
|
]
|
11873
11873
|
},
|
11874
11874
|
{
|
@@ -12583,7 +12583,7 @@
|
|
12583
12583
|
"query": "the status of the photon torpedoes is armed\\nwhat is the status of the photon torpedoes",
|
12584
12584
|
"responses": [
|
12585
12585
|
"",
|
12586
|
-
"status is armed"
|
12586
|
+
"the status of the photon torpedoes is armed"
|
12587
12587
|
]
|
12588
12588
|
},
|
12589
12589
|
{
|
@@ -13048,7 +13048,7 @@
|
|
13048
13048
|
}
|
13049
13049
|
],
|
13050
13050
|
"generatedParenthesized": [
|
13051
|
-
"(((types) are (((captains), (seconds) and (doctors)))))"
|
13051
|
+
"((((the (types)) of (rank)) are (((captains), (seconds) and (doctors)))))"
|
13052
13052
|
],
|
13053
13053
|
"metadata": {
|
13054
13054
|
"opChoices": [
|
@@ -14586,11 +14586,11 @@
|
|
14586
14586
|
},
|
14587
14587
|
"word": "are"
|
14588
14588
|
},
|
14589
|
-
"generatedParenthesized": "(((types) are (((captains), (seconds) and (doctors)))))",
|
14589
|
+
"generatedParenthesized": "((((the (types)) of (rank)) are (((captains), (seconds) and (doctors)))))",
|
14590
14590
|
"paraphrases": "what are the types of rank?",
|
14591
14591
|
"paraphrasesParenthesized": "(((what) are ((the (types)) of (rank)))?)",
|
14592
14592
|
"responses": [
|
14593
|
-
"types are captains, seconds and doctors"
|
14593
|
+
"the types of rank are captains, seconds and doctors"
|
14594
14594
|
]
|
14595
14595
|
},
|
14596
14596
|
{
|
@@ -15186,7 +15186,7 @@
|
|
15186
15186
|
],
|
15187
15187
|
"query": "what are the types of rank",
|
15188
15188
|
"responses": [
|
15189
|
-
"types are captains, seconds and doctors"
|
15189
|
+
"the types of rank are captains, seconds and doctors"
|
15190
15190
|
]
|
15191
15191
|
},
|
15192
15192
|
{
|
@@ -15566,7 +15566,7 @@
|
|
15566
15566
|
}
|
15567
15567
|
],
|
15568
15568
|
"generatedParenthesized": [
|
15569
|
-
"((((spock) (name)) is ((spock))))"
|
15569
|
+
"(((((spock)'s) (name)) is ((spock))))"
|
15570
15570
|
],
|
15571
15571
|
"metadata": {
|
15572
15572
|
"opChoices": [
|
@@ -17008,11 +17008,11 @@
|
|
17008
17008
|
},
|
17009
17009
|
"word": "is"
|
17010
17010
|
},
|
17011
|
-
"generatedParenthesized": "((((spock) (name)) is ((spock))))",
|
17011
|
+
"generatedParenthesized": "(((((spock)'s) (name)) is ((spock))))",
|
17012
17012
|
"paraphrases": "what is spock's name?",
|
17013
17013
|
"paraphrasesParenthesized": "(((what) is (((spock)'s) (name)))?)",
|
17014
17014
|
"responses": [
|
17015
|
-
"spock name is spock"
|
17015
|
+
"spock's name is spock"
|
17016
17016
|
]
|
17017
17017
|
},
|
17018
17018
|
{
|
@@ -17608,7 +17608,7 @@
|
|
17608
17608
|
],
|
17609
17609
|
"query": "what is spock's name",
|
17610
17610
|
"responses": [
|
17611
|
-
"spock name is spock"
|
17611
|
+
"spock's name is spock"
|
17612
17612
|
]
|
17613
17613
|
},
|
17614
17614
|
{
|
@@ -17988,7 +17988,7 @@
|
|
17988
17988
|
}
|
17989
17989
|
],
|
17990
17990
|
"generatedParenthesized": [
|
17991
|
-
"((((spock) (rank)) is ((second))))"
|
17991
|
+
"(((((spock)'s) (rank)) is ((second))))"
|
17992
17992
|
],
|
17993
17993
|
"metadata": {
|
17994
17994
|
"opChoices": [
|
@@ -19430,11 +19430,11 @@
|
|
19430
19430
|
},
|
19431
19431
|
"word": "is"
|
19432
19432
|
},
|
19433
|
-
"generatedParenthesized": "((((spock) (rank)) is ((second))))",
|
19433
|
+
"generatedParenthesized": "(((((spock)'s) (rank)) is ((second))))",
|
19434
19434
|
"paraphrases": "what is spock's rank?",
|
19435
19435
|
"paraphrasesParenthesized": "(((what) is (((spock)'s) (rank)))?)",
|
19436
19436
|
"responses": [
|
19437
|
-
"spock rank is second"
|
19437
|
+
"spock's rank is second"
|
19438
19438
|
]
|
19439
19439
|
},
|
19440
19440
|
{
|
@@ -20030,7 +20030,7 @@
|
|
20030
20030
|
],
|
20031
20031
|
"query": "what is spock's rank",
|
20032
20032
|
"responses": [
|
20033
|
-
"spock rank is second"
|
20033
|
+
"spock's rank is second"
|
20034
20034
|
]
|
20035
20035
|
},
|
20036
20036
|
{
|
@@ -20453,7 +20453,7 @@
|
|
20453
20453
|
}
|
20454
20454
|
],
|
20455
20455
|
"generatedParenthesized": [
|
20456
|
-
"((((spock) (rank)) is ((second))))"
|
20456
|
+
"(((((spock)'s) (rank)) is ((second))))"
|
20457
20457
|
],
|
20458
20458
|
"metadata": {
|
20459
20459
|
"opChoices": [
|
@@ -21939,11 +21939,11 @@
|
|
21939
21939
|
],
|
21940
21940
|
"word": "is"
|
21941
21941
|
},
|
21942
|
-
"generatedParenthesized": "((((spock) (rank)) is ((second))))",
|
21942
|
+
"generatedParenthesized": "(((((spock)'s) (rank)) is ((second))))",
|
21943
21943
|
"paraphrases": "what is spock's rank?",
|
21944
21944
|
"paraphrasesParenthesized": "(((what) is (((spock)'s) (rank)))?)",
|
21945
21945
|
"responses": [
|
21946
|
-
"spock rank is second"
|
21946
|
+
"spock's rank is second"
|
21947
21947
|
]
|
21948
21948
|
},
|
21949
21949
|
{
|
@@ -22539,7 +22539,7 @@
|
|
22539
22539
|
],
|
22540
22540
|
"query": "what is spock's rank?",
|
22541
22541
|
"responses": [
|
22542
|
-
"spock rank is second"
|
22542
|
+
"spock's rank is second"
|
22543
22543
|
]
|
22544
22544
|
},
|
22545
22545
|
{
|
@@ -23004,7 +23004,7 @@
|
|
23004
23004
|
}
|
23005
23005
|
],
|
23006
23006
|
"generatedParenthesized": [
|
23007
|
-
"(((name) is ((jim))))"
|
23007
|
+
"((((the (name)) of (kirk)) is ((jim))))"
|
23008
23008
|
],
|
23009
23009
|
"metadata": {
|
23010
23010
|
"opChoices": [
|
@@ -24530,11 +24530,11 @@
|
|
24530
24530
|
},
|
24531
24531
|
"word": "is"
|
24532
24532
|
},
|
24533
|
-
"generatedParenthesized": "(((name) is ((jim))))",
|
24533
|
+
"generatedParenthesized": "((((the (name)) of (kirk)) is ((jim))))",
|
24534
24534
|
"paraphrases": "what is the name of kirk?",
|
24535
24535
|
"paraphrasesParenthesized": "(((what) is ((the (name)) of (kirk)))?)",
|
24536
24536
|
"responses": [
|
24537
|
-
"name is jim"
|
24537
|
+
"the name of kirk is jim"
|
24538
24538
|
]
|
24539
24539
|
},
|
24540
24540
|
{
|
@@ -25130,7 +25130,7 @@
|
|
25130
25130
|
],
|
25131
25131
|
"query": "what is the name of kirk",
|
25132
25132
|
"responses": [
|
25133
|
-
"name is jim"
|
25133
|
+
"the name of kirk is jim"
|
25134
25134
|
]
|
25135
25135
|
},
|
25136
25136
|
{
|
@@ -25595,7 +25595,7 @@
|
|
25595
25595
|
}
|
25596
25596
|
],
|
25597
25597
|
"generatedParenthesized": [
|
25598
|
-
"(((rank) is ((second))))"
|
25598
|
+
"((((the (rank)) of (spock)) is ((second))))"
|
25599
25599
|
],
|
25600
25600
|
"metadata": {
|
25601
25601
|
"opChoices": [
|
@@ -27121,11 +27121,11 @@
|
|
27121
27121
|
},
|
27122
27122
|
"word": "is"
|
27123
27123
|
},
|
27124
|
-
"generatedParenthesized": "(((rank) is ((second))))",
|
27124
|
+
"generatedParenthesized": "((((the (rank)) of (spock)) is ((second))))",
|
27125
27125
|
"paraphrases": "what is the rank of spock?",
|
27126
27126
|
"paraphrasesParenthesized": "(((what) is ((the (rank)) of (spock)))?)",
|
27127
27127
|
"responses": [
|
27128
|
-
"rank is second"
|
27128
|
+
"the rank of spock is second"
|
27129
27129
|
]
|
27130
27130
|
},
|
27131
27131
|
{
|
@@ -27721,7 +27721,7 @@
|
|
27721
27721
|
],
|
27722
27722
|
"query": "what is the rank of spock",
|
27723
27723
|
"responses": [
|
27724
|
-
"rank is second"
|
27724
|
+
"the rank of spock is second"
|
27725
27725
|
]
|
27726
27726
|
},
|
27727
27727
|
{
|
@@ -28222,7 +28222,7 @@
|
|
28222
28222
|
}
|
28223
28223
|
],
|
28224
28224
|
"generatedParenthesized": [
|
28225
|
-
"(((status) is ((armed))))"
|
28225
|
+
"((((the (status)) of (the (phasers))) is ((armed))))"
|
28226
28226
|
],
|
28227
28227
|
"metadata": {
|
28228
28228
|
"opChoices": [
|
@@ -29825,11 +29825,11 @@
|
|
29825
29825
|
},
|
29826
29826
|
"word": "is"
|
29827
29827
|
},
|
29828
|
-
"generatedParenthesized": "(((status) is ((armed))))",
|
29828
|
+
"generatedParenthesized": "((((the (status)) of (the (phasers))) is ((armed))))",
|
29829
29829
|
"paraphrases": "what is the status of the phasers?",
|
29830
29830
|
"paraphrasesParenthesized": "(((what) is ((the (status)) of (the (phasers))))?)",
|
29831
29831
|
"responses": [
|
29832
|
-
"status is armed"
|
29832
|
+
"the status of the phasers is armed"
|
29833
29833
|
]
|
29834
29834
|
},
|
29835
29835
|
{
|
@@ -30425,7 +30425,7 @@
|
|
30425
30425
|
],
|
30426
30426
|
"query": "what is the status of the phasers",
|
30427
30427
|
"responses": [
|
30428
|
-
"status is armed"
|
30428
|
+
"the status of the phasers is armed"
|
30429
30429
|
]
|
30430
30430
|
},
|
30431
30431
|
{
|
@@ -31023,7 +31023,7 @@
|
|
31023
31023
|
}
|
31024
31024
|
],
|
31025
31025
|
"generatedParenthesized": [
|
31026
|
-
"(((status) is ((armed))))"
|
31026
|
+
"((((the (status)) of (the (photon) (torpedoes))) is ((armed))))"
|
31027
31027
|
],
|
31028
31028
|
"metadata": {
|
31029
31029
|
"opChoices": [
|
@@ -32723,11 +32723,11 @@
|
|
32723
32723
|
},
|
32724
32724
|
"word": "is"
|
32725
32725
|
},
|
32726
|
-
"generatedParenthesized": "(((status) is ((armed))))",
|
32726
|
+
"generatedParenthesized": "((((the (status)) of (the (photon) (torpedoes))) is ((armed))))",
|
32727
32727
|
"paraphrases": "what is the status of the photon torpedoes?",
|
32728
32728
|
"paraphrasesParenthesized": "(((what) is ((the (status)) of (the (photon) (torpedoes))))?)",
|
32729
32729
|
"responses": [
|
32730
|
-
"status is armed"
|
32730
|
+
"the status of the photon torpedoes is armed"
|
32731
32731
|
]
|
32732
32732
|
},
|
32733
32733
|
{
|
@@ -33323,7 +33323,7 @@
|
|
33323
33323
|
],
|
33324
33324
|
"query": "what is the status of the photon torpedoes",
|
33325
33325
|
"responses": [
|
33326
|
-
"status is armed"
|
33326
|
+
"the status of the photon torpedoes is armed"
|
33327
33327
|
]
|
33328
33328
|
},
|
33329
33329
|
{
|
@@ -33594,7 +33594,7 @@
|
|
33594
33594
|
}
|
33595
33595
|
],
|
33596
33596
|
"generatedParenthesized": [
|
33597
|
-
"(((
|
33597
|
+
"(((the (crew) (members)) are (((kirk), (spock) and (mccoy)))))"
|
33598
33598
|
],
|
33599
33599
|
"metadata": {
|
33600
33600
|
"opChoices": [
|
@@ -34941,11 +34941,11 @@
|
|
34941
34941
|
},
|
34942
34942
|
"word": "are"
|
34943
34943
|
},
|
34944
|
-
"generatedParenthesized": "(((
|
34944
|
+
"generatedParenthesized": "(((the (crew) (members)) are (((kirk), (spock) and (mccoy)))))",
|
34945
34945
|
"paraphrases": "who are the crew members?",
|
34946
34946
|
"paraphrasesParenthesized": "(((who) are (the (crew) (members)))?)",
|
34947
34947
|
"responses": [
|
34948
|
-
"
|
34948
|
+
"the crew members are kirk, spock and mccoy"
|
34949
34949
|
]
|
34950
34950
|
},
|
34951
34951
|
{
|
@@ -35541,7 +35541,7 @@
|
|
35541
35541
|
],
|
35542
35542
|
"query": "who are the crew members",
|
35543
35543
|
"responses": [
|
35544
|
-
"
|
35544
|
+
"the crew members are kirk, spock and mccoy"
|
35545
35545
|
]
|
35546
35546
|
}
|
35547
35547
|
]
|
package/common/dialogues.js
CHANGED
@@ -490,7 +490,7 @@ let configStruct = {
|
|
490
490
|
where: where(),
|
491
491
|
notes: 'x is y (not a response)',
|
492
492
|
match: ({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && !context.evalue,
|
493
|
-
apply: ({context, g, gp, callId}) => {
|
493
|
+
apply: ({context, g, gp, gr, callId}) => {
|
494
494
|
if ((context.two.evalue || {}).marker == 'answerNotKnown') {
|
495
495
|
return g(context.two.evalue)
|
496
496
|
}
|
@@ -523,7 +523,13 @@ let configStruct = {
|
|
523
523
|
if (focus == 'one') {
|
524
524
|
return `${g(context.two)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${gp(context.one)}`
|
525
525
|
} else {
|
526
|
-
|
526
|
+
// TODO fix this using the assumed and that whole mess. change isResponse to useValue
|
527
|
+
if (context.isResponse) {
|
528
|
+
return `${gp(context.one, { responding: true })} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${g(context.two)}`
|
529
|
+
} else {
|
530
|
+
return `${gp(context.one)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${gr(context.two)}`
|
531
|
+
}
|
532
|
+
// return `${gp(context.one)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${g(context.two)}`
|
527
533
|
}
|
528
534
|
// return `${g({...context.one})} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${g(context.two)}`
|
529
535
|
},
|
package/common/dimension.js
CHANGED
@@ -85,7 +85,7 @@ let configStruct = {
|
|
85
85
|
isA: [],
|
86
86
|
generatorpr: {
|
87
87
|
match: ({context}) => context.amount,
|
88
|
-
apply: ({context, g, gp}) => `${
|
88
|
+
apply: ({context, g, gp, gr}) => `${gr(context.amount)} ${gp(context.unit)}`,
|
89
89
|
},
|
90
90
|
},
|
91
91
|
{ id: "length", isA: ['dimension'], development: true },
|
@@ -134,7 +134,7 @@ let configStruct = {
|
|
134
134
|
efrom = e(from).evalue
|
135
135
|
}
|
136
136
|
if (to.value == efrom.unit.value) {
|
137
|
-
evalue = efrom
|
137
|
+
evalue = efrom.amount
|
138
138
|
} else {
|
139
139
|
const formula = kms.formulas.api.get(to, [efrom.unit])
|
140
140
|
if (!formula) {
|