acute 1.0.0
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.
- checksums.yaml +7 -0
- data/LICENSE +17 -0
- data/data/assumptions.yml +124 -0
- data/data/words.yml +699 -0
- data/exe/acute +4 -0
- data/lib/acute/assumption.rb +13 -0
- data/lib/acute/calendar.rb +91 -0
- data/lib/acute/chronic.rb +176 -0
- data/lib/acute/chronic_duration.rb +321 -0
- data/lib/acute/cli.rb +168 -0
- data/lib/acute/context.rb +205 -0
- data/lib/acute/describe.rb +316 -0
- data/lib/acute/duration.rb +120 -0
- data/lib/acute/errors.rb +47 -0
- data/lib/acute/explain.rb +165 -0
- data/lib/acute/extract.rb +493 -0
- data/lib/acute/grammar/clock_words.rb +109 -0
- data/lib/acute/grammar/compact.rb +222 -0
- data/lib/acute/grammar/duration.rb +93 -0
- data/lib/acute/grammar/nesting.rb +104 -0
- data/lib/acute/grammar/numbers.rb +378 -0
- data/lib/acute/grammar/ordinals.rb +101 -0
- data/lib/acute/grammar/ranges.rb +112 -0
- data/lib/acute/grammar/rule.rb +277 -0
- data/lib/acute/grammar/shifts.rb +226 -0
- data/lib/acute/grammar/words.rb +307 -0
- data/lib/acute/grammar.rb +378 -0
- data/lib/acute/holidays.rb +97 -0
- data/lib/acute/lexer.rb +487 -0
- data/lib/acute/locale.rb +53 -0
- data/lib/acute/mcp.rb +224 -0
- data/lib/acute/parser.rb +66 -0
- data/lib/acute/read.rb +21 -0
- data/lib/acute/resolve/clock.rb +75 -0
- data/lib/acute/resolve/dates.rb +75 -0
- data/lib/acute/resolve/day.rb +24 -0
- data/lib/acute/resolve/fuzzy.rb +91 -0
- data/lib/acute/resolve/named.rb +116 -0
- data/lib/acute/resolve/nth.rb +47 -0
- data/lib/acute/resolve/period.rb +160 -0
- data/lib/acute/resolve/periodic.rb +274 -0
- data/lib/acute/resolve/ranges.rb +165 -0
- data/lib/acute/resolve/recur.rb +187 -0
- data/lib/acute/resolve/rel.rb +146 -0
- data/lib/acute/resolve/shift.rb +81 -0
- data/lib/acute/resolve.rb +245 -0
- data/lib/acute/result.rb +128 -0
- data/lib/acute/rule/cron.rb +222 -0
- data/lib/acute/rule/expand.rb +401 -0
- data/lib/acute/rule.rb +232 -0
- data/lib/acute/tables/assumptions.rb +39 -0
- data/lib/acute/tables/words.rb +656 -0
- data/lib/acute/tables/zones.rb +930 -0
- data/lib/acute/tool/compact.rb +82 -0
- data/lib/acute/tool/ruby_llm.rb +29 -0
- data/lib/acute/tool.rb +192 -0
- data/lib/acute/verify.rb +216 -0
- data/lib/acute/version.rb +3 -0
- data/lib/acute/zone.rb +252 -0
- data/lib/acute.rb +160 -0
- data/schema/description.json +12 -0
- data/schema/duration.json +26 -0
- data/schema/extraction.json +30 -0
- data/schema/failure.json +29 -0
- data/schema/now.json +17 -0
- data/schema/result.json +45 -0
- data/schema/rule.json +19 -0
- data/schema/tools/describe.json +13 -0
- data/schema/tools/duration.json +12 -0
- data/schema/tools/extract.json +13 -0
- data/schema/tools/now.json +9 -0
- data/schema/tools/parse.json +13 -0
- data/schema/tools/recurrence.json +12 -0
- data/schema/tools/verify.json +14 -0
- data/schema/verdict.json +25 -0
- metadata +117 -0
data/data/words.yml
ADDED
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
# Words the lexer knows, grouped by token kind. bin/generate turns this into lib/acute/tables/words.rb.
|
|
2
|
+
# Matching ignores ASCII case. A word may hold letters, apostrophes and inner dots ("p.m").
|
|
3
|
+
# A value is an Integer, or a name that becomes a Symbol.
|
|
4
|
+
|
|
5
|
+
day: # value: days from today
|
|
6
|
+
today: 0
|
|
7
|
+
tomorrow: 1
|
|
8
|
+
tmrw: 1
|
|
9
|
+
tmr: 1
|
|
10
|
+
yesterday: -1
|
|
11
|
+
today's: 0
|
|
12
|
+
todays: 0
|
|
13
|
+
tomorrow's: 1
|
|
14
|
+
tomorrows: 1
|
|
15
|
+
yesterday's: -1
|
|
16
|
+
|
|
17
|
+
meridiem: # value: hours added to 1-12
|
|
18
|
+
am: 0
|
|
19
|
+
a.m: 0
|
|
20
|
+
pm: 12
|
|
21
|
+
p.m: 12
|
|
22
|
+
p: 12
|
|
23
|
+
|
|
24
|
+
named: # value: the hour it names
|
|
25
|
+
noon: 12
|
|
26
|
+
midday: 12
|
|
27
|
+
midnight: 0
|
|
28
|
+
|
|
29
|
+
now:
|
|
30
|
+
now: 0
|
|
31
|
+
|
|
32
|
+
at:
|
|
33
|
+
at: 0
|
|
34
|
+
|
|
35
|
+
weekday: # value: 0 = Sunday
|
|
36
|
+
sunday: 0
|
|
37
|
+
sun: 0
|
|
38
|
+
monday: 1
|
|
39
|
+
mon: 1
|
|
40
|
+
tuesday: 2
|
|
41
|
+
tue: 2
|
|
42
|
+
tues: 2
|
|
43
|
+
tu: 2
|
|
44
|
+
wednesday: 3
|
|
45
|
+
wed: 3
|
|
46
|
+
midweek: 3 # D2
|
|
47
|
+
thursday: 4
|
|
48
|
+
thu: 4
|
|
49
|
+
thur: 4
|
|
50
|
+
thurs: 4
|
|
51
|
+
friday: 5
|
|
52
|
+
fri: 5
|
|
53
|
+
fr: 5
|
|
54
|
+
frid: 5
|
|
55
|
+
saturday: 6
|
|
56
|
+
sat: 6
|
|
57
|
+
sundays: 0
|
|
58
|
+
mondays: 1
|
|
59
|
+
tuesdays: 2
|
|
60
|
+
wednesdays: 3
|
|
61
|
+
thursdays: 4
|
|
62
|
+
fridays: 5
|
|
63
|
+
saturdays: 6
|
|
64
|
+
|
|
65
|
+
month:
|
|
66
|
+
january: 1
|
|
67
|
+
jan: 1
|
|
68
|
+
february: 2
|
|
69
|
+
feb: 2
|
|
70
|
+
march: 3
|
|
71
|
+
mar: 3
|
|
72
|
+
april: 4
|
|
73
|
+
apr: 4
|
|
74
|
+
may: 5
|
|
75
|
+
june: 6
|
|
76
|
+
jun: 6
|
|
77
|
+
july: 7
|
|
78
|
+
jul: 7
|
|
79
|
+
august: 8
|
|
80
|
+
aug: 8
|
|
81
|
+
september: 9
|
|
82
|
+
sep: 9
|
|
83
|
+
sept: 9
|
|
84
|
+
october: 10
|
|
85
|
+
oct: 10
|
|
86
|
+
november: 11
|
|
87
|
+
nov: 11
|
|
88
|
+
december: 12
|
|
89
|
+
dec: 12
|
|
90
|
+
|
|
91
|
+
unit:
|
|
92
|
+
s: second
|
|
93
|
+
sec: second
|
|
94
|
+
secs: second
|
|
95
|
+
seconds: second
|
|
96
|
+
m: minute
|
|
97
|
+
min: minute
|
|
98
|
+
mins: minute
|
|
99
|
+
minute: minute
|
|
100
|
+
minutes: minute
|
|
101
|
+
h: hour
|
|
102
|
+
hr: hour
|
|
103
|
+
hrs: hour
|
|
104
|
+
hour: hour
|
|
105
|
+
hours: hour
|
|
106
|
+
d: day
|
|
107
|
+
day: day
|
|
108
|
+
days: day
|
|
109
|
+
w: week
|
|
110
|
+
wk: week
|
|
111
|
+
wks: week
|
|
112
|
+
week: week
|
|
113
|
+
week's: week
|
|
114
|
+
weeks: week
|
|
115
|
+
fortnight: fortnight
|
|
116
|
+
fortnight's: fortnight
|
|
117
|
+
fortnights: fortnight
|
|
118
|
+
mo: month
|
|
119
|
+
month: month
|
|
120
|
+
month's: month
|
|
121
|
+
months: month
|
|
122
|
+
quarter: quarter
|
|
123
|
+
quarters: quarter
|
|
124
|
+
qtr: quarter
|
|
125
|
+
qtrs: quarter
|
|
126
|
+
y: year
|
|
127
|
+
yr: year
|
|
128
|
+
yrs: year
|
|
129
|
+
year: year
|
|
130
|
+
year's: year
|
|
131
|
+
years: year
|
|
132
|
+
decade: decade
|
|
133
|
+
decades: decade
|
|
134
|
+
century: century
|
|
135
|
+
season: season # D48: three months from December, March, June or September
|
|
136
|
+
seasons: season
|
|
137
|
+
centuries: century
|
|
138
|
+
weekday: business_day
|
|
139
|
+
weekdays: business_day
|
|
140
|
+
|
|
141
|
+
relative: # "past" is also the clock word in "twenty past four"
|
|
142
|
+
next: next
|
|
143
|
+
this: this
|
|
144
|
+
current: this
|
|
145
|
+
last: last
|
|
146
|
+
past: past
|
|
147
|
+
coming: next
|
|
148
|
+
upcoming: next
|
|
149
|
+
following: next
|
|
150
|
+
previous: last
|
|
151
|
+
prev: last
|
|
152
|
+
|
|
153
|
+
number:
|
|
154
|
+
one: 1
|
|
155
|
+
two: 2
|
|
156
|
+
three: 3
|
|
157
|
+
four: 4
|
|
158
|
+
five: 5
|
|
159
|
+
six: 6
|
|
160
|
+
seven: 7
|
|
161
|
+
eight: 8
|
|
162
|
+
nine: 9
|
|
163
|
+
ten: 10
|
|
164
|
+
eleven: 11
|
|
165
|
+
twelve: 12
|
|
166
|
+
thirteen: 13
|
|
167
|
+
fourteen: 14
|
|
168
|
+
fifteen: 15
|
|
169
|
+
sixteen: 16
|
|
170
|
+
seventeen: 17
|
|
171
|
+
eighteen: 18
|
|
172
|
+
nineteen: 19
|
|
173
|
+
twenty: 20
|
|
174
|
+
thirty: 30
|
|
175
|
+
forty: 40
|
|
176
|
+
fifty: 50
|
|
177
|
+
sixty: 60
|
|
178
|
+
seventy: 70
|
|
179
|
+
eighty: 80
|
|
180
|
+
ninety: 90
|
|
181
|
+
|
|
182
|
+
decade: # D12: value: the decade's last two digits
|
|
183
|
+
twenties: 20
|
|
184
|
+
thirties: 30
|
|
185
|
+
forties: 40
|
|
186
|
+
fifties: 50
|
|
187
|
+
sixties: 60
|
|
188
|
+
seventies: 70
|
|
189
|
+
eighties: 80
|
|
190
|
+
nineties: 90
|
|
191
|
+
|
|
192
|
+
ordinal: # "second" is also the unit, by context
|
|
193
|
+
first: 1
|
|
194
|
+
final: -1 # only before what it picks, "final thursday in april"
|
|
195
|
+
second: 2
|
|
196
|
+
third: 3
|
|
197
|
+
fourth: 4
|
|
198
|
+
fifth: 5
|
|
199
|
+
sixth: 6
|
|
200
|
+
seventh: 7
|
|
201
|
+
eighth: 8
|
|
202
|
+
ninth: 9
|
|
203
|
+
tenth: 10
|
|
204
|
+
eleventh: 11
|
|
205
|
+
twelfth: 12
|
|
206
|
+
thirteenth: 13
|
|
207
|
+
fourteenth: 14
|
|
208
|
+
fifteenth: 15
|
|
209
|
+
sixteenth: 16
|
|
210
|
+
seventeenth: 17
|
|
211
|
+
eighteenth: 18
|
|
212
|
+
nineteenth: 19
|
|
213
|
+
twentieth: 20
|
|
214
|
+
thirtieth: 30
|
|
215
|
+
|
|
216
|
+
part: # parts of the day (D1, D35)
|
|
217
|
+
morning: morning
|
|
218
|
+
afternoon: afternoon
|
|
219
|
+
evening: evening
|
|
220
|
+
mornings: morning
|
|
221
|
+
afternoons: afternoon
|
|
222
|
+
evenings: evening
|
|
223
|
+
nights: night
|
|
224
|
+
night: night
|
|
225
|
+
tonight: tonight
|
|
226
|
+
tonight's: tonight
|
|
227
|
+
lunch: lunch
|
|
228
|
+
lunchtime: lunch
|
|
229
|
+
|
|
230
|
+
season: # D3
|
|
231
|
+
spring: spring
|
|
232
|
+
summer: summer
|
|
233
|
+
autumn: autumn
|
|
234
|
+
fall: autumn
|
|
235
|
+
winter: winter
|
|
236
|
+
springs: spring
|
|
237
|
+
summers: summer
|
|
238
|
+
autumns: autumn
|
|
239
|
+
falls: autumn
|
|
240
|
+
winters: winter
|
|
241
|
+
|
|
242
|
+
holiday: # D15, D28: formulas only
|
|
243
|
+
christmas: christmas
|
|
244
|
+
xmas: christmas
|
|
245
|
+
thanksgiving: thanksgiving
|
|
246
|
+
halloween: halloween
|
|
247
|
+
easter: easter
|
|
248
|
+
juneteenth: juneteenth
|
|
249
|
+
pentecost: pentecost
|
|
250
|
+
whitsunday: pentecost
|
|
251
|
+
whitsun: pentecost
|
|
252
|
+
thanksgivings: thanksgiving
|
|
253
|
+
kwanzaa: kwanzaa
|
|
254
|
+
|
|
255
|
+
weekend:
|
|
256
|
+
weekend: 0
|
|
257
|
+
weekends: 0
|
|
258
|
+
wkend: 0
|
|
259
|
+
|
|
260
|
+
zone: # value: the UTC offset in seconds (D18, D40: abbreviations are fixed offsets), or an IANA name
|
|
261
|
+
# D38: an ambiguous one lists its offsets in order; a leading country is where the first alone holds
|
|
262
|
+
utc: 0
|
|
263
|
+
gmt: 0
|
|
264
|
+
z: 0
|
|
265
|
+
est: -18000
|
|
266
|
+
edt: -14400
|
|
267
|
+
cst: -21600
|
|
268
|
+
cdt: -18000
|
|
269
|
+
mst: -25200
|
|
270
|
+
mdt: -21600
|
|
271
|
+
pst: -28800
|
|
272
|
+
pdt: -25200
|
|
273
|
+
cet: 3600
|
|
274
|
+
cest: 7200
|
|
275
|
+
bst: [GB, 3600, 21600]
|
|
276
|
+
ist: [19800, 3600, 7200]
|
|
277
|
+
aest: 36000
|
|
278
|
+
aedt: 39600
|
|
279
|
+
jst: 32400
|
|
280
|
+
msk: 10800
|
|
281
|
+
hst: -36000
|
|
282
|
+
akst: -32400
|
|
283
|
+
akdt: -28800
|
|
284
|
+
eet: 7200
|
|
285
|
+
eest: 10800
|
|
286
|
+
nzst: 43200
|
|
287
|
+
nzdt: 46800
|
|
288
|
+
acst: 34200
|
|
289
|
+
acdt: 37800
|
|
290
|
+
awst: 28800
|
|
291
|
+
sgt: 28800
|
|
292
|
+
hkt: 28800
|
|
293
|
+
kst: 32400
|
|
294
|
+
# D44: a US zone named without standard or daylight follows its clock changes
|
|
295
|
+
et: America/New_York
|
|
296
|
+
eastern: America/New_York
|
|
297
|
+
ct: America/Chicago
|
|
298
|
+
central: America/Chicago
|
|
299
|
+
mt: America/Denver
|
|
300
|
+
mountain: America/Denver
|
|
301
|
+
pt: America/Los_Angeles
|
|
302
|
+
pacific: America/Los_Angeles
|
|
303
|
+
|
|
304
|
+
fuzzy: # D2
|
|
305
|
+
early: early
|
|
306
|
+
mid: mid
|
|
307
|
+
middle: mid
|
|
308
|
+
late: late
|
|
309
|
+
beginning: start
|
|
310
|
+
start: start
|
|
311
|
+
end: end
|
|
312
|
+
eod: eod
|
|
313
|
+
eom: eom
|
|
314
|
+
eoy: eoy
|
|
315
|
+
bom: bom
|
|
316
|
+
boy: boy
|
|
317
|
+
|
|
318
|
+
article: # "a" is also the meridiem in "8a"
|
|
319
|
+
a: 1
|
|
320
|
+
an: 1
|
|
321
|
+
|
|
322
|
+
word: # function words; the grammar gives them their meaning
|
|
323
|
+
workweek: work_week
|
|
324
|
+
during: during
|
|
325
|
+
all: all
|
|
326
|
+
rest: rest
|
|
327
|
+
remainder: rest
|
|
328
|
+
anytime: anytime
|
|
329
|
+
sometime: anytime
|
|
330
|
+
sometimes: anytime
|
|
331
|
+
in: in
|
|
332
|
+
within: within
|
|
333
|
+
ago: ago
|
|
334
|
+
back: ago
|
|
335
|
+
hence: hence
|
|
336
|
+
out: hence
|
|
337
|
+
later: later
|
|
338
|
+
earlier: ago
|
|
339
|
+
from: from
|
|
340
|
+
to: to
|
|
341
|
+
closest: closest # D48
|
|
342
|
+
nearest: closest
|
|
343
|
+
and: and
|
|
344
|
+
or: or
|
|
345
|
+
of: of
|
|
346
|
+
the: the
|
|
347
|
+
"on": "on"
|
|
348
|
+
between: between
|
|
349
|
+
after: after
|
|
350
|
+
before: before
|
|
351
|
+
since: since
|
|
352
|
+
until: until
|
|
353
|
+
till: until
|
|
354
|
+
til: until
|
|
355
|
+
untill: until
|
|
356
|
+
through: through
|
|
357
|
+
thru: through
|
|
358
|
+
by: by
|
|
359
|
+
around: around
|
|
360
|
+
about: around
|
|
361
|
+
approximately: around
|
|
362
|
+
roughly: around
|
|
363
|
+
approx: around
|
|
364
|
+
circa: around
|
|
365
|
+
ish: around
|
|
366
|
+
o'clock: oclock
|
|
367
|
+
thousand: thousand
|
|
368
|
+
hundred: hundred
|
|
369
|
+
million: million
|
|
370
|
+
oh: oh # "twelve oh three"
|
|
371
|
+
o: oh
|
|
372
|
+
zero: oh
|
|
373
|
+
oclock: oclock
|
|
374
|
+
half: half
|
|
375
|
+
for: for
|
|
376
|
+
more: more
|
|
377
|
+
extra: more
|
|
378
|
+
additional: more
|
|
379
|
+
t: t
|
|
380
|
+
q: q
|
|
381
|
+
fy: fy
|
|
382
|
+
ad: ad
|
|
383
|
+
be: be # D48: the Buddhist era
|
|
384
|
+
b.e: be
|
|
385
|
+
a.d: ad
|
|
386
|
+
ce: ad
|
|
387
|
+
c.e: ad
|
|
388
|
+
starting: starting
|
|
389
|
+
onwards: orlater
|
|
390
|
+
onward: orlater
|
|
391
|
+
commencing: starting
|
|
392
|
+
every: every # R5, R6: a rule; only Acute.recurrence reads these
|
|
393
|
+
each: every
|
|
394
|
+
other: other
|
|
395
|
+
alternate: other
|
|
396
|
+
once: once
|
|
397
|
+
times: times
|
|
398
|
+
occurrences: times
|
|
399
|
+
occurrence: times
|
|
400
|
+
except: except
|
|
401
|
+
excluding: except
|
|
402
|
+
everyday: daily
|
|
403
|
+
daily: daily
|
|
404
|
+
hourly: hourly
|
|
405
|
+
weekly: weekly
|
|
406
|
+
monthly: monthly
|
|
407
|
+
yearly: yearly
|
|
408
|
+
annually: yearly
|
|
409
|
+
annual: yearly
|
|
410
|
+
quarterly: quarterly
|
|
411
|
+
semiannually: semiannual
|
|
412
|
+
semiannual: semiannual
|
|
413
|
+
biweekly: biweekly
|
|
414
|
+
fortnightly: biweekly
|
|
415
|
+
bimonthly: bimonthly
|
|
416
|
+
|
|
417
|
+
# Several words read as one token, longest first. Spaces in a key stand for any run of spaces or hyphens.
|
|
418
|
+
phrases:
|
|
419
|
+
o clock: [word, oclock]
|
|
420
|
+
eastern time: [zone, America/New_York]
|
|
421
|
+
central time: [zone, America/Chicago]
|
|
422
|
+
mountain time: [zone, America/Denver]
|
|
423
|
+
pacific time: [zone, America/Los_Angeles]
|
|
424
|
+
alaska time: [zone, America/Anchorage]
|
|
425
|
+
hawaii time: [zone, Pacific/Honolulu]
|
|
426
|
+
week end: [weekend, 0]
|
|
427
|
+
lunch time: [part, lunch]
|
|
428
|
+
christmas eve: [holiday, christmas_eve]
|
|
429
|
+
christmas day: [holiday, christmas]
|
|
430
|
+
thanksgiving day: [holiday, thanksgiving]
|
|
431
|
+
new year's eve: [holiday, new_years_eve]
|
|
432
|
+
new years eve: [holiday, new_years_eve]
|
|
433
|
+
new year's day: [holiday, new_years_day]
|
|
434
|
+
new years day: [holiday, new_years_day]
|
|
435
|
+
valentine's day: [holiday, valentines]
|
|
436
|
+
valentines day: [holiday, valentines]
|
|
437
|
+
valentine day: [holiday, valentines]
|
|
438
|
+
st patrick's day: [holiday, st_patricks]
|
|
439
|
+
st patricks day: [holiday, st_patricks]
|
|
440
|
+
saint patrick's day: [holiday, st_patricks]
|
|
441
|
+
saint patricks day: [holiday, st_patricks]
|
|
442
|
+
saint patrick: [holiday, st_patricks]
|
|
443
|
+
april fools day: [holiday, april_fools]
|
|
444
|
+
april fool's day: [holiday, april_fools]
|
|
445
|
+
april fools' day: [holiday, april_fools]
|
|
446
|
+
independence day: [holiday, independence_day]
|
|
447
|
+
veterans day: [holiday, veterans_day]
|
|
448
|
+
veteran's day: [holiday, veterans_day]
|
|
449
|
+
veterans' day: [holiday, veterans_day]
|
|
450
|
+
veteran day: [holiday, veterans_day]
|
|
451
|
+
boxing day: [holiday, boxing_day]
|
|
452
|
+
groundhog day: [holiday, groundhog_day]
|
|
453
|
+
groundhogs day: [holiday, groundhog_day]
|
|
454
|
+
groundhog's day: [holiday, groundhog_day]
|
|
455
|
+
earth day: [holiday, earth_day]
|
|
456
|
+
flag day: [holiday, flag_day]
|
|
457
|
+
eastern standard time: [zone, -18000]
|
|
458
|
+
eastern daylight time: [zone, -14400]
|
|
459
|
+
central standard time: [zone, -21600]
|
|
460
|
+
central daylight time: [zone, -18000]
|
|
461
|
+
mountain standard time: [zone, -25200]
|
|
462
|
+
mountain daylight time: [zone, -21600]
|
|
463
|
+
pacific standard time: [zone, -28800]
|
|
464
|
+
pacific daylight time: [zone, -25200]
|
|
465
|
+
patriot day: [holiday, patriot_day]
|
|
466
|
+
boss's day: [holiday, bosses_day]
|
|
467
|
+
boss day: [holiday, bosses_day]
|
|
468
|
+
bosses day: [holiday, bosses_day]
|
|
469
|
+
bosses' day: [holiday, bosses_day]
|
|
470
|
+
australia day: [holiday, australia_day]
|
|
471
|
+
anzac day: [holiday, anzac_day]
|
|
472
|
+
canada day: [holiday, canada_day]
|
|
473
|
+
victoria day: [holiday, victoria_day]
|
|
474
|
+
melbourne cup day: [holiday, melbourne_cup]
|
|
475
|
+
melbourne cup: [holiday, melbourne_cup]
|
|
476
|
+
mlk day: [holiday, mlk_day]
|
|
477
|
+
mlk jr day: [holiday, mlk_day]
|
|
478
|
+
martin luther king day: [holiday, mlk_day]
|
|
479
|
+
martin luther king's day: [holiday, mlk_day]
|
|
480
|
+
martin luther kings day: [holiday, mlk_day]
|
|
481
|
+
martin luther king jr day: [holiday, mlk_day]
|
|
482
|
+
presidents day: [holiday, presidents_day]
|
|
483
|
+
president day: [holiday, presidents_day]
|
|
484
|
+
presidents' day: [holiday, presidents_day]
|
|
485
|
+
president's day: [holiday, presidents_day]
|
|
486
|
+
mother's day: [holiday, mothers_day]
|
|
487
|
+
mothers day: [holiday, mothers_day]
|
|
488
|
+
mothers' day: [holiday, mothers_day]
|
|
489
|
+
mothering sunday: [holiday, mothering_sunday]
|
|
490
|
+
memorial day: [holiday, memorial_day]
|
|
491
|
+
memorial days: [holiday, memorial_day]
|
|
492
|
+
father's day: [holiday, fathers_day]
|
|
493
|
+
fathers day: [holiday, fathers_day]
|
|
494
|
+
fathers' day: [holiday, fathers_day]
|
|
495
|
+
labor day: [holiday, labor_day]
|
|
496
|
+
labour day: [holiday, labor_day]
|
|
497
|
+
columbus day: [holiday, columbus_day]
|
|
498
|
+
black friday: [holiday, black_friday]
|
|
499
|
+
black fridays: [holiday, black_friday]
|
|
500
|
+
cyber monday: [holiday, cyber_monday]
|
|
501
|
+
easter sunday: [holiday, easter]
|
|
502
|
+
easter day: [holiday, easter]
|
|
503
|
+
good friday: [holiday, good_friday]
|
|
504
|
+
easter monday: [holiday, easter_monday]
|
|
505
|
+
easter mon: [holiday, easter_monday]
|
|
506
|
+
palm sunday: [holiday, palm_sunday]
|
|
507
|
+
maundy thursday: [holiday, maundy_thursday]
|
|
508
|
+
holy thursday: [holiday, maundy_thursday]
|
|
509
|
+
ash wednesday: [holiday, ash_wednesday]
|
|
510
|
+
mardi gras: [holiday, mardi_gras]
|
|
511
|
+
shrove tuesday: [holiday, mardi_gras]
|
|
512
|
+
whit sunday: [holiday, pentecost]
|
|
513
|
+
white sunday: [holiday, pentecost]
|
|
514
|
+
whit monday: [holiday, whit_monday]
|
|
515
|
+
trinity sunday: [holiday, trinity_sunday]
|
|
516
|
+
new year eve: [holiday, new_years_eve]
|
|
517
|
+
new year day: [holiday, new_years_day]
|
|
518
|
+
fourth of july: [holiday, independence_day]
|
|
519
|
+
st paddy's day: [holiday, st_patricks]
|
|
520
|
+
st paddys day: [holiday, st_patricks]
|
|
521
|
+
saint paddy's day: [holiday, st_patricks]
|
|
522
|
+
saint paddys day: [holiday, st_patricks]
|
|
523
|
+
st patty's day: [holiday, st_patricks]
|
|
524
|
+
st pattys day: [holiday, st_patricks]
|
|
525
|
+
saint patty's day: [holiday, st_patricks]
|
|
526
|
+
saint pattys day: [holiday, st_patricks]
|
|
527
|
+
thanks giving day: [holiday, thanksgiving]
|
|
528
|
+
thanks giving: [holiday, thanksgiving]
|
|
529
|
+
civil rights day: [holiday, mlk_day]
|
|
530
|
+
washington's birthday: [holiday, presidents_day]
|
|
531
|
+
washingtons birthday: [holiday, presidents_day]
|
|
532
|
+
washington birthday: [holiday, presidents_day]
|
|
533
|
+
george washington's birthday: [holiday, presidents_day]
|
|
534
|
+
george washington day: [holiday, presidents_day]
|
|
535
|
+
decoration day: [holiday, memorial_day]
|
|
536
|
+
covenant thursday: [holiday, maundy_thursday]
|
|
537
|
+
covenant thu: [holiday, maundy_thursday]
|
|
538
|
+
thursday of mysteries: [holiday, maundy_thursday]
|
|
539
|
+
thu of mysteries: [holiday, maundy_thursday]
|
|
540
|
+
monday of the holy spirit: [holiday, whit_monday]
|
|
541
|
+
branch sunday: [holiday, palm_sunday]
|
|
542
|
+
pancake day: [holiday, mardi_gras]
|
|
543
|
+
election day: [holiday, election_day]
|
|
544
|
+
lincoln's birthday: [holiday, lincolns_birthday]
|
|
545
|
+
lincolns birthday: [holiday, lincolns_birthday]
|
|
546
|
+
lincolns' birthday: [holiday, lincolns_birthday]
|
|
547
|
+
lincoln birthday: [holiday, lincolns_birthday]
|
|
548
|
+
abraham lincoln's birthday: [holiday, lincolns_birthday]
|
|
549
|
+
abraham lincolns birthday: [holiday, lincolns_birthday]
|
|
550
|
+
abraham lincoln birthday: [holiday, lincolns_birthday]
|
|
551
|
+
law day: [holiday, law_day]
|
|
552
|
+
loyalty day: [holiday, loyalty_day]
|
|
553
|
+
may day: [holiday, may_day]
|
|
554
|
+
workers day: [holiday, workers_day]
|
|
555
|
+
workers' day: [holiday, workers_day]
|
|
556
|
+
international workers day: [holiday, workers_day]
|
|
557
|
+
international workers' day: [holiday, workers_day]
|
|
558
|
+
int'l workers day: [holiday, workers_day]
|
|
559
|
+
int'l workers' day: [holiday, workers_day]
|
|
560
|
+
siblings day: [holiday, siblings_day]
|
|
561
|
+
sibling day: [holiday, siblings_day]
|
|
562
|
+
national siblings day: [holiday, siblings_day]
|
|
563
|
+
national sibling day: [holiday, siblings_day]
|
|
564
|
+
grandparents day: [holiday, grandparents_day]
|
|
565
|
+
grandparents' day: [holiday, grandparents_day]
|
|
566
|
+
grandparent's day: [holiday, grandparents_day]
|
|
567
|
+
national grandparents day: [holiday, grandparents_day]
|
|
568
|
+
national grandparents' day: [holiday, grandparents_day]
|
|
569
|
+
military spouse day: [holiday, military_spouse_day]
|
|
570
|
+
military spouses day: [holiday, military_spouse_day]
|
|
571
|
+
military spouse appreciation day: [holiday, military_spouse_day]
|
|
572
|
+
administrative professionals' day: [holiday, admin_day]
|
|
573
|
+
administrative professionals day: [holiday, admin_day]
|
|
574
|
+
administrative professional's day: [holiday, admin_day]
|
|
575
|
+
administrative professional day: [holiday, admin_day]
|
|
576
|
+
admin professionals day: [holiday, admin_day]
|
|
577
|
+
secretaries' day: [holiday, admin_day]
|
|
578
|
+
secretaries day: [holiday, admin_day]
|
|
579
|
+
secretary's day: [holiday, admin_day]
|
|
580
|
+
admins day: [holiday, admin_day]
|
|
581
|
+
admins' day: [holiday, admin_day]
|
|
582
|
+
admin day: [holiday, admin_day]
|
|
583
|
+
world vegan day: [holiday, world_vegan_day]
|
|
584
|
+
ides of march: [holiday, ides_of_march]
|
|
585
|
+
leap day: [holiday, leap_day]
|
|
586
|
+
leap year: [holiday, leap_year]
|
|
587
|
+
guy fawkes day: [holiday, guy_fawkes]
|
|
588
|
+
guy fawkes night: [holiday, guy_fawkes]
|
|
589
|
+
bonfire night: [holiday, guy_fawkes]
|
|
590
|
+
dominion day: [holiday, canada_day]
|
|
591
|
+
vimy ridge day: [holiday, vimy_ridge_day]
|
|
592
|
+
sovereign's birthday: [holiday, victoria_day]
|
|
593
|
+
rizal day: [holiday, rizal_day]
|
|
594
|
+
indian arrival day: [holiday, indian_arrival_day]
|
|
595
|
+
day of reconciliation: [holiday, reconciliation_day]
|
|
596
|
+
reconciliation day: [holiday, reconciliation_day]
|
|
597
|
+
day of the vow: [holiday, reconciliation_day]
|
|
598
|
+
day of the covenant: [holiday, reconciliation_day]
|
|
599
|
+
kruger day: [holiday, kruger_day]
|
|
600
|
+
garifuna settlement day: [holiday, garifuna_day]
|
|
601
|
+
business day: [unit, business_day]
|
|
602
|
+
business days: [unit, business_day]
|
|
603
|
+
working day: [unit, business_day]
|
|
604
|
+
working days: [unit, business_day]
|
|
605
|
+
working week: [word, work_week] # D48
|
|
606
|
+
in between: [word, between]
|
|
607
|
+
work week: [word, work_week]
|
|
608
|
+
business week: [word, work_week]
|
|
609
|
+
early hours: [part, early_hours]
|
|
610
|
+
small hours: [part, early_hours]
|
|
611
|
+
a m: [meridiem, 0]
|
|
612
|
+
p m: [meridiem, 12]
|
|
613
|
+
prior to: [word, before]
|
|
614
|
+
later than or at: [word, onafter]
|
|
615
|
+
later than or in: [word, onafter]
|
|
616
|
+
later than or on: [word, onafter]
|
|
617
|
+
after or equal to: [word, onafter]
|
|
618
|
+
on or after: [word, onafter]
|
|
619
|
+
at or after: [word, onafter]
|
|
620
|
+
after or on: [word, onafter]
|
|
621
|
+
on or earlier than: [word, onbefore]
|
|
622
|
+
on or before: [word, onbefore]
|
|
623
|
+
at or before: [word, onbefore]
|
|
624
|
+
before or on: [word, onbefore]
|
|
625
|
+
before or in: [word, onbefore]
|
|
626
|
+
before or at: [word, onbefore]
|
|
627
|
+
no later than: [word, by]
|
|
628
|
+
later than: [word, after]
|
|
629
|
+
but before: [word, butbefore]
|
|
630
|
+
greater than: [word, after]
|
|
631
|
+
year greater than: [word, after]
|
|
632
|
+
earlier than: [word, before]
|
|
633
|
+
sooner than: [word, before]
|
|
634
|
+
in advance of: [word, before]
|
|
635
|
+
or later: [word, orlater]
|
|
636
|
+
and later: [word, orlater]
|
|
637
|
+
or greater: [word, orlater]
|
|
638
|
+
and greater: [word, orlater]
|
|
639
|
+
and beyond: [word, orlater]
|
|
640
|
+
or earlier: [word, orearlier]
|
|
641
|
+
up to: [word, upto]
|
|
642
|
+
right now: [now, 0]
|
|
643
|
+
just now: [now, 0]
|
|
644
|
+
at the moment: [now, 0]
|
|
645
|
+
at the minute: [now, 0]
|
|
646
|
+
at present: [now, 0]
|
|
647
|
+
at the present time: [now, 0]
|
|
648
|
+
at this time: [now, 0]
|
|
649
|
+
this time: [word, sametime]
|
|
650
|
+
same time: [word, sametime]
|
|
651
|
+
minutes time: [unit, minute]
|
|
652
|
+
minutes' time: [unit, minute]
|
|
653
|
+
hours time: [unit, hour]
|
|
654
|
+
hours' time: [unit, hour]
|
|
655
|
+
days time: [unit, day]
|
|
656
|
+
days' time: [unit, day]
|
|
657
|
+
weeks time: [unit, week]
|
|
658
|
+
weeks' time: [unit, week]
|
|
659
|
+
months time: [unit, month]
|
|
660
|
+
months' time: [unit, month]
|
|
661
|
+
years time: [unit, year]
|
|
662
|
+
years' time: [unit, year]
|
|
663
|
+
minute's time: [unit, minute]
|
|
664
|
+
hour's time: [unit, hour]
|
|
665
|
+
day's time: [unit, day]
|
|
666
|
+
week's time: [unit, week]
|
|
667
|
+
fortnight's time: [unit, fortnight]
|
|
668
|
+
month's time: [unit, month]
|
|
669
|
+
year's time: [unit, year]
|
|
670
|
+
a couple of: [word, couple]
|
|
671
|
+
a couple: [word, couple]
|
|
672
|
+
couple of: [word, couple]
|
|
673
|
+
a pair of: [word, couple]
|
|
674
|
+
fiscal year: [word, fy]
|
|
675
|
+
calendar year: [unit, year]
|
|
676
|
+
calendar month: [unit, month]
|
|
677
|
+
calendar week: [unit, week]
|
|
678
|
+
calendar quarter: [unit, quarter]
|
|
679
|
+
financial year: [word, fy]
|
|
680
|
+
semi annually: [word, semiannual]
|
|
681
|
+
semi annual: [word, semiannual]
|
|
682
|
+
bi weekly: [word, biweekly]
|
|
683
|
+
|
|
684
|
+
# Words that are also plain English. In extraction they need a neighbour that confirms the date reading.
|
|
685
|
+
english: [may, march, following, sat, sun, tu, fr, second, fall, a, mon, wed, start, end, last, past, this, next, d, m, s, h, w, y, lunch,
|
|
686
|
+
boy]
|
|
687
|
+
|
|
688
|
+
# D44: plurals, which only count ("3 fridays from now"); alone they recur, which is not a time. Plural units
|
|
689
|
+
# let "2 upcoming weeks" be "next 2 weeks" while "3 next week" is not.
|
|
690
|
+
plural: [thanksgivings, springs, summers, autumns, falls, winters, seasons, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays, weekends, weekdays, black fridays, memorial days,
|
|
691
|
+
secs, seconds, mins, minutes, hrs, hours, days, wks, weeks, fortnights, months, quarters, yrs, years,
|
|
692
|
+
decades, centuries, mornings, afternoons, evenings, nights]
|
|
693
|
+
|
|
694
|
+
# D18: a fixed table, only misspellings the corpus has. Each maps to the word it stands for.
|
|
695
|
+
misspellings:
|
|
696
|
+
tommorow: tomorrow
|
|
697
|
+
tonite: tonight
|
|
698
|
+
febuary: february
|
|
699
|
+
wensday: wednesday
|
data/exe/acute
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require_relative "tables/assumptions"
|
|
2
|
+
|
|
3
|
+
module Acute
|
|
4
|
+
# A rule a parse applied: frozen and Ractor-shareable
|
|
5
|
+
Assumption = Data.define(:code, :rule, :message, :short)
|
|
6
|
+
|
|
7
|
+
class Assumption
|
|
8
|
+
# @api private
|
|
9
|
+
ALL = Tables::ASSUMPTIONS.to_h { |code, (rule, message, short)| [code, new(code, rule, message, short)] }.freeze
|
|
10
|
+
|
|
11
|
+
def self.for(code) = ALL.fetch(code)
|
|
12
|
+
end
|
|
13
|
+
end
|