Commit Graph

12 Commits

Author SHA1 Message Date
Julien Odent
a6b7253aa4 Duration/EN: Leverage TimeGrain for number.number hours
Summary: also kill redundant `isGrain` helper from `Time`.

Reviewed By: dwhit, haoxuany

Differential Revision: D18937649

fbshipit-source-id: ed658cc3bac70e6592dabae536a31a4c2da8a578
2019-12-11 12:38:17 -08:00
Julien Odent
bf89e34365 Relicense to BSD3
Reviewed By: JoelMarcey

Differential Revision: D15439223

fbshipit-source-id: c5af3cb06318748142fe503945b38beffadfc28a
2019-05-22 10:46:39 -07:00
Julien Odent
546fa113a6 Time: Add "today" helper + reuse "tt" helper
Summary: Instead of `cycleNth TG.Day 0` and `Just . Token Time`.

Reviewed By: chinmay87

Differential Revision: D9344258

fbshipit-source-id: 1731c19f0d83640c5716757c70fcefea4655172f
2018-08-15 12:45:48 -07:00
Julien Odent
a3e87589a1 Time: Reuse "now" helper
Summary: Instead of `cycleNth TG.Second 0`.

Reviewed By: chinmay87

Differential Revision: D9341237

fbshipit-source-id: 153dba6edb0b341afad1ee6f7fa04361415be211
2018-08-15 12:45:48 -07:00
Julien Odent
bef7a44fa8 Remove redundant brackets and language pragmas
Summary: .

Reviewed By: JonCoens

Differential Revision: D6838082

fbshipit-source-id: 94757bdb80c6d3c29a7a6554429940a1b7403108
2018-01-29 16:45:28 -08:00
Julien Odent
fb10a6e6ba Time/EN: Parse spelled out times + AM/PM
Summary:
When using speech recognition, we might see things like "six thirty six a m" or
"ten thirty p m".
Also fixed the argument order of `timeOfDayAMPM` to be more idiomatic.

Reviewed By: blandinw

Differential Revision: D6316542

fbshipit-source-id: 0008c049040219b3a1dd80d9e4661ba8a246fa7f
2017-11-14 13:30:26 -08:00
Panagiotis Vekris
c6a7fedb7b Extract useful time-rule constructors to Time.Helpers
Summary: Some constructors for Time related rules are being reused among different language, so we can extract them in `Duckling/Time/Helpers.hs`.

Reviewed By: patapizza

Differential Revision: D6269106

fbshipit-source-id: 7d9969ce425ee27a2e1a32ea48932e16c7e6b1f1
2017-11-08 14:45:35 -08:00
Brock Overcash
8d4b103b10 Consolidate HE named months
Summary: Consolidate HE language named-months in the same style of other language, particularly EN. Translations were taken from previous namedMonth# rules and merged into the combined rule. Hebrew-speaking verification would be helpful to verify the integrity of the translations, although they were already taken from the existing code.

Reviewed By: blandinw

Differential Revision: D5839625

fbshipit-source-id: d53f9c7
2017-09-26 16:19:50 -07:00
Julien Odent
83ea150d94 Convert back escaped characters in rules
Summary:
We noticed that using UTF-8 characters directly in regexes work.
Hence converting back the escaped characters for readability and maintenance.

Reviewed By: blandinw

Differential Revision: D5787146

fbshipit-source-id: e5a4b9a
2017-09-07 12:49:33 -07:00
Atyansh Jaiswal
4e96a15c15 Refactored weekend rules to use the weekend helper for all languages
Summary: This is a simple refactor that uses the weekend helper for all languages

Reviewed By: patapizza

Differential Revision: D5677330

fbshipit-source-id: 9984539
2017-08-22 10:34:24 -07:00
Bartosz Nitka
cdd2f1c9cb Don't produce empty tokens from interval
Summary:
This is analogous to
[Duckling] Don't produce trivially empty Tokens
but that change did that for intersect, this one
deals with interval.

Reviewed By: patapizza

Differential Revision: D5039215

fbshipit-source-id: 95bd821
2017-05-10 16:04:22 -07:00
Julien Odent
d3d3703015 HE: Time
Summary:
Time dimension for Hebrew.
Commented out the failing tests that actually also fail in Clojure.

Reviewed By: JonCoens

Differential Revision: D4970308

fbshipit-source-id: b455142
2017-04-28 10:04:35 -07:00