tpmkms_4wp 7.12.8 → 8.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/common/animals.instance.json +89 -293
  2. package/common/animals.js +1 -1
  3. package/common/avatar.js +7 -5
  4. package/common/characters.js +12 -5
  5. package/common/crew.instance.json +289 -577
  6. package/common/crew.js +1 -1
  7. package/common/currency.js +0 -2
  8. package/common/dialogues.js +122 -17
  9. package/common/dimension.instance.json +747 -73
  10. package/common/dimension.js +15 -7
  11. package/common/edible.instance.json +243 -435
  12. package/common/edible.js +1 -1
  13. package/common/emotions.instance.json +29 -65
  14. package/common/emotions.js +1 -1
  15. package/common/fastfood.instance.json +1080 -2072
  16. package/common/fastfood.js +1 -1
  17. package/common/formulas.instance.json +992 -0
  18. package/common/formulas.js +19 -6
  19. package/common/formulas.test.json +1187 -3651
  20. package/common/gdefaults.js +2 -0
  21. package/common/help.js +7 -2
  22. package/common/help.test.json +9 -5
  23. package/common/helpers.js +5 -0
  24. package/common/javascript.js +8 -6
  25. package/common/kirk.instance.json +1 -1
  26. package/common/kirk.js +1 -1
  27. package/common/length.instance.json +316 -740
  28. package/common/length.js +1 -1
  29. package/common/math.instance.json +1959 -1
  30. package/common/math.js +17 -5
  31. package/common/meta.instance.json +1 -1
  32. package/common/meta.js +35 -10
  33. package/common/numbers.js +28 -24
  34. package/common/ordering.instance.json +37 -153
  35. package/common/ordering.js +1 -1
  36. package/common/people.instance.json +50 -78
  37. package/common/people.js +1 -1
  38. package/common/pipboy.instance.json +23431 -1082
  39. package/common/pipboy.js +31 -4
  40. package/common/pipboy.test.json +13 -9
  41. package/common/pokemon.instance.json +41 -141
  42. package/common/pokemon.js +1 -1
  43. package/common/pressure.instance.json +93 -33
  44. package/common/pressure.js +1 -1
  45. package/common/properties.instance.json +21 -49
  46. package/common/properties.js +13 -8
  47. package/common/reports.instance.json +23 -63
  48. package/common/reports.js +9 -7
  49. package/common/scorekeeper.instance.json +1 -1
  50. package/common/scorekeeper.js +9 -7
  51. package/common/spock.instance.json +1 -1
  52. package/common/spock.js +1 -1
  53. package/common/tell.js +4 -2
  54. package/common/temperature.instance.json +97 -193
  55. package/common/temperature.js +1 -1
  56. package/common/time.js +36 -20
  57. package/common/time.test.json +66 -44
  58. package/common/tokenize.js +46 -0
  59. package/common/ui.instance.json +9 -1
  60. package/common/weight.instance.json +273 -217
  61. package/common/weight.js +1 -1
  62. package/main.js +4 -8
  63. package/package.json +6 -18
  64. package/common/dimensionTemplate.instance.json +0 -582
  65. package/common/dimensionTemplate.js +0 -35
  66. package/common/formulasTemplate.instance.json +0 -483
  67. package/common/formulasTemplate.js +0 -30
  68. package/common/formulasTemplate.test.json +0 -2
  69. package/common/mathTemplate.instance.json +0 -1635
  70. package/common/mathTemplate.js +0 -32
  71. package/common/mathTemplate.test.json +0 -1422
  72. package/common/pipboyTemplate.instance.json +0 -17420
  73. package/common/pipboyTemplate.js +0 -48
  74. package/common/pipboyTemplate.test.json +0 -2
  75. /package/common/{dimensionTemplate.test.json → tokenize.test.json} +0 -0
