event_nlp 0.6.6 → 0.6.7
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/event_nlp.rb +12 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 246bf075ca72ce30cb7a2d8742909e72165b30a607de948cff0c69f031cc333e
|
|
4
|
+
data.tar.gz: 5634642b23bb6b0dd5c5b6e411efb521929ca8e66808cf26a1503023777b7130
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b692393ba9b24a0378afd6ce9c965e8f0e481374d76365824c645b1b28c10cbfe430a952ddceaceb5d8875d2b6f373b2fbeafda3fa3e27185d32efcfb39d17f6
|
|
7
|
+
data.tar.gz: f75b6af7438aa329f57c074d47542e3c81318fa79d79bed033055f9ce569e8e25a211e2e08cb70c5341e550a0fd8473416787793b658aea2046dd2c51b60a3c4
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/event_nlp.rb
CHANGED
|
@@ -107,6 +107,18 @@ class EventNlp
|
|
|
107
107
|
s = raws.sub(pattern, s2)
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
+
months = (Date::MONTHNAMES + Date::ABBR_MONTHNAMES).join('|').downcase
|
|
111
|
+
|
|
112
|
+
# the following would be ambiguous input, but we will assume they
|
|
113
|
+
# meant the 14th day of every month
|
|
114
|
+
# e.g. "Cafe meeting 14th May Monthly"
|
|
115
|
+
found = raws.match(/(?<title>.*)\s+(?<day>\w+(?:st|nd|rd|th)) (#{months}) monthly/i)
|
|
116
|
+
|
|
117
|
+
if found then
|
|
118
|
+
s = "%s on the %s of every month" % [found[:title],
|
|
119
|
+
found[:day].to_i.ordinal]
|
|
120
|
+
end
|
|
121
|
+
|
|
110
122
|
# e.g. "Cafe meeting 14th Monthly" =>
|
|
111
123
|
# Cafe meeting on the 14th of every month
|
|
112
124
|
#
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: event_nlp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
|
35
35
|
w8lJ+I6Lqqr5GpsweOnEHW4w200sMRD40u8qmGHrqirihL2KrwTD6A9UObvA5AxZ
|
|
36
36
|
4Z4EPvKg+3jsK9Gv3GGSLdrD
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2022-
|
|
38
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: chronic_cron
|
metadata.gz.sig
CHANGED
|
Binary file
|