tpmkms_4wp 9.1.1 → 9.2.0-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/animals.instance.json +21 -8
- package/common/articles.js +3 -0
- package/common/asking.test.json +193 -72
- package/common/avatar.js +0 -6
- package/common/colors.instance.json +32 -18
- package/common/comparable.instance.json +3 -0
- package/common/comparable.js +6 -0
- package/common/concept.js +1 -1
- package/common/crew.instance.json +4885 -1224
- package/common/crew.js +0 -7
- package/common/crew.test.json +1904 -0
- package/common/dates.instance.json +28562 -0
- package/common/dates.js +152 -0
- package/common/dates.test.json +10239 -0
- package/common/dialogues.js +30 -10
- package/common/dimension.instance.json +3 -2
- package/common/edible.instance.json +1292 -517
- package/common/emotions.instance.json +7 -14
- package/common/emotions.js +4 -5
- package/common/events.js +3 -3
- package/common/events.test.json +107 -36
- package/common/fastfood.instance.json +4649 -13349
- package/common/fastfood.js +2 -1
- package/common/formulas.instance.json +1 -0
- package/common/formulas.js +3 -1
- package/common/formulas.test.json +643 -711
- package/common/gdefaults.js +14 -0
- package/common/helpers/concept.js +7 -2
- package/common/helpers/dialogues.js +4 -1
- package/common/helpers/menus.js +154 -0
- package/common/helpers/properties.js +2 -27
- package/common/helpers.js +57 -0
- package/common/hierarchy.js +4 -3
- package/common/kirk.instance.json +156 -10
- package/common/length.instance.json +17 -2
- package/common/math.instance.json +1 -0
- package/common/menus.instance.json +10097 -0
- package/common/menus.js +261 -0
- package/common/menus.test.json +27226 -0
- package/common/meta.js +3 -3
- package/common/negation.js +5 -0
- package/common/ordering.instance.json +4 -2
- package/common/people.instance.json +96 -8
- package/common/pipboy.instance.json +61 -135
- package/common/pipboy.js +0 -7
- package/common/pokemon.instance.json +15 -2
- package/common/pressure.instance.json +6 -2
- package/common/properties.instance.json +1 -0
- package/common/properties.js +20 -5
- package/common/punctuation.js +3 -0
- package/common/reports.instance.json +6 -3
- package/common/reports.js +12 -3
- package/common/sdefaults.js +28 -3
- package/common/spock.instance.json +156 -10
- package/common/stm.js +2 -1
- package/common/temperature.instance.json +150 -2
- package/common/tester.js +24 -2
- package/common/ui.instance.json +446 -0
- package/common/ui.js +9 -4
- package/common/ui.test.json +6794 -0
- package/common/weight.instance.json +14 -0
- package/common/wp.instance.json +6497 -9
- package/common/wp.js +10 -0
- package/main.js +4 -0
- package/package.json +12 -3
package/common/dates.js
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
|
+
const { defaultContextCheck } = require('./helpers')
|
3
|
+
const dates_tests = require('./dates.test.json')
|
4
|
+
const dates_instance = require('./dates.instance.json')
|
5
|
+
const hierarchy = require('./hierarchy')
|
6
|
+
const ordinals = require('./ordinals')
|
7
|
+
const helpers = require('./helpers')
|
8
|
+
|
9
|
+
/*
|
10
|
+
january 10 1990
|
11
|
+
january 1990
|
12
|
+
january 20th
|
13
|
+
*/
|
14
|
+
const template = {
|
15
|
+
configs: [
|
16
|
+
"setidsuffix _dates",
|
17
|
+
"january, february, march, april, may, june, july, august, september, october, november and december are months",
|
18
|
+
"monday, tuesday, wednesday, thursday, friday, saturday and sunday are days",
|
19
|
+
"ac, bc, bce and ad are eras",
|
20
|
+
// "ac, bc,, bce,, and ad are eras",
|
21
|
+
/*
|
22
|
+
"bc and bce mean the same thing",
|
23
|
+
"ad is a synonym for ce",
|
24
|
+
"bc stands for before christ",
|
25
|
+
"ad synonym for anno domino",
|
26
|
+
"bce stands for before common era",
|
27
|
+
"ce is an abbreviation of common era",
|
28
|
+
"use ce and bce",
|
29
|
+
"use bc and ad",
|
30
|
+
*/
|
31
|
+
{
|
32
|
+
operators: [
|
33
|
+
"([dayNumber_dates|])",
|
34
|
+
"([yearNumber_dates|])",
|
35
|
+
"([monthNumber_dates|])",
|
36
|
+
"([dateSeparator_dates|])",
|
37
|
+
"([era_dates|])",
|
38
|
+
"([date_dates|])",
|
39
|
+
"([dateEra_dates] (date_dates/*) (era_dates/*))",
|
40
|
+
"([monthDayYear_dates] (month_dates/*) (dayNumber_dates/*) (yearNumber_dates/*))",
|
41
|
+
"([monthDayYearWithSlashes_dates] (monthNumber_dates/*) (dateSeparator_dates/*) (dayNumber_dates/*) (dateSeparator_dates/*) (yearNumber_dates/*))",
|
42
|
+
],
|
43
|
+
bridges: [
|
44
|
+
{
|
45
|
+
id: 'era_dates',
|
46
|
+
words: ['era'],
|
47
|
+
bridge: "{ ...next(operator) }"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
id: 'date_dates',
|
51
|
+
words: ['date'],
|
52
|
+
bridge: "{ ...next(operator) }"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
id: 'dateEra_dates',
|
56
|
+
isA: ['date_dates'],
|
57
|
+
convolution: true,
|
58
|
+
bridge: "{ ...next(after[0]), era: after[1], interpolate: concat(after[0].interpolate, ' ${era}') }"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
id: 'dateSeparator_dates',
|
62
|
+
words: ['/'],
|
63
|
+
bridge: "{ ...next(operator) }"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
id: 'monthDayYearWithSlashes_dates',
|
67
|
+
isA: ['date_dates'],
|
68
|
+
convolution: true,
|
69
|
+
bridge: "{ ...next(operator), day: after[2], month: after[0], year: after[4], interpolate: '${month}/${day}/${year}' }",
|
70
|
+
},
|
71
|
+
{
|
72
|
+
id: 'dayNumber_dates',
|
73
|
+
isA: ['integer'],
|
74
|
+
associations: ['dates'],
|
75
|
+
bridge: "{ ...next(operator) }"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
id: 'monthNumber_dates',
|
79
|
+
isA: ['integer'],
|
80
|
+
bridge: "{ ...next(operator) }"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
id: 'yearNumber_dates',
|
84
|
+
isA: ['integer'],
|
85
|
+
bridge: "{ ...next(operator) }"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
id: 'monthDayYear_dates',
|
89
|
+
convolution: true,
|
90
|
+
isA: ['date_dates'],
|
91
|
+
localHierarchy: [
|
92
|
+
['ordinal', 'dayNumber_dates'],
|
93
|
+
],
|
94
|
+
bridge: "{ ...next(operator), month: after[0], day: after[1], year: after[2], interpolate: '${month} ${day} ${year}' }"
|
95
|
+
},
|
96
|
+
],
|
97
|
+
words: {
|
98
|
+
patterns: [
|
99
|
+
{
|
100
|
+
pattern: [{ type: 'digit' }, { repeat: true }],
|
101
|
+
allow_partial_matches: false,
|
102
|
+
defs: [{id: "dayNumber_dates", uuid: '1', initial: "{ value: int(text), instance: true }" }]
|
103
|
+
},
|
104
|
+
{
|
105
|
+
pattern: [{ type: 'digit' }, { repeat: true }],
|
106
|
+
allow_partial_matches: false,
|
107
|
+
defs: [{id: "monthNumber_dates", uuid: '1', initial: "{ value: int(text), instance: true }" }]
|
108
|
+
},
|
109
|
+
{
|
110
|
+
pattern: [{ type: 'digit' }, { repeat: true }],
|
111
|
+
allow_partial_matches: false,
|
112
|
+
defs: [{id: "yearNumber_dates", uuid: '1', initial: "{ value: int(text), instance: true }" }]
|
113
|
+
},
|
114
|
+
],
|
115
|
+
}
|
116
|
+
},
|
117
|
+
(args) => {
|
118
|
+
const as = ['jan', 'feb', 'mar', 'apr', 'jun', 'jul', 'aug', 'sept', 'oct', 'nov', 'dec']
|
119
|
+
const ms = ['january', 'february', 'march', 'april', 'june', 'july', 'august', 'september', 'october', 'november', 'december']
|
120
|
+
for (let i = 0; i < as.length; ++i) {
|
121
|
+
args.makeObject({...args, context: { word: as[i], value: `${as[i]}_dates`}, types: [`${ms[i]}_dates`]})
|
122
|
+
}
|
123
|
+
|
124
|
+
/*
|
125
|
+
const word = 'bc'
|
126
|
+
const synonym = 'bce'
|
127
|
+
args.makeObject({...args, context: { word: synonym, value: `${synonym}_dates`}, types: [`${word}_dates`]})
|
128
|
+
*/
|
129
|
+
},
|
130
|
+
"resetIdSuffix",
|
131
|
+
],
|
132
|
+
}
|
133
|
+
|
134
|
+
knowledgeModule( {
|
135
|
+
config: { name: 'dates' },
|
136
|
+
includes: [ordinals, hierarchy],
|
137
|
+
|
138
|
+
module,
|
139
|
+
description: 'talking about dates',
|
140
|
+
test: {
|
141
|
+
name: './dates.test.json',
|
142
|
+
contents: dates_tests,
|
143
|
+
checks: {
|
144
|
+
context: defaultContextCheck(['day', 'month', 'year', 'era']),
|
145
|
+
},
|
146
|
+
},
|
147
|
+
template: {
|
148
|
+
template,
|
149
|
+
instance: dates_instance,
|
150
|
+
},
|
151
|
+
|
152
|
+
})
|