package/common/pipboy.js CHANGED
@@ -1,11 +1,12 @@
1
1
  const { Config, knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
- const base_km = require('./pipboyTemplate')
3
+ const hierarchy = require('./hierarchy')
4
4
  const countable = require('./countable')
5
5
  const math = require('./math')
6
6
  const comparable = require('./comparable')
7
7
  const help = require('./help')
8
8
  const pipboy_tests = require('./pipboy.test.json')
9
+ const instance = require('./pipboy.instance.json')
9
10
 
10
11
  // start/stop listening
11
12
  class API {
@@ -501,11 +502,36 @@ addWeapon('pistol')
501
502
  addWeapon('rifle')
502
503
  */
503
504
 
505
+ const template = {
506
+ configs: [
507
+ "pistols rifles grenades mines and shotguns are weapons",
508
+ "mines and grenades are explosives",
509
+ "explosives are weapons",
510
+ "pistols rifles and shotguns are firearms",
511
+ "firearms are weapons",
512
+ "hats armor and suits are clothes",
513
+ // "a rifle is a weapon",
514
+ //"a weapon is equipable and changeable"
515
+ "a weapon is equipable",
516
+ "clothes are wearable",
517
+ // "weapons are countable", TODO fix this
518
+ "edible is a concept",
519
+ "food is edible",
520
+ "drinks are drinkable",
521
+ "meat is food",
522
+ "vegetables and fruit are food",
523
+ "cola and pop are drinks",
524
+ "medicine and stimpaks are takeable",
525
+ "item modifies properties",
526
+ "damage luck hp rads value ap charisma range and accuracy are item properties",
527
+ configStruct,
528
+ ]
529
+ }
530
+
504
531
  const createConfig = () => {
505
- const config = new Config(configStruct, module)
532
+ const config = new Config({ name: 'pipboy' }, module)
506
533
  config.stop_auto_rebuild()
507
- //console.log('base_km.config.hierarchy', JSON.stringify(base_km.config.hierarchy, null, 2))
508
- config.add(base_km(), countable(), comparable(), help(), math())
534
+ config.add(hierarchy(), countable(), comparable(), help(), math())
509
535
  // console.log('config.config.hierarchy', JSON.stringify(config.config.hierarchy, null, 2))
510
536
  // console.log('config.hierarchy', config.hierarchy)
511
537
  config.api = api
@@ -517,6 +543,7 @@ knowledgeModule({
517
543
  module,
518
544
  description: 'Control a pipboy with speech',
519
545
  createConfig,
546
+ template: { template, instance },
520
547
  test: {
521
548
  name: './pipboy.test.json',
522
549
  contents: pipboy_tests,
@@ -24514,7 +24514,6 @@
24514
24514
  "help": "help2",
24515
24515
  "hierarchy": "hierarchy2",
24516
24516
  "math": "math2",
24517
- "mathTemplate": "mathTemplate2",
24518
24517
  "meta": "meta2",
24519
24518
  "numbers": "numbers2",
24520
24519
  "pipboy": "pipboy1",
@@ -24550,8 +24549,6 @@
24550
24549
  },
24551
24550
  "math2": {
24552
24551
  },
24553
- "mathTemplate2": {
24554
- },
24555
24552
  "meta2": {
24556
24553
  },
24557
24554
  "numbers2": {
@@ -24646,7 +24643,8 @@
24646
24643
  "whose"
24647
24644
  ],
24648
24645
  "preposition": [
24649
- "between"
24646
+ "between",
24647
+ "to"
24650
24648
  ],
24651
24649
  "pronoun": [
24652
24650
  "it",
@@ -24743,13 +24741,14 @@
24743
24741
  "whatAble",
24744
24742
  "is",
24745
24743
  "toAble",
24744
+ "to",
24746
24745
  "noun",
24747
24746
  "thisitthat",
24748
24747
  "reason",
24749
24748
  "that",
24749
+ "number",
24750
24750
  "orAble",
24751
24751
  "ifAble",
24752
- "number",
24753
24752
  "*",
24754
24753
  "mathematical_operator",
24755
24754
  "+",
@@ -24966,6 +24965,9 @@
24966
24965
  "thisitthat": [
24967
24966
  "queryable"
24968
24967
  ],
24968
+ "to": [
24969
+ "preposition"
24970
+ ],
24969
24971
  "unknown": [
24970
24972
  "hierarchyAble",
24971
24973
  "object",
@@ -25136,6 +25138,8 @@
25136
25138
  },
25137
25139
  "thisitthat": {
25138
25140
  },
25141
+ "to": {
25142
+ },
25139
25143
  "toAble": {
25140
25144
  },
25141
25145
  "unknown": {
@@ -25234,8 +25238,8 @@
25234
25238
  "word": "apply"
25235
25239
  },
25236
25240
  "generatedParenthesized": "",
25237
- "paraphrases": "apply four stimpacks",
25238
- "paraphrasesParenthesized": "(apply ((four) (stimpacks)))",
25241
+ "paraphrases": "apply 4 stimpacks",
25242
+ "paraphrasesParenthesized": "(apply ((4) (stimpacks)))",
25239
25243
  "responses": [
25240
25244
  ""
25241
25245
  ]
@@ -25758,10 +25762,10 @@
25758
25762
  ]
25759
25763
  },
25760
25764
  "paraphrases": [
25761
- "apply four stimpacks"
25765
+ "apply 4 stimpacks"
25762
25766
  ],
25763
25767
  "paraphrasesParenthesized": [
25764
- "(apply ((four) (stimpacks)))"
25768
+ "(apply ((4) (stimpacks)))"
25765
25769
  ],
25766
25770
  "query": "apply four stimpacks",
25767
25771
  "responses": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "queries": [
2
+ "configs": [
3
3
  "pokemon modifies type",
4
4
  "pokemon type is a type",
5
5
  "pikachu squirtle weedle and pidgeot are pokemon",
@@ -324,15 +324,15 @@
324
324
  "dead": true,
325
325
  "modifiers": [
326
326
  {
327
+ "value": "pokemon",
328
+ "unknown": true,
329
+ "text": "pokemon",
327
330
  "marker": "unknown",
331
+ "word": "pokemon",
328
332
  "range": {
329
333
  "start": 0,
330
334
  "end": 6
331
335
  },
332
- "word": "pokemon",
333
- "text": "pokemon",
334
- "value": "pokemon",
335
- "unknown": true,
336
336
  "dead": true,
337
337
  "level": 1
338
338
  }
@@ -1644,54 +1644,54 @@
1644
1644
  "listable": true,
1645
1645
  "value": [
1646
1646
  {
1647
+ "value": "pikachu",
1648
+ "unknown": true,
1649
+ "text": "pikachu",
1647
1650
  "marker": "unknown",
1651
+ "word": "pikachu",
1648
1652
  "range": {
1649
1653
  "start": 0,
1650
1654
  "end": 6
1651
1655
  },
1652
- "word": "pikachu",
1653
- "text": "pikachu",
1654
- "value": "pikachu",
1655
- "unknown": true,
1656
1656
  "dead": true,
1657
1657
  "level": 1
1658
1658
  },
1659
1659
  {
1660
+ "value": "squirtle",
1661
+ "unknown": true,
1662
+ "text": "squirtle",
1660
1663
  "marker": "unknown",
1664
+ "word": "squirtle",
1661
1665
  "range": {
1662
1666
  "start": 8,
1663
1667
  "end": 15
1664
1668
  },
1665
- "word": "squirtle",
1666
- "text": "squirtle",
1667
- "value": "squirtle",
1668
- "unknown": true,
1669
1669
  "dead": true,
1670
1670
  "level": 1
1671
1671
  },
1672
1672
  {
1673
+ "value": "weedle",
1674
+ "unknown": true,
1675
+ "text": "weedle",
1673
1676
  "marker": "unknown",
1677
+ "word": "weedle",
1674
1678
  "range": {
1675
1679
  "start": 17,
1676
1680
  "end": 22
1677
1681
  },
1678
- "word": "weedle",
1679
- "text": "weedle",
1680
- "value": "weedle",
1681
- "unknown": true,
1682
1682
  "dead": true,
1683
1683
  "level": 2
1684
1684
  },
1685
1685
  {
1686
+ "value": "pidgeot",
1687
+ "unknown": true,
1688
+ "text": "pidgeot",
1686
1689
  "marker": "unknown",
1690
+ "word": "pidgeot",
1687
1691
  "range": {
1688
1692
  "start": 28,
1689
1693
  "end": 34
1690
1694
  },
1691
- "word": "pidgeot",
1692
- "text": "pidgeot",
1693
- "value": "pidgeot",
1694
- "unknown": true,
1695
1695
  "dead": true,
1696
1696
  "level": 2
1697
1697
  }
@@ -1783,28 +1783,6 @@
1783
1783
  1
1784
1784
  ]
1785
1785
  ],
1786
- [
1787
- [
1788
- "is",
1789
- 0
1790
- ],
1791
- [
1792
- "list",
1793
- 0
1794
- ],
1795
- [
1796
- "pokemon",
1797
- 0
1798
- ],
1799
- [
1800
- "unknown",
1801
- 0
1802
- ],
1803
- [
1804
- "unknown",
1805
- 1
1806
- ]
1807
- ],
1808
1786
  [
1809
1787
  [
1810
1788
  "is",
@@ -1864,16 +1842,6 @@
1864
1842
  "unknown",
1865
1843
  1
1866
1844
  ]
1867
- ],
1868
- [
1869
- [
1870
- "pokemon",
1871
- 0
1872
- ],
1873
- [
1874
- "unknown",
1875
- 0
1876
- ]
1877
1845
  ]
1878
1846
  ],
1879
1847
  "learned_contextual_priorities": [],
@@ -2435,15 +2403,15 @@
2435
2403
  "dead": true,
2436
2404
  "modifiers": [
2437
2405
  {
2406
+ "value": "fire",
2407
+ "unknown": true,
2408
+ "text": "fire",
2438
2409
  "marker": "unknown",
2410
+ "word": "fire",
2439
2411
  "range": {
2440
2412
  "start": 0,
2441
2413
  "end": 3
2442
2414
  },
2443
- "word": "fire",
2444
- "text": "fire",
2445
- "value": "fire",
2446
- "unknown": true,
2447
2415
  "dead": true,
2448
2416
  "level": 1
2449
2417
  }
@@ -3150,15 +3118,15 @@
3150
3118
  "dead": true,
3151
3119
  "modifiers": [
3152
3120
  {
3121
+ "value": "water",
3122
+ "unknown": true,
3123
+ "text": "water",
3153
3124
  "marker": "unknown",
3125
+ "word": "water",
3154
3126
  "range": {
3155
3127
  "start": 0,
3156
3128
  "end": 4
3157
3129
  },
3158
- "word": "water",
3159
- "text": "water",
3160
- "value": "water",
3161
- "unknown": true,
3162
3130
  "dead": true,
3163
3131
  "level": 1
3164
3132
  }
@@ -3937,15 +3905,15 @@
3937
3905
  "dead": true,
3938
3906
  "modifiers": [
3939
3907
  {
3908
+ "value": "earth",
3909
+ "unknown": true,
3910
+ "text": "earth",
3940
3911
  "marker": "unknown",
3912
+ "word": "earth",
3941
3913
  "range": {
3942
3914
  "start": 0,
3943
3915
  "end": 4
3944
3916
  },
3945
- "word": "earth",
3946
- "text": "earth",
3947
- "value": "earth",
3948
- "unknown": true,
3949
3917
  "dead": true,
3950
3918
  "level": 1
3951
3919
  }
@@ -4796,15 +4764,15 @@
4796
4764
  "dead": true,
4797
4765
  "modifiers": [
4798
4766
  {
4767
+ "value": "electric",
4768
+ "unknown": true,
4769
+ "text": "electric",
4799
4770
  "marker": "unknown",
4771
+ "word": "electric",
4800
4772
  "range": {
4801
4773
  "start": 0,
4802
4774
  "end": 7
4803
4775
  },
4804
- "word": "electric",
4805
- "text": "electric",
4806
- "value": "electric",
4807
- "unknown": true,
4808
4776
  "dead": true,
4809
4777
  "level": 1
4810
4778
  }
@@ -10180,24 +10148,6 @@
10180
10148
  "is",
10181
10149
  0
10182
10150
  ]
10183
- ],
10184
- [
10185
- [
10186
- "electric",
10187
- 0
10188
- ],
10189
- [
10190
- "is",
10191
- 0
10192
- ],
10193
- [
10194
- "pikachu",
10195
- 0
10196
- ],
10197
- [
10198
- "type",
10199
- 0
10200
- ]
10201
10151
  ]
10202
10152
  ],
10203
10153
  "learned_contextual_priorities": [],
@@ -11119,15 +11069,15 @@
11119
11069
  },
11120
11070
  "one": {
11121
11071
  "number": "one",
11072
+ "value": "charmander",
11073
+ "unknown": true,
11074
+ "text": "charmander",
11122
11075
  "marker": "unknown",
11076
+ "word": "charmander",
11123
11077
  "range": {
11124
11078
  "start": 0,
11125
11079
  "end": 24
11126
11080
  },
11127
- "word": "charmander",
11128
- "text": "charmander",
11129
- "value": "charmander",
11130
- "unknown": true,
11131
11081
  "dead": true,
11132
11082
  "types": [
11133
11083
  "unknown"
@@ -11633,24 +11583,6 @@
11633
11583
  1
11634
11584
  ]
11635
11585
  ],
11636
- [
11637
- [
11638
- "electric",
11639
- 0
11640
- ],
11641
- [
11642
- "is",
11643
- 0
11644
- ],
11645
- [
11646
- "pikachu",
11647
- 0
11648
- ],
11649
- [
11650
- "type",
11651
- 0
11652
- ]
11653
- ],
11654
11586
  [
11655
11587
  [
11656
11588
  "is",
@@ -11691,28 +11623,6 @@
11691
11623
  1
11692
11624
  ]
11693
11625
  ],
11694
- [
11695
- [
11696
- "is",
11697
- 0
11698
- ],
11699
- [
11700
- "list",
11701
- 0
11702
- ],
11703
- [
11704
- "pokemon",
11705
- 0
11706
- ],
11707
- [
11708
- "unknown",
11709
- 0
11710
- ],
11711
- [
11712
- "unknown",
11713
- 1
11714
- ]
11715
- ],
11716
11626
  [
11717
11627
  [
11718
11628
  "is",
@@ -11972,16 +11882,6 @@
11972
11882
  "unknown",
11973
11883
  1
11974
11884
  ]
11975
- ],
11976
- [
11977
- [
11978
- "pokemon",
11979
- 0
11980
- ],
11981
- [
11982
- "unknown",
11983
- 0
11984
- ]
11985
11885
  ]
11986
11886
  ],
11987
11887
  "learned_contextual_priorities": []
package/common/pokemon.js CHANGED
@@ -6,7 +6,7 @@ const pokemon_instance = require('./pokemon.instance.json')
6
6
  const pluralize = require('pluralize')
7
7
 
8
8
  const template = {
9
- queries: [
9
+ configs: [
10
10
  "pokemon modifies type",
11
11
  "pokemon type is a type",
12
12
  "pikachu squirtle weedle and pidgeot are pokemon